Bug 1430984 - Drive-by: Move debian package jobs defaults to kind.yml. r?dustin draft
authorMike Hommey <mh+mozilla@glandium.org>
Thu, 11 Jan 2018 07:24:11 +0900
changeset 721923 d0d76fe9926fe3b5676f7763f261dcf98bd6f346
parent 721922 51638926cd242a2c87993f9a8cbbbcffb630d3a1
child 721924 1dc13585063cd712bba1ccb373988f10f3e86adb
push id96001
push userbmo:mh+mozilla@glandium.org
push dateThu, 18 Jan 2018 05:03:43 +0000
reviewersdustin
bugs1430984
milestone59.0a1
Bug 1430984 - Drive-by: Move debian package jobs defaults to kind.yml. r?dustin
taskcluster/ci/packages/kind.yml
taskcluster/taskgraph/transforms/job/debian_package.py
--- a/taskcluster/ci/packages/kind.yml
+++ b/taskcluster/ci/packages/kind.yml
@@ -13,16 +13,19 @@ job-defaults:
   treeherder:
     kind: build
     platform: packages/opt
     tier: 1
   worker-type: aws-provisioner-v1/gecko-{level}-b-linux
   worker:
     max-run-time: 1800
   run-on-projects: []
+  run:
+    dist: wheezy
+    snapshot: 20171210T214726Z
 
 jobs:
   deb7-python:
     description: "Python backport for Debian wheezy"
     treeherder:
       symbol: Deb7(python)
     run:
       using: debian-package
--- a/taskcluster/taskgraph/transforms/job/debian_package.py
+++ b/taskcluster/taskgraph/transforms/job/debian_package.py
@@ -26,40 +26,38 @@ SOURCE_PACKAGE_RE = re.compile('.*(?=[-_
 source_definition = {
     Required('url'): basestring,
     Required('sha256'): basestring,
 }
 
 run_schema = Schema({
     Required('using'): 'debian-package',
     # Debian distribution
-    Optional('dist'): basestring,
+    Required('dist'): basestring,
 
     # Date of the snapshot (from snapshot.debian.org) to use, in the format
     # YYYYMMDDTHHMMSSZ. The same date is used for the base docker-image name
     # (only the YYYYMMDD part).
-    Optional('snapshot'): basestring,
+    Required('snapshot'): basestring,
 
     # URL/SHA256 of a source file to build, which can either be a source
     # control (.dsc), or a tarball.
     Required(Any('dsc', 'tarball')): source_definition,
 
     # Patch to apply to the extracted source.
     Optional('patch'): basestring,
 
     # Command to run before dpkg-buildpackage.
     Optional('pre-build-command'): basestring,
 })
 
 
 @run_job_using("docker-worker", "debian-package", schema=run_schema)
 def docker_worker_debian_package(config, job, taskdesc):
     run = job['run']
-    run.setdefault('dist', 'wheezy')
-    run.setdefault('snapshot', '20171210T214726Z')
 
     worker = taskdesc['worker']
     worker['artifacts'] = []
     worker['docker-image'] = 'debian:{dist}-{date}'.format(
         dist=run['dist'],
         date=run['snapshot'][:8])
 
     add_public_artifacts(config, job, taskdesc, path='/tmp/artifacts')