2015-09-25 23:29:35 +03:00
|
|
|
$schema: "http://json-schema.org/draft-04/schema#"
|
|
|
|
title: "Job Definition"
|
|
|
|
description: |
|
|
|
|
Definition of a single job that can be added to Treeherder
|
|
|
|
Project is determined by the routing key, so we don't need to specify it here.
|
|
|
|
id: "jobDefinition"
|
|
|
|
type: "object"
|
|
|
|
properties:
|
2016-01-30 02:17:07 +03:00
|
|
|
taskId:
|
|
|
|
title: "taskId"
|
2016-05-02 19:26:34 +03:00
|
|
|
description: |
|
2016-01-30 02:17:07 +03:00
|
|
|
This could just be what was formerly submitted as a job_guid in the
|
|
|
|
REST API.
|
2015-09-25 23:29:35 +03:00
|
|
|
type: "string"
|
2016-05-02 19:26:34 +03:00
|
|
|
pattern: "^[A-Za-z0-9/+-]+$"
|
2015-09-25 23:29:35 +03:00
|
|
|
minLength: 1
|
|
|
|
maxLength: 50
|
2016-01-30 02:17:07 +03:00
|
|
|
retryId:
|
|
|
|
title: "retryId"
|
|
|
|
description: |
|
|
|
|
The infrastructure retry iteration on this job. The number of times this
|
|
|
|
job has been retried by the infrastructure.
|
|
|
|
If it's the 1st time running, then it should be 0. If this is the first
|
|
|
|
retry, it will be 1, etc.
|
|
|
|
type: "integer"
|
|
|
|
default: 0
|
|
|
|
minimum: 0
|
|
|
|
|
|
|
|
isRetried:
|
|
|
|
description: True indicates this job has been retried.
|
|
|
|
type: "boolean"
|
2015-09-25 23:29:35 +03:00
|
|
|
|
2016-06-16 00:19:06 +03:00
|
|
|
buildSystem:
|
|
|
|
description: |
|
|
|
|
The name of the build system that initiated this content. Some examples
|
|
|
|
are "buildbot" and "taskcluster". But this could be any name. This
|
|
|
|
value will be used in the routing key for retriggering jobs in the
|
|
|
|
publish-job-action task.
|
|
|
|
type: "string"
|
|
|
|
pattern: "^[\\w-]+$"
|
|
|
|
minLength: 1
|
|
|
|
maxLength: 25
|
|
|
|
|
2015-09-25 23:29:35 +03:00
|
|
|
origin:
|
2016-01-30 02:17:07 +03:00
|
|
|
oneOf:
|
2015-09-25 23:29:35 +03:00
|
|
|
- type: "object"
|
2016-06-03 23:24:59 +03:00
|
|
|
description: |
|
|
|
|
PREFERRED: An HG job that only has a revision. This is for all
|
|
|
|
jobs going forward.
|
2015-09-25 23:29:35 +03:00
|
|
|
properties:
|
|
|
|
kind:
|
|
|
|
type: "string"
|
|
|
|
enum: ['hg.mozilla.org']
|
|
|
|
project:
|
|
|
|
type: "string"
|
2016-05-02 19:26:34 +03:00
|
|
|
pattern: "^[\\w-]+$"
|
2015-09-25 23:29:35 +03:00
|
|
|
minLength: 1
|
|
|
|
maxLength: 50
|
|
|
|
revision:
|
|
|
|
type: "string"
|
|
|
|
pattern: "^[0-9a-f]+$"
|
2015-10-09 03:39:07 +03:00
|
|
|
minLength: 40
|
2015-09-25 23:29:35 +03:00
|
|
|
maxLength: 40
|
|
|
|
pushLogID:
|
|
|
|
type: "integer"
|
|
|
|
required: [kind, project, revision]
|
|
|
|
|
2016-06-03 23:24:59 +03:00
|
|
|
- type: "object"
|
|
|
|
description: |
|
|
|
|
BACKWARD COMPATABILITY: An HG job that only has a revision_hash.
|
|
|
|
Some repos like mozilla-beta have not yet merged in the code that
|
|
|
|
allows them access to the revision.
|
|
|
|
properties:
|
|
|
|
kind:
|
|
|
|
type: "string"
|
|
|
|
enum: ['hg.mozilla.org']
|
|
|
|
project:
|
|
|
|
type: "string"
|
|
|
|
pattern: "^[\\w-]+$"
|
|
|
|
minLength: 1
|
|
|
|
maxLength: 50
|
|
|
|
revision_hash:
|
|
|
|
type: "string"
|
|
|
|
pattern: "^[0-9a-f]+$"
|
|
|
|
minLength: 40
|
|
|
|
maxLength: 40
|
|
|
|
pushLogID:
|
|
|
|
type: "integer"
|
|
|
|
required: [kind, project, revision_hash]
|
|
|
|
|
2015-09-25 23:29:35 +03:00
|
|
|
- type: "object"
|
|
|
|
properties:
|
|
|
|
kind:
|
|
|
|
type: "string"
|
|
|
|
enum: ['github.com']
|
2016-01-30 02:17:07 +03:00
|
|
|
owner:
|
|
|
|
description: |
|
|
|
|
This could be the organization or the individual git username
|
|
|
|
depending on who owns the repo.
|
|
|
|
type: "string"
|
2016-05-02 19:26:34 +03:00
|
|
|
pattern: "^[\\w-]+$"
|
2016-01-30 02:17:07 +03:00
|
|
|
minLength: 1
|
|
|
|
maxLength: 50
|
2016-05-02 19:26:34 +03:00
|
|
|
project:
|
2015-09-25 23:29:35 +03:00
|
|
|
type: "string"
|
2016-05-02 19:26:34 +03:00
|
|
|
pattern: "^[\\w-]+$"
|
2015-09-25 23:29:35 +03:00
|
|
|
minLength: 1
|
|
|
|
maxLength: 50
|
|
|
|
revision:
|
|
|
|
type: "string"
|
|
|
|
minLength: 40
|
|
|
|
maxLength: 40
|
|
|
|
pullRequestID:
|
|
|
|
type: "integer"
|
|
|
|
required: [kind, project, revision]
|
|
|
|
|
|
|
|
display:
|
|
|
|
type: "object"
|
|
|
|
properties:
|
|
|
|
jobSymbol:
|
|
|
|
title: "jobSymbol"
|
|
|
|
type: "string"
|
2016-01-30 02:17:07 +03:00
|
|
|
minLength: 0
|
2015-09-25 23:29:35 +03:00
|
|
|
maxLength: 25
|
2016-01-30 02:17:07 +03:00
|
|
|
chunkId:
|
|
|
|
title: "chunkId"
|
|
|
|
type: "integer"
|
|
|
|
minimum: 1
|
|
|
|
chunkCount:
|
|
|
|
title: "chunkCount"
|
|
|
|
type: "integer"
|
|
|
|
minimum: 1
|
2015-09-25 23:29:35 +03:00
|
|
|
groupSymbol:
|
|
|
|
title: "group symbol"
|
|
|
|
type: "string"
|
|
|
|
minLength: 1
|
|
|
|
maxLength: 25
|
|
|
|
jobName:
|
|
|
|
title: "job name"
|
|
|
|
type: "string"
|
|
|
|
minLength: 1
|
|
|
|
maxLength: 100
|
|
|
|
groupName:
|
|
|
|
title: "group name"
|
|
|
|
type: "string"
|
|
|
|
minLength: 1
|
|
|
|
maxLength: 100
|
|
|
|
required:
|
2016-05-02 19:26:34 +03:00
|
|
|
- jobName
|
|
|
|
- jobSymbol
|
2015-09-25 23:29:35 +03:00
|
|
|
- groupSymbol
|
|
|
|
|
|
|
|
|
|
|
|
state:
|
|
|
|
title: "state"
|
|
|
|
description: |
|
|
|
|
unscheduled: not yet scheduled
|
|
|
|
pending: not yet started
|
|
|
|
running: currently in progress
|
|
|
|
completed: Job ran through to completion
|
|
|
|
type: "string"
|
|
|
|
enum:
|
|
|
|
- unscheduled
|
|
|
|
- pending
|
|
|
|
- running
|
|
|
|
- completed
|
|
|
|
result:
|
|
|
|
title: "result"
|
|
|
|
description: |
|
|
|
|
fail: A failure
|
|
|
|
exception: An infrastructure error/exception
|
|
|
|
success: Build/Test executed without error or failure
|
|
|
|
canceled: The job was cancelled by a user
|
|
|
|
unknown: When the job is not yet completed
|
|
|
|
type: "string"
|
|
|
|
enum:
|
|
|
|
- success
|
|
|
|
- fail
|
|
|
|
- exception
|
|
|
|
- canceled
|
2017-09-27 02:34:09 +03:00
|
|
|
- superseded
|
2015-09-25 23:29:35 +03:00
|
|
|
- unknown
|
|
|
|
jobKind:
|
|
|
|
type: "string"
|
2016-01-30 02:17:07 +03:00
|
|
|
default: "other"
|
2015-09-25 23:29:35 +03:00
|
|
|
enum:
|
|
|
|
- build
|
|
|
|
- test
|
2016-01-30 02:17:07 +03:00
|
|
|
- other
|
2015-09-25 23:29:35 +03:00
|
|
|
tier:
|
|
|
|
type: "integer"
|
|
|
|
minimum: 1
|
|
|
|
maximum: 3
|
|
|
|
|
|
|
|
coalesced:
|
2016-01-30 02:17:07 +03:00
|
|
|
description: The job guids that were coalesced to this job.
|
2015-09-25 23:29:35 +03:00
|
|
|
title: "coalesced"
|
|
|
|
type: "array"
|
|
|
|
items:
|
|
|
|
title: "job guid"
|
|
|
|
type: "string"
|
2016-05-02 19:26:34 +03:00
|
|
|
pattern: "^[\\w/+-]+$"
|
2015-09-25 23:29:35 +03:00
|
|
|
minLength: 1
|
|
|
|
maxLength: 50
|
|
|
|
|
|
|
|
|
|
|
|
# time data
|
|
|
|
timeScheduled:
|
|
|
|
type: "string"
|
|
|
|
format: "date-time"
|
|
|
|
timeStarted:
|
|
|
|
type: "string"
|
|
|
|
format: "date-time"
|
|
|
|
timeCompleted:
|
|
|
|
type: "string"
|
|
|
|
format: "date-time"
|
|
|
|
|
2016-01-30 02:17:07 +03:00
|
|
|
labels:
|
|
|
|
title: "labels"
|
2015-09-25 23:29:35 +03:00
|
|
|
description: |
|
2016-01-30 02:17:07 +03:00
|
|
|
Labels are a dimension of a platform. The values here can vary wildly,
|
|
|
|
so most strings are valid for this. The list of labels that are used
|
2015-09-25 23:29:35 +03:00
|
|
|
is maleable going forward.
|
|
|
|
|
2016-01-30 02:17:07 +03:00
|
|
|
These were formerly known as "Options" within "Option Collections" but
|
|
|
|
calling labels now so they can be understood to be just strings that
|
|
|
|
denotes a characteristic of the job.
|
|
|
|
|
|
|
|
Some examples of labels that have been used:
|
2015-09-25 23:29:35 +03:00
|
|
|
opt Optimize Compiler GCC optimize flags
|
|
|
|
debug Debug flags passed in
|
|
|
|
pgo Profile Guided Optimization - Like opt, but runs with profiling, then builds again using that profiling
|
|
|
|
asan Address Sanitizer
|
|
|
|
tsan Thread Sanitizer Build
|
|
|
|
type: "array"
|
|
|
|
items:
|
|
|
|
type: "string"
|
|
|
|
minLength: 1
|
|
|
|
maxLength: 50
|
2016-05-02 19:26:34 +03:00
|
|
|
pattern: "^[\\w-]+$"
|
2015-09-25 23:29:35 +03:00
|
|
|
|
2016-01-30 02:17:07 +03:00
|
|
|
owner:
|
|
|
|
description: |
|
|
|
|
Description of who submitted the job: gaia | scheduler name | username | email
|
|
|
|
title: "owner"
|
2015-09-25 23:29:35 +03:00
|
|
|
type: "string"
|
|
|
|
minLength: 1
|
|
|
|
maxLength: 50
|
|
|
|
reason:
|
|
|
|
description: |
|
|
|
|
Examples include:
|
|
|
|
- scheduled
|
|
|
|
- scheduler
|
|
|
|
- Self-serve: Rebuilt by foo@example.com
|
|
|
|
- Self-serve: Requested by foo@example.com
|
|
|
|
- The Nightly scheduler named 'b2g_mozilla-inbound periodic' triggered this build
|
|
|
|
- unknown
|
|
|
|
type: "string"
|
|
|
|
minLength: 1
|
|
|
|
maxLength: 125
|
|
|
|
productName:
|
|
|
|
description: |
|
|
|
|
Examples include:
|
|
|
|
- 'b2g'
|
|
|
|
- 'firefox'
|
|
|
|
- 'taskcluster'
|
|
|
|
- 'xulrunner'
|
|
|
|
type: "string"
|
|
|
|
minLength: 1
|
|
|
|
maxLength: 125
|
|
|
|
|
|
|
|
buildMachine:
|
|
|
|
$ref: "#/definitions/machine"
|
|
|
|
runMachine:
|
|
|
|
$ref: "#/definitions/machine"
|
|
|
|
|
2016-01-30 02:17:07 +03:00
|
|
|
jobInfo:
|
|
|
|
description: |
|
|
|
|
Definition of the Job Info for a job. These are extra data
|
|
|
|
fields that go along with a job that will be displayed in
|
|
|
|
the details panel within Treeherder.
|
|
|
|
id: "jobInfo"
|
|
|
|
type: object
|
|
|
|
properties:
|
|
|
|
summary:
|
|
|
|
type: string
|
|
|
|
description: |
|
|
|
|
Plain text description of the job and its state. Submitted with
|
|
|
|
the final message about a task.
|
|
|
|
links:
|
|
|
|
type: array
|
|
|
|
items:
|
|
|
|
- type: object
|
2015-09-25 23:29:35 +03:00
|
|
|
description: |
|
2016-01-30 02:17:07 +03:00
|
|
|
List of URLs shown as key/value pairs. Shown as:
|
|
|
|
"<label>: <linkText>" where linkText will be a link to the url.
|
|
|
|
properties:
|
|
|
|
url:
|
|
|
|
type: string
|
2017-04-04 21:56:32 +03:00
|
|
|
format: uri
|
2016-07-09 00:33:57 +03:00
|
|
|
maxLength: 512
|
2016-01-30 02:17:07 +03:00
|
|
|
linkText:
|
|
|
|
type: string
|
|
|
|
minLength: 1
|
2016-07-09 00:33:57 +03:00
|
|
|
maxLength: 125
|
2016-01-30 02:17:07 +03:00
|
|
|
label:
|
|
|
|
type: string
|
|
|
|
minLength: 1
|
2016-07-09 00:33:57 +03:00
|
|
|
maxLength: 70
|
2016-01-30 02:17:07 +03:00
|
|
|
additionalProperties: false
|
|
|
|
required:
|
|
|
|
- url
|
|
|
|
- linkText
|
|
|
|
- label
|
|
|
|
additionalProperties: false
|
2015-09-25 23:29:35 +03:00
|
|
|
|
|
|
|
logs:
|
|
|
|
type: "array"
|
|
|
|
items:
|
|
|
|
type: "object"
|
|
|
|
properties:
|
|
|
|
url:
|
|
|
|
type: "string"
|
|
|
|
format: "uri"
|
|
|
|
minLength: 1
|
|
|
|
maxLength: 255
|
|
|
|
name:
|
|
|
|
type: "string"
|
|
|
|
minLength: 1
|
|
|
|
maxLength: 50
|
2016-01-30 02:17:07 +03:00
|
|
|
steps:
|
|
|
|
type: array
|
|
|
|
description: |
|
|
|
|
This object defines what is seen in the Treeherder Log Viewer.
|
|
|
|
These values can be submitted here, or they will be generated
|
|
|
|
by Treeherder's internal log parsing process from the
|
|
|
|
submitted log. If this value is submitted, Treeherder will
|
|
|
|
consider the log already parsed and skip parsing.
|
|
|
|
items:
|
|
|
|
type: object
|
|
|
|
properties:
|
|
|
|
errors:
|
|
|
|
type: array
|
|
|
|
items:
|
|
|
|
type: object
|
|
|
|
properties:
|
|
|
|
line:
|
|
|
|
type: string
|
|
|
|
minLength: 1
|
|
|
|
maxLength: 255
|
|
|
|
linenumber:
|
|
|
|
type: integer
|
|
|
|
minimum: 0
|
|
|
|
additionalProperties: false
|
|
|
|
name:
|
|
|
|
type: string
|
|
|
|
minLength: 1
|
|
|
|
maxLength: 255
|
|
|
|
timeStarted:
|
|
|
|
type: string
|
|
|
|
format: date-time
|
|
|
|
timeFinished:
|
|
|
|
type: string
|
|
|
|
format: date-time
|
|
|
|
lineStarted:
|
|
|
|
type: integer
|
|
|
|
minimum: 0
|
|
|
|
lineFinished:
|
|
|
|
type: integer
|
|
|
|
minimum: 0
|
|
|
|
result:
|
|
|
|
type: string
|
|
|
|
enum:
|
|
|
|
- success
|
|
|
|
- fail
|
|
|
|
- exception
|
|
|
|
- canceled
|
|
|
|
- unknown
|
|
|
|
required:
|
|
|
|
- name
|
|
|
|
- timeStarted
|
|
|
|
- lineStarted
|
|
|
|
- lineFinished
|
|
|
|
- timeFinished
|
|
|
|
- result
|
|
|
|
errorsTruncated:
|
|
|
|
type: boolean
|
|
|
|
description: |
|
|
|
|
If true, indicates that the number of errors in the log was too
|
|
|
|
large and not all of those lines are indicated here.
|
|
|
|
additionalProperties: false
|
2015-09-25 23:29:35 +03:00
|
|
|
required: [url, name]
|
|
|
|
|
2016-01-30 02:17:07 +03:00
|
|
|
extra:
|
|
|
|
type: "object"
|
|
|
|
description: Extra information that Treeherder reads on a best-effort basis
|
2016-05-02 19:26:34 +03:00
|
|
|
version:
|
|
|
|
type: "integer"
|
|
|
|
|
2016-01-30 02:17:07 +03:00
|
|
|
|
2015-09-25 23:29:35 +03:00
|
|
|
additionalProperties: false
|
|
|
|
required:
|
2016-01-30 02:17:07 +03:00
|
|
|
- taskId
|
2015-09-25 23:29:35 +03:00
|
|
|
- origin
|
2016-06-16 00:19:06 +03:00
|
|
|
- buildSystem
|
2015-09-25 23:29:35 +03:00
|
|
|
- display
|
|
|
|
- state
|
|
|
|
- jobKind
|
2016-05-02 19:26:34 +03:00
|
|
|
- version
|
2015-09-25 23:29:35 +03:00
|
|
|
|
|
|
|
definitions:
|
|
|
|
machine:
|
|
|
|
type: "object"
|
|
|
|
properties:
|
|
|
|
name:
|
|
|
|
type: "string"
|
2016-05-02 19:26:34 +03:00
|
|
|
pattern: "^[\\w-]+$"
|
2015-09-25 23:29:35 +03:00
|
|
|
minLength: 1
|
|
|
|
maxLength: 50
|
|
|
|
platform:
|
|
|
|
type: "string"
|
2016-05-02 19:26:34 +03:00
|
|
|
pattern: "^[\\w-]+$"
|
2015-09-25 23:29:35 +03:00
|
|
|
minLength: 1
|
2016-05-02 19:26:34 +03:00
|
|
|
maxLength: 100
|
2015-09-25 23:29:35 +03:00
|
|
|
os:
|
|
|
|
type: "string"
|
2016-05-02 19:26:34 +03:00
|
|
|
pattern: "^[\\w-]+$"
|
2015-09-25 23:29:35 +03:00
|
|
|
minLength: 1
|
|
|
|
maxLength: 25
|
|
|
|
architecture:
|
|
|
|
type: "string"
|
2016-05-02 19:26:34 +03:00
|
|
|
pattern: "^[\\w-]+$"
|
2015-09-25 23:29:35 +03:00
|
|
|
minLength: 1
|
|
|
|
maxLength: 25
|
|
|
|
required:
|
|
|
|
- platform
|
|
|
|
- os
|
|
|
|
- architecture
|