Bug 1340564: specify the target name explicitly for dependent tasks; r?ahal draft
authorDustin J. Mitchell <dustin@mozilla.com>
Tue, 25 Apr 2017 22:30:09 +0000
changeset 576294 69924d1d7d3e97a95d99a10d2d974f7857ff917e
parent 576293 d02c34f1a5e68fe14f6bc921edc1bdeb6a81a261
child 576295 18388333858039e502885becb601821f18839d46
push id58315
push userdmitchell@mozilla.com
push dateThu, 11 May 2017 15:34:51 +0000
reviewersahal
bugs1340564
milestone55.0a1
Bug 1340564: specify the target name explicitly for dependent tasks; r?ahal MozReview-Commit-ID: D7TeFDmXeVr
taskcluster/ci/source-test/kind.yml
taskcluster/taskgraph/transforms/job/common.py
--- a/taskcluster/ci/source-test/kind.yml
+++ b/taskcluster/ci/source-test/kind.yml
@@ -13,9 +13,11 @@ jobs-from:
     - python-tests.yml
     - mozlint.yml
     - doc.yml
     - webidl.yml
 
 # This is used by run-task based tasks to lookup which build task it
 # should depend on based on its own platform.
 dependent-build-platforms:
-    linux64.*: build-linux64/opt
+    linux64.*:
+        label: build-linux64/opt
+        target-name: target.tar.bz2
--- a/taskcluster/taskgraph/transforms/job/common.py
+++ b/taskcluster/taskgraph/transforms/job/common.py
@@ -68,26 +68,21 @@ def add_build_dependency(config, job, ta
     matches = keymatch(build_labels, key)
     if not matches:
         raise Exception("No build platform found for '{}'. "
                         "Define 'dependent-build-platforms' in the kind config.".format(key))
 
     if len(matches) > 1:
         raise Exception("More than one build platform found for '{}'.".format(key))
 
-    label = matches[0]
+    label = matches[0]['label']
+    target = matches[0]['target-name']
     deps = taskdesc.setdefault('dependencies', {})
     deps.update({'build': label})
 
-    if 'macosx' in label:
-        target = 'target.dmg'
-    elif 'android' in label:
-        target = 'target.apk'
-    else:
-        target = 'target.tar.bz2'
     build_artifact = 'public/build/{}'.format(target)
     installer_url = ARTIFACT_URL.format('<build>', build_artifact)
 
     env = taskdesc['worker'].setdefault('env', {})
     env.update({'GECKO_INSTALLER_URL': {'task-reference': installer_url}})
 
 
 def support_vcs_checkout(config, job, taskdesc):