Bug 1350390: make fields that were unnecesarily optional, required; r=Callek
Docker-worker's `command` field is actually not required, as it will run a docker image's default command when command is not specified. MozReview-Commit-ID: I3vBHeixlxW
This commit is contained in:
@@ -48,7 +48,7 @@ def docker_worker_spidermonkey(config, job, taskdesc, schema=sm_run_schema):
|
|||||||
|
|
||||||
docker_worker_add_public_artifacts(config, job, taskdesc)
|
docker_worker_add_public_artifacts(config, job, taskdesc)
|
||||||
|
|
||||||
env = worker['env']
|
env = worker.setdefault('env', {})
|
||||||
env.update({
|
env.update({
|
||||||
'MOZHARNESS_DISABLE': 'true',
|
'MOZHARNESS_DISABLE': 'true',
|
||||||
'SPIDERMONKEY_VARIANT': run['spidermonkey-variant'],
|
'SPIDERMONKEY_VARIANT': run['spidermonkey-variant'],
|
||||||
|
|||||||
@@ -201,11 +201,12 @@ task_description_schema = Schema({
|
|||||||
# environment variables
|
# environment variables
|
||||||
Required('env', default={}): {basestring: taskref_or_string},
|
Required('env', default={}): {basestring: taskref_or_string},
|
||||||
|
|
||||||
# the command to run
|
# the command to run; if not given, docker-worker will default to the
|
||||||
'command': [taskref_or_string],
|
# command in the docker image
|
||||||
|
Optional('command'): [taskref_or_string],
|
||||||
|
|
||||||
# the maximum time to run, in seconds
|
# the maximum time to run, in seconds
|
||||||
'max-run-time': int,
|
Required('max-run-time'): int,
|
||||||
|
|
||||||
# the exit status code that indicates the task should be retried
|
# the exit status code that indicates the task should be retried
|
||||||
Optional('retry-exit-status'): int,
|
Optional('retry-exit-status'): int,
|
||||||
@@ -214,7 +215,7 @@ task_description_schema = Schema({
|
|||||||
Required('implementation'): 'generic-worker',
|
Required('implementation'): 'generic-worker',
|
||||||
|
|
||||||
# command is a list of commands to run, sequentially
|
# command is a list of commands to run, sequentially
|
||||||
'command': [taskref_or_string],
|
Required('command'): [taskref_or_string],
|
||||||
|
|
||||||
# artifacts to extract from the task image after completion; note that artifacts
|
# artifacts to extract from the task image after completion; note that artifacts
|
||||||
# for the generic worker cannot have names
|
# for the generic worker cannot have names
|
||||||
@@ -239,7 +240,7 @@ task_description_schema = Schema({
|
|||||||
Required('env', default={}): {basestring: taskref_or_string},
|
Required('env', default={}): {basestring: taskref_or_string},
|
||||||
|
|
||||||
# the maximum time to run, in seconds
|
# the maximum time to run, in seconds
|
||||||
'max-run-time': int,
|
Required('max-run-time'): int,
|
||||||
|
|
||||||
# os user groups for test task workers
|
# os user groups for test task workers
|
||||||
Optional('os-groups', default=[]): [basestring],
|
Optional('os-groups', default=[]): [basestring],
|
||||||
@@ -248,14 +249,14 @@ task_description_schema = Schema({
|
|||||||
|
|
||||||
# see
|
# see
|
||||||
# https://github.com/mozilla/buildbot-bridge/blob/master/bbb/schemas/payload.yml
|
# https://github.com/mozilla/buildbot-bridge/blob/master/bbb/schemas/payload.yml
|
||||||
'buildername': basestring,
|
Required('buildername'): basestring,
|
||||||
'sourcestamp': {
|
Required('sourcestamp'): {
|
||||||
'branch': basestring,
|
'branch': basestring,
|
||||||
Optional('revision'): basestring,
|
Optional('revision'): basestring,
|
||||||
Optional('repository'): basestring,
|
Optional('repository'): basestring,
|
||||||
Optional('project'): basestring,
|
Optional('project'): basestring,
|
||||||
},
|
},
|
||||||
'properties': {
|
Required('properties'): {
|
||||||
'product': basestring,
|
'product': basestring,
|
||||||
Extra: basestring, # additional properties are allowed
|
Extra: basestring, # additional properties are allowed
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user