Skip to content

Build Server Protocol

For the Build Server controller to work with a game project, two files are required: build_config.json (input) and build_result.json (output).

build_config.json

Defined in the Build/ folder of your game project repository before a build can be ordered. The Build Server controller fetches this file based on the selected game, branch, and revision, and uses it to render the “Order new” UI.

builds

A required list of supported build configurations.

KeyRequiredTypeDescription
idYesstringUnique identifier for the build configuration
display_nameYesstringHuman-readable name shown in the UI
builderYesstringFile that kickstarts the client builder
pipelineNostringPipeline definition YAML to execute
platformYesstringTarget platform (ios, android, kindle)
kindYesstringBuild kind (build, bundle, cache, custom)
typeYesstringBuild type (inhouse, store, beta, qa, upload)
configuration_fileNostringConfiguration file name (e.g. ios_inhouse)
requirementsNoobjectBuild-specific requirements that override root-level values
hiddenNobooleanIf true, hides this build from the UI

settings

UI elements for customising build parameters when ordering. Each setting is defined with a {setting_name} key (must be snake_case).

KeyRequiredTypeDescription
display_nameYesstringLabel shown in the UI
typeYesstringInput type (see below)
groupNostringGroups UI elements together (e.g. “Advanced”, “Settings”)
valuesNo*string[]Options for checkbox, radio, or select types
multiNobooleanEnable multi-select (for select/checkbox types)
defaultNoanyDefault value
requiredNobooleanMust have a value before ordering
hiddenNobooleanHidden from UI (useful for API-only settings)

Supported input types:

TypeDescription
checkboxCheckbox (single or multiple with values)
radioRadio buttons (always requires values)
selectDropdown (requires values)
numberNumeric input
textText input
switchToggle (true/false)

requirements

Tools and versions required on the build agent. Can be defined at root level or per-build (build-level overrides root).

"requirements": {
"unity": "6000.0.23f1"
}

The {requirement} key must match the supported_tools attribute exposed by the build agent.

actions

Post-build actions that can be triggered automatically or manually. See the Actions section below.

build_pipeline

Instructs the agent to checkout a specific branch of the build pipeline.

"build_pipeline": {
"branch": "v1"
}

Example

{
"builds": [
{
"id": 0,
"display_name": "iOS (store)",
"builder": "some_path/ios_magic_build.sh",
"platform": "ios",
"kind": "build",
"type": "store"
},
{
"id": 1,
"display_name": "Android (store)",
"builder": "another_path/build.py",
"pipeline": "Build/Pipeline/definitions/android/store.yml",
"platform": "android",
"kind": "build",
"type": "store",
"requirements": {
"sdk": "1.2.3"
}
}
],
"settings": {
"skip_tests": {
"display_name": "Skip Tests",
"type": "switch",
"group": "Settings"
},
"precompiler_directives": {
"display_name": "Precompiler Directives",
"type": "select",
"group": "Advanced",
"multi": true,
"values": ["enable_cheat", "enable_debug_logs", "disable_skip"]
}
},
"requirements": {
"unity": "6000.0.23f1"
},
"version": 1,
"build_pipeline": {
"branch": "v1"
}
}

build_result.json

Generated by the build process to communicate status back to the controller. It should be updated progressively as the build runs, not just at the end.

Top-level fields

KeyRequiredTypeDescription
versionYesnumberSchema version
main_artifactNoartifactDownloadable build (used for the download/install button)
stepsYesstep[]List of build steps with status
version_nameYesstringResolved marketing version
product_nameNo*stringApp title as installed (*required for iOS)
package_nameNo*stringBundle identifier (*required for iOS)
version_codeNo*stringBundle version, usually SVN revision (*required for iOS)
commitsNoartifactArtifact containing the commit file
changelogNoartifactArtifact containing the changelog
release_candidateNobooleanWhether this build can be uploaded to stores

step

KeyRequiredTypeDescription
nameYesstringStep name
stateYesstringpending, running, skipped, failed, or done
startNostringTimestamp when the step started
endNostringTimestamp when the step ended
log_fileNoartifactLog file for this step
artifactsNoartifact[]Artifacts produced by this step
warningsNowarning[]Warnings generated by this step

artifact

KeyRequiredTypeDescription
fileYesstringPath under artifacts/ with extension
groupNostringGrouping label
sizeNostringFile size in bytes
typeNostringMIME type

warning

KeyRequiredTypeDescription
messageYesstringDescription of the warning
levelYesstringinfo, warning, or error

Actions

Actions are defined in the actions array of build_config.json. They trigger HTTP requests either automatically after a successful build or manually from the build detail page.

Action properties

KeyRequiredTypeDescription
nameYesstringUnique identifier
display_nameYesstringButton label in the UI
triggerYesenumautomatic (after build succeeds) or manual
hiddenNobooleanHide from the UI actions list
available_statesNostring[]States where the action is available (finished, cancelled, running, queued, failed). Defaults to after success only.
prerequisitesNoobjectKey-value filters to match builds (e.g. "releaseCandidate": true)
requestYesobjectHTTP request with template variables
settingsNoobjectInput fields shown in a dialog before triggering

Template variables

Actions support template variables that are replaced at runtime:

  • <<build.projectName>>, <<build.buildNumber>>, <<build.branch>>, <<build.revision>>
  • <<user.authorization>>
  • <<buildAgent._id>>
  • <<settings.{setting_name}>>