Xcode Server defines a number of built-in environment variables, which you may use in Run Script build phases that execute as part of your integration, in pre-integration triggers, and in post-integration triggers. Information provided by some of these variables is useful when making Xcode Server API requests. For more information, see Xcode Server API Reference.
In addition to the built-in Xcode Server environment variables, you can also define custom environment variables when you create a bot or on the Arguments pane, when you edit a bot.
Variable | Description | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
| The value of this variable is always Available in Xcode 7 and later. | ||||||||||
| The name of the bot being run. Available in Xcode 7 and later. | ||||||||||
| The ID of the bot. Bot IDs can be used in Xcode Server API requests. Available in Xcode 7 and later. | ||||||||||
| A short version of a bot ID. Some Xcode Server API requests use this information. Available in Xcode 7 and later. | ||||||||||
| The ID of the integration. Bot IDs can be used in Xcode Server API requests. Available in Xcode 7 and later. | ||||||||||
| A short version of an integration ID. Some Xcode Server API requests use this information. Available in Xcode 7 and later. | ||||||||||
| The number of times the integration has been run. Available in Xcode 7 and later. | ||||||||||
| A string indicating the result of the integration, such as Available in Xcode 7 and later. | ||||||||||
| The top-level directory containing source code repositories for Xcode Server. For the path to a repository itself, see Available in Xcode 7 and later. | ||||||||||
| The top-level directory where resources, including logs and products, are stored during integration. Available in Xcode 7 and later. | ||||||||||
| The derived data directory. Xcode Server builds in a non-standard location, so this directory is bot-specific. Available in Xcode 7 and later. | ||||||||||
| The path to an output file produced by the Available in Xcode 7 and later. | ||||||||||
| The path to the Available in Xcode 7 and later. | ||||||||||
| The path to the Available in Xcode 7 and later. | ||||||||||
| The total number of errors encountered during the integration. Available in Xcode 7 and later. | ||||||||||
| The change in error count since the previous integration. This value can be negative. Available in Xcode 7 and later. | ||||||||||
| The total number of warnings encountered during the integration. Available in Xcode 7 and later. | ||||||||||
| The change in warning count since the previous integration. This value can be negative. Available in Xcode 7 and later. | ||||||||||
| The total number of static analyzer warnings encountered during the integration. Available in Xcode 7 and later. | ||||||||||
| The change in static analyzer warning count since the previous integration. This value can be negative. Available in Xcode 7 and later. | ||||||||||
| The total number of test failures encountered during the integration. Available in Xcode 7 and later. | ||||||||||
| The change in test failure count since the previous integration. This value can be negative. Available in Xcode 7 and later. | ||||||||||
| The total number of tests performed by the integration. Available in Xcode 7 and later. | ||||||||||
| The change in test count since the previous integration. This value can be negative. Available in Xcode 7 and later. | ||||||||||
| The path to a property list file ( Available in Xcode 8 and later. | ||||||||||
| The directory containing any thinned Available in Xcode 8 and later. | ||||||||||
| The path to the source code repository for the Xcode project or workspace being integrated. For the parent directory containing the source code repositories for Xcode Server, see Available in Xcode 8 and later. | ||||||||||
| The branch of the primary source code repository used to check out the project or workspace being integrated. Only used when checking out a branch. Available in Xcode 8 and later. | ||||||||||
| The tag of the primary source code repository used to check out the project or workspace being integrated. Only used when checking out a tag. Available in Xcode 8 and later. | ||||||||||
| The remote source control revision number of the commit used to check out the project or workspace being integrated out of the primary source code repository. Only used when not checking out a branch or a tag. Available in Xcode 8 and later. |