Skip to content

Upload your build to Game Conductor

In this section you will upload your project to Game Conductor and register a new build. Before you do anything else, locate your Access Token listed in your user settings.

Make an archive of your build

  • Locate the directory created in the previous chapter.
  • Zip the entire directory and give it a name (for example build.zip)

Request a pre-signed upload from the API

To upload your build you must first ask for a pre-signed request from the API. To do so you need to send authenticated requests to the API, and thus need your Access Token.

Send the following request via cURL:

curl -u <username>:<access-token> https://api.gameconductor.net/v1/builds/upload-url

This should return a JSON response:

{
  "build_id": "01776768-2392-36df-67b4-d7b082c09399",
  "s3": {
    "bucket": "0176c36b-1cf3-e9b4-f745-0306019f1525",
    "url": "https://s3.eu-central-1.amazonaws.com/0176c36b-1cf3-e9b4-f745-0306019f1525",
    "fields": {
      "key": "01776768-2392-36df-67b4-d7b082c09399",
      "x-amz-algorithm": "AWS4-HMAC-SHA256",
      "x-amz-credential": "test/20210203/local/s3/aws4_request",
      "x-amz-date": "20210203T102014Z",
      "policy": "eyJleHBpcmF0aW9uIjogIjIwMjEtMDItMDNUMTE7MjA6MTRaIiwgImNvbmRpdGlvbnMiOiBbeyJidWNrZXQiOiAiMDE3NmMzNmItMWNmMy1lOWI0LWY3NDUtMDMwNjAxOWYxNTI1In0sIHsia2V5IjogIjAxNzc2NzY4LTIzOTItMzZkZi02N2I0LWQ3YjA4MmMwOTM5OSJ9LCB7IngtYW16LWFsZ29yaXRobSI6ICJBV1M0LUhNQUMtU0hBMjU2In0sIHsieC1hbXotY3JlZGVudGlhbCI6ICJ0ZXN0LzIwMjEwMjAzL2xvY2FsL3MzL2F3czRfcmVxdWVzdCJ9LCB7IngtYW16LWRhdGUiOiAiMjAyMTAyMDNUMTAyMDE0WiJ9XA0=",
      "x-amz-signature": "4c7aa09b04ff927e611d4a8b0275239c869bc6a6a77a9faa81ca5e85b05fe4f6"
    }
  }
}

Upload the build

Now you can upload your build with the following cURL command (elements between brackets need to be substitued):

curl --request POST \
--url <s3.url> \
--form file=@path/to/build.zip \
--form key=<s3.fields.key> \
--form x-amz-algorithm=<s3.fields.x-amz-algorithm> \
--form x-amz-credential=<s3.fields.x-amz-credential> \
--form x-amz-date=<s3.fields.x-amz-date> \
--form policy=<s3.fields.policy> \
--form x-amz-signature=<s3.fields.x-amz-signature>

This should return an empty response with a 204 status code.

Register the build on Game Conductor

Once your upload is successful you need to notify Game Conductor of the new build. To do so, run the following cURL command:

curl -u <username>:<access-token> \
--request POST https://api.gameconductor.net/v1/builds/new \
--header "Content-Type: application/json" \
--data '{
    "build_id": <build_id>,
    "name": "My Build",
    "exec_file": "MyBuild.exe"
}'

Important

The exec_file have to correspond to the game executable in the build directory, or else the tests won't run.

The response should look like this:

{
  "build_id": "01776768-2392-36df-67b4-d7b082c09399",
  "name": "My Build",
  "creation_date": "2021-02-03T10:20:35.257572Z",
  "exec_file": "MyBuild.exe",
  "links": {
    "self": "https://api.gameconductor.net/v1/builds/01776768-2392-36df-67b4-d7b082c09399",
    "runs": "https://api.gameconductor.net/v1/runs?build=01776768-2392-36df-67b4-d7b082c09399"
  }
}

Congratulation

Well done! You successfuly uploaded your build to Game Conductor. The new build should be visible in the builds section on the web UI.