Schema
The Xcode Server API consumes and produces JSON objects. Each type of object the Xcode Server uses has a defined structure, with certain expected properties.
Bot
{
/* Bot ID */
"_id": "bb5b5dfa1c4abff347d28bed7e00b381",
/* Revision ID */
"_rev": "5-a050220837762e423ee28a5e9c150844",
/* Configuration. See the section "Schema > Bot Configuration" for more information. */
"configuration": {
...
},
/* Name of the bot */
"name": "Sketch",
/* The integration counter
This number dictates the number that the next integration will be set to.
*/
"integration_counter": 2,
/* The document type */
"doc_type": "bot",
/* Last revision blueprint. See the section "Blueprint" for more information. */
"lastRevisionBlueprint": {
...
}
}
Bot Configuration
{
/* ----- Scheduling ----- */
/* Schedule type:
1: Periodically
2: On commit
3: Manual
*/
"scheduleType": 3,
/* Periodic schedule
1: Hourly
2: Daily
3: Weekly
Dependencies:
- 'scheduleType' set to 1 (Periodically)
*/
"periodicScheduleInterval": 0,
/* Minutes after the hour to integrate
Value: 0 to 59
Dependencies:
- 'periodicScheduleInterval' set to 1 (Hourly)
"minutesAfterHourToIntegrate": 0,
/* Hour of integration
Value: 0 (midnight) to 23
Dependencies:
- 'periodicScheduleInterval' set to 2 (Daily) or 3 (Weekly)
*/
"hourOfIntegration": 0,
/* Weekly schedule day
1: Monday
2: Tuesday
3: Wednesday
4: Thursday
5: Friday
6: Saturday
7: Sunday
Dependencies:
- 'periodicScheduleInterval' set to 3 (Weekly)
"weeklyScheduleDay": 0,
/* ----- General ----- */
/* Scheme name
The name of the scheme used to integrate.
*/
"schemeName": "dojo-testing",
/* Built from clean
0: Never
1: Always
2: Once a day
3: Once a week
*/
"builtFromClean": 0,
/* Configuration
Value: "Debug" | "Release" | "XXX" <- we need to set the value because if exists already,
devs cannot remove it (there is no support for it)
*/
"buildConfiguration": "Release",
/* ----- Actions ----- */
/* Performs analyze action
Value: true | false
*/
"performsAnalyzeAction": true,
/* Performs test action
Value: true | false
*/
"performsTestAction": true,
/* Performs archive action
Value: true | false
*/
"exportsProductFromArchive": true,
/* ----- Testing ----- */
/* Code coverage
1: Use scheme setting
2: Enabled
3: Disabled
Dependencies:
- 'performsTestAction' set to true
*/
"codeCoveragePreference": 1,
/* ----- Triggers ----- */
/* Triggers
Value: array of <Trigger>
Trigger:
phase: 1 (Before) | 2 (After)
scriptBody: string (script)
type:
name: string (title of the script)
conditions:
status: ???
onWarnings: true | false
onBuildErrors: true | false
onInternalErrors: true | false
onAnalyzerWarnings: true | false
onFailingTests: true | false
onSuccess: true | false
Dependencies:
- 'phase' set to 2 must specify Trigger property 'conditions'.
*/
"triggers": [
...
],
/* ----- Devices ----- */
/* Device specification
Value: array of <device ID>
Dependencies:
- 'performsTestAction' set to true
*/
"deviceSpecification": {
"filters": [
{
...
],
"deviceIdentifiers": [
...
]
},
/* ----- Blueprint ----- */
"sourceControlBlueprint": {
/* Unique identifier for each blueprint
Value: A valid UUID
*/
"DVTSourceControlWorkspaceBlueprintIdentifierKey": "34D1C3F9-E33F-4935-A5E4-7154F4309EDF",
/* Locations
Value: array of <Location>
Location:
DVTSourceControlBranchIdentifierKey: string (branch name)
DVTSourceControlBranchOptionsKey:
4 (normal remote branch) |
5 (primary remote branch, necessary for trunk-like branch in Subversion)
DVTSourceControlPathIdentifierKey: string (relative path in repository)
DVTSourceControlLocationRevisionKey: string (revision)
DVTSourceControlWorkspaceBlueprintLocationTypeKey: one of the following options:
"DVTSourceControlBranch" (Branch)
"DVTSourceControlPathLocation" (Path, Subversion-only)
"DVTSourceControlLockedRevisionLocation" (Revision, Git-only)
*/
"DVTSourceControlWorkspaceBlueprintLocationsKey": {
"47B0B4A0E6B2316DF0F333C188B6423A9479B516": {
"DVTSourceControlBranchIdentifierKey": "master",
"DVTSourceControlBranchOptionsKey": 5,
"DVTSourceControlWorkspaceBlueprintLocationTypeKey": "DVTSourceControlBranch"
}
},
/* The name for the blueprint, typically the name of the Xcode project or workspace
Value: string
*/
"DVTSourceControlWorkspaceBlueprintNameKey": "Project",
/* The identifier of the working copy containing the Xcode project or workspace to build,
considered the primary working copy.
Value: string (repository identifier)
*/
"DVTSourceControlWorkspaceBlueprintPrimaryRemoteRepositoryKey": "47B0B4A0E6B2316DF0F333C188B6423A9479B516",
/* The relative path in the primary working copy to the Xcode project or workspace to build
Value: string (relative path)
*/
"DVTSourceControlWorkspaceBlueprintRelativePathToProjectKey": "Project.xcworkspace",
/* Repositories
Value: array of <Repository>
Repository:
DVTSourceControlWorkspaceBlueprintRemoteRepositoryEnforceTrustCertFingerprintKey: true | false
DVTSourceControlWorkspaceBlueprintRemoteRepositoryTrustSelfSignedCertKey: true | false
DVTSourceControlWorkspaceBlueprintRemoteRepositoryIdentifierKey: string
DVTSourceControlWorkspaceBlueprintRemoteRepositorySystemKey:
"com.apple.dt.Xcode.sourcecontrol.Git" (Git) |
"com.apple.dt.Xcode.sourcecontrol.Subversion" (Subversion)
DVTSourceControlWorkspaceBlueprintRemoteRepositoryTrustedCertFingerprintKey: a string of one of the following fingerprint options:
RSA (SSH servers) |
MD5 (self-signed SSL server certificates)
DVTSourceControlWorkspaceBlueprintRemoteRepositoryURLKey: string (URI)
*/
"DVTSourceControlWorkspaceBlueprintRemoteRepositoriesKey": [
{
"DVTSourceControlWorkspaceBlueprintRemoteRepositoryEnforceTrustCertFingerprintKey": true,
"DVTSourceControlWorkspaceBlueprintRemoteRepositoryIdentifierKey": "47B0B4A0E6B2316DF0F333C188B6423A9479B516",
"DVTSourceControlWorkspaceBlueprintRemoteRepositorySystemKey": "com.apple.dt.Xcode.sourcecontrol.Git",
"DVTSourceControlWorkspaceBlueprintRemoteRepositoryTrustedCertFingerprintKey": "174F678B9ED220D9C8B2A47F42392A44",
"DVTSourceControlWorkspaceBlueprintRemoteRepositoryURLKey": "git@server:/repo.git"
}
],
/* Authentication strategies
Value: dictionary of string (repository identifier) to <Authentication>
Authentication:
DVTSourceControlWorkspaceBlueprintRemoteRepositoryAuthenticationTypeKey: one of the following options:
"DVTSourceControlAuthenticationStrategy" (Anonymous)
"DVTSourceControlBasicAuthenticationStrategy" (Username and Password)
"DVTSourceControlSSHKeysAuthenticationStrategy" (SSH Keys)
DVTSourceControlWorkspaceBlueprintRemoteRepositoryPasswordKey: string (Password or Passphrase)
DVTSourceControlWorkspaceBlueprintRemoteRepositoryUsernameKey: string (Username)
DVTSourceControlWorkspaceBlueprintRemoteRepositoryPublicKeyDataKey: string (Base64-encoded public key data)
DVTSourceControlWorkspaceBlueprintRemoteRepositoryPrivateKeyDataKey: string (Base64-encoded private key data)
*/
"DVTSourceControlWorkspaceBlueprintRemoteRepositoryAuthenticationStrategiesKey": {
"47B0B4A0E6B2316DF0F333C188B6423A9479B516": {
"DVTSourceControlWorkspaceBlueprintRemoteRepositoryAuthenticationTypeKey":
"DVTSourceControlBasicAuthenticationStrategy",
"DVTSourceControlWorkspaceBlueprintRemoteRepositoryPasswordKey": "foobar",
"DVTSourceControlWorkspaceBlueprintRemoteRepositoryUsernameKey": "git"
}
},
/* The blueprint format version
Value: 204
*/
"DVTSourceControlWorkspaceBlueprintVersion": 204,
/* Working copy layout
Value: dictionary of string (repository identifier) to string (relative path of checkout)
*/
"DVTSourceControlWorkspaceBlueprintWorkingCopyPathsKey": {
"47B0B4A0E6B2316DF0F333C188B6423A9479B516": "Project/"
}
}
}
Integration
{
/* Integration ID */
"_id": "bb5b5dfa1c4abff347d28bed7e00bf87",
/* Revision ID */
"_rev": "17-c23a1a6231571d17435af0f0ff1f4228",
/* Integration number */
"number": 1,
/* The result of the integration
Values:
succeeded
test-failures
build-errors
warnings
analyzer-warnings
build-failed
checkout-error
internal-error
internal-checkout-error
internal-build-error
internal-processing-error
canceled
trigger-error
unknown
*/
"result": "succeeded",
/* The number of successful continuous integrations */
"success_streak": 1,
/* The bot snapshot. See the section "Schema > Bot" for more information. */
"bot": {
...
},
/* */
"shouldClean": false,
/* The document type */
"doc_type": "integration",
/* The current step of the integration */
"currentStep": "completed",
/* The date when the integration was triggered */
"queuedDate": "2015-08-03T17:26:53.183Z",
/* The date when the integration started */
"startedTime": "2015-08-03T17:26:53.786Z",
/* The date when the integration finished */
"endedTime": "2015-08-03T17:27:15.050Z",
/* The duration of the integration (in seconds) */
"duration": 21.264,
/* Revision blueprint. See the section "Blueprint" for more information. */
"revisionBlueprint": {
...
},
/* The build results summary
Values:
errorCount: number of errors detected in the Build phase
errorChange: number of errors delta with the previous integration
warningCount: number of warnings detected in the Build phase
warningChange: number of warnings delta with the previous integration
analyzerWarningCount: number of warnings detected in the Analysis phase
analyzerWarningChange: number of warnings delta with the previous integration
testsCount: number of tests to be executed
testsChange: number of tests delta with the previous integration
testFailureCount: number of failed tests
testFailureChange: number of failed tests delta with the previous integration
regressedPerfTestCount: number of regressed performance tests
improvedPerfTestCount: number of improved performance tests
codeCoveragePercentage: coverage percentage
codeCoveragePercentageDelta: coverage percentage delta with the previous integration
*/
"buildResultSummary": {
"errorCount": 0,
"errorChange": 0,
"warningCount": 0,
"warningChange": 0,
"analyzerWarningCount": 0,
"analyzerWarningChange": 0,
"testsCount": 220,
"testsChange": 220,
"testFailureCount": 0,
"testFailureChange": 0,
"regressedPerfTestCount": 0,
"improvedPerfTestCount": 0,
"codeCoveragePercentage": 71,
"codeCoveragePercentageDelta": 0
}
}
Issue
{
/*
The top-level properties are the following:
errors
testFailures
analyzerWarnings
warnings
buildServiceErrors
buildServiceWarnings
Each of these properties (except for buildServiceErrors and buildServiceWarnings) contains the following sub-properties:
freshIssues: new issues that appeared in the integration
unresolvedIssues: issues that appeared before and have not been resolved yet
resolvedIssues: issues that appeared before and have been resolved
Each of these sub-properties are arrays containing one or more elements with the following structure
{
/* Issue status
0: New
1: Unresolved
2: Resolved
*/
"status": 1,
/* The document file path
Under some circumstances, the file may not exist (i.e. the issue is a test failure).
*/
"documentFilePath": "<unknown>",
/* The name of the test */
"testCase": "-[TestKVOConditionValidator testAsyncCallback]",
/* The reason for the issue */
"message": "Test process exited unexpectedly.",
/* The associated integration ID where this issue was first discovered */
"integrationID": "ee61c2f211a21ebd39d697f056924f2d",
/* Number of integrations since the issue appeared */
"age": 5,
/* Issue type
Values:
error
warning
analyzerWarning
testFailure
buildServiceError
buildServiceWarning
triggerError
unknown
*/
"type": "testFailure",
/* A list of commits associated with the integration. See the section "Schema > Commit" for more information. */
"commits": [
]
}
*/
/* Issue ID */
"_id": "0c613a043b42f4ff8ee13ef6c61abe9a",
/* revision ID */
"_rev": "3-339372917d7245edf03ae553db9f7f89",
"errors": {
"unresolvedIssues": [
],
"resolvedIssues": [
],
"freshIssues": [
]
},
"testFailures": {
"unresolvedIssues": [
],
"resolvedIssues": [
],
"freshIssues": [
]
},
"buildServiceWarnings": [
],
"analyzerWarnings": {
"unresolvedIssues": [
],
"resolvedIssues": [
],
"freshIssues": [
]
},
"buildServiceErrors": [
],
"warnings": {
"unresolvedIssues": [
],
"resolvedIssues": [
],
"freshIssues": [
]
},
/* Integration ID */
"integration": "b76633a9c3974e21c2f263f6849ecf60",
/* The document type */
"doc_type": "issue"
}
Commit List
{
/* Commit ID */
"_id": "b31ad8317300e89b2db73aad3d0194ad",
/* Revision ID */
"_rev": "3-7fda81759371fb8644058c0cfc83737e",
/* The list of commits per repository */
"commits": {
/* Repository ID (matched against the bot blueprint) */
"6446FCB001D8C2E70EC59D119F3E3318109CE1A9": [
{
/* A list of commits objects. See the section "Schema > Commit" for more information. */
}
]
},
/* Integration ID */
"integration": "b31ad8317300e89b2db73aad3d049327",
/* Bot ID */
"botID": "b31ad8317300e89b2db73aad3d048d19",
/* The document type */
"doc_type": "commit"
}
Commit
{
/* List of file paths and SCM file status
File status codes:
1: Added
2: Deleted
4: Modified
8: Modified Properties
*/
"XCSCommitCommitChangeFilePaths": [
{
/* SCM status */
"status": 4,
"filePath": "Sketch.xcodeproj/project.pbxproj"
}
],
/* Commit message */
"XCSCommitMessage": "Remove run scripts (is obsolete and was causing a warning)",
/* Blueprint repository ID */
"XCSBlueprintRepositoryID": "6446FCB001D8C2E70EC59D119F3E3318109CE1A9",
/* Commit contributor list */
"XCSCommitContributor": {
/* List of emails associated with the user */
"XCSContributorEmails": [
"appleseed@mycompany.com"
],
/* Name of the contributor */
"XCSContributorName": "John Appleseed",
/* Display name of the contributor */
"XCSContributorDisplayName": "John Appleseed"
},
/* Commit hash */
"XCSCommitHash": "3982fd5a6dd349c3673c9f91a96baf69eedc44a1",
/* Commit timestamp */
"XCSCommitTimestamp": "2015-06-19T18:37:31.000Z"
}
Copyright © 2018 Apple Inc. All rights reserved. Terms of Use | Privacy Policy | Updated: 2016-03-21