Bug 1384792: pass signed_installer_url to xpcshell tests for bbb r=aki draft
authorChris AtLee <catlee@mozilla.com>
Thu, 27 Jul 2017 00:01:35 -0400
changeset 617590 5633713367382dc99adee617ae6d07e51d2ed69a
parent 617496 16ffc1d05422a81099ce8b9b59de66dde4c8b2f0
child 639852 126af483d783128d71b7c6696df4d592846bc86a
push id71090
push usercatlee@mozilla.com
push dateFri, 28 Jul 2017 17:49:06 +0000
reviewersaki
bugs1384792
milestone56.0a1
Bug 1384792: pass signed_installer_url to xpcshell tests for bbb r=aki MozReview-Commit-ID: LWleRnEAgoi
taskcluster/taskgraph/transforms/job/mozharness_test.py
taskcluster/taskgraph/transforms/task.py
testing/mozharness/mozharness/mozilla/taskcluster_helper.py
--- a/taskcluster/taskgraph/transforms/job/mozharness_test.py
+++ b/taskcluster/taskgraph/transforms/job/mozharness_test.py
@@ -518,8 +518,13 @@ def mozharness_test_buildbot_bridge(conf
             'revision': config.params['head_rev'],
         },
         'properties': {
             'product': test.get('product', 'firefox'),
             'who': config.params['owner'],
             'installer_path': mozharness['build-artifact-name'],
         }
     })
+
+    if mozharness['requires-signed-builds']:
+        upstream_task = '<build-signing>'
+        installer_url = get_artifact_url(upstream_task, mozharness['build-artifact-name'])
+        worker['properties']['signed_installer_url'] = {'task-reference': installer_url}
--- a/taskcluster/taskgraph/transforms/task.py
+++ b/taskcluster/taskgraph/transforms/task.py
@@ -301,17 +301,17 @@ task_description_schema = Schema({
         Required('sourcestamp'): {
             'branch': basestring,
             Optional('revision'): basestring,
             Optional('repository'): basestring,
             Optional('project'): basestring,
         },
         Required('properties'): {
             'product': basestring,
-            Extra: basestring,  # additional properties are allowed
+            Extra: taskref_or_string,  # additional properties are allowed
         },
     }, {
         Required('implementation'): 'native-engine',
         Required('os'): Any('macosx', 'linux'),
 
         # A link for an executable to download
         Optional('context'): basestring,
 
--- a/testing/mozharness/mozharness/mozilla/taskcluster_helper.py
+++ b/testing/mozharness/mozharness/mozilla/taskcluster_helper.py
@@ -197,19 +197,19 @@ class TaskClusterArtifactFinderMixin(obj
         self.set_artifacts(
             p['packageUrl'] if p.get('packageUrl') else None,
             p['testPackagesUrl'] if p.get('testPackagesUrl') else None,
             p['symbolsUrl'] if p.get('symbolsUrl') else None
         )
 
     def set_artifacts(self, installer, tests, symbols):
         """ Sets installer, test and symbols URLs from the artifacts of BBB based task."""
-        self.installer_url, self.test_url, self.symbols_url = installer, tests, symbols
+        self.installer_url, self.test_packages_url, self.symbols_url = installer, tests, symbols
         self.info('Set installer_url: %s' % self.installer_url)
-        self.info('Set test_url: %s' % self.test_url)
+        self.info('Set test_packages_url: %s' % self.test_packages_url)
         self.info('Set symbols_url: %s' % self.symbols_url)
 
     def set_parent_artifacts(self, child_task_id):
         """ Find and set installer_url, test_url and symbols_url by querying TaskCluster.
 
         In Buildbot Bridge's normal behaviour we can find the artifacts by inspecting
         a child's taskId, determine the task in which it depends on and find the uploaded
         artifacts.
@@ -245,17 +245,17 @@ class TaskClusterArtifactFinderMixin(obj
                 'installer_path',
                 parent_task['extra'].get('locations', {}).get('build')
             )
 
             # Case 1: The parent task is a pure TC task
             if installer_path:
                 self.set_artifacts(
                     self.url_to_artifact(parent_id, installer_path),
-                    self.url_to_artifact(parent_id, 'public/build/test_packages.json'),
+                    self.url_to_artifact(parent_id, 'public/build/target.test_packages.json'),
                     self.url_to_artifact(parent_id, 'public/build/target.crashreporter-symbols.zip')
                 )
             else:
                 # Case 2: The parent task has an associated BBB task
                 # graph_props.json is uploaded in buildbase.py
                 self.set_bbb_artifacts(
                     task_id=parent_id,
                     properties_file_path='public/build/buildbot_properties.json'
@@ -263,8 +263,14 @@ class TaskClusterArtifactFinderMixin(obj
         else:
             # Case B: We need to query who the parent is since 'parent_task_id'
             # was not defined as a Buildbot property
             parent_id = self.find_parent_task_id(child_task_id)
             self.set_bbb_artifacts(
                 task_id=parent_id,
                 properties_file_path='public/build/buildbot_properties.json'
             )
+
+        # Use the signed installer if it's set
+        if 'signed_installer_url' in properties:
+            signed_installer_url = properties['signed_installer_url']
+            self.info('Overriding installer_url with signed_installer_url: %s' % signed_installer_url)
+            self.installer_url = signed_installer_url