Bug 1464530: [release] Allow specifying which repository to get the treescript revision from; r=Callek
authorTom Prince <mozilla@hocat.ca>
Wed, 23 May 2018 14:56:25 -0600
changeset 801078 9771dc75018aae5216a7e954c18e0db25e1197cd
parent 801077 8163fbacf29fe5a4b0d95a658e11bdad07a0d327
child 801079 b733507c7f140d5309094d7bb098844b7dec6544
push id111569
push userrwood@mozilla.com
push dateTue, 29 May 2018 18:03:31 +0000
reviewersCallek
bugs1464530
milestone62.0a1
Bug 1464530: [release] Allow specifying which repository to get the treescript revision from; r=Callek Differential Revision: https://phabricator.services.mozilla.com/D1417
taskcluster/taskgraph/transforms/task.py
--- a/taskcluster/taskgraph/transforms/task.py
+++ b/taskcluster/taskgraph/transforms/task.py
@@ -543,16 +543,17 @@ task_description_schema = Schema({
     }, {
         Required('implementation'): 'shipit',
         Required('release-name'): basestring,
     }, {
         Required('implementation'): 'treescript',
         Required('tag'): bool,
         Required('bump'): bool,
         Optional('bump-files'): [basestring],
+        Optional('repo-param-prefix'): basestring,
         Required('force-dry-run', default=True): bool,
         Required('push', default=False): bool
     }),
 })
 
 TC_TREEHERDER_SCHEMA_URL = 'https://github.com/taskcluster/taskcluster-treeherder/' \
                            'blob/master/schemas/task-treeherder-config.yml'
 
@@ -1133,17 +1134,17 @@ def build_treescript_payload(config, tas
         version = release_config['version'].replace('.', '_')
         buildnum = release_config['build_number']
         tag_names = [
             "{}_{}_BUILD{}".format(product, version, buildnum),
             "{}_{}_RELEASE".format(product, version)
         ]
         tag_info = {
             'tags': tag_names,
-            'revision': config.params['head_rev']
+            'revision': config.params['{}head_rev'.format(worker.get('repo-param-prefix', ''))],
         }
         task_def['payload']['tag_info'] = tag_info
         task_def['scopes'].append(add_scope_prefix(config, 'treescript:action:tagging'))
 
     if worker['bump']:
         if not worker['bump-files']:
             raise Exception("Version Bump requested without bump-files")