Bug 1418058: [taskcluster] Get the `.taskcluster.yml` from the current project; r=dustin
authorTom Prince <mozilla@hocat.ca>
Wed, 11 Apr 2018 12:02:47 -0600
changeset 413273 9f9c19355f64734bc7da7a015c21e516dad1fd5f
parent 413272 5b90e26146631a54a64cac56758eaabdc228f23f
child 413274 c165de96347189065b24211ee8589bf95f6f25d8
push id33840
push userapavel@mozilla.com
push dateFri, 13 Apr 2018 21:56:54 +0000
treeherdermozilla-central@6547c27303bc [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdustin
bugs1418058
milestone61.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1418058: [taskcluster] Get the `.taskcluster.yml` from the current project; r=dustin Differential Revision: https://phabricator.services.mozilla.com/D915
taskcluster/taskgraph/actions/registry.py
--- a/taskcluster/taskgraph/actions/registry.py
+++ b/taskcluster/taskgraph/actions/registry.py
@@ -182,17 +182,22 @@ def register_callback_action(name, title
             match = re.match(r'https://(hg.mozilla.org)/(.*?)/?$', parameters[repo_param])
             if not match:
                 raise Exception('Unrecognized {}'.format(repo_param))
             repo_scope = 'assume:repo:{}/{}:branch:default'.format(
                 match.group(1), match.group(2))
 
             task_group_id = os.environ.get('TASK_ID', slugid())
 
-            template = os.path.join(GECKO, '.taskcluster.yml')
+            # FIXME: https://bugzilla.mozilla.org/show_bug.cgi?id=1454034
+            # trust-domain works, but isn't semantically correct here.
+            if graph_config['trust-domain'] == 'comm':
+                template = os.path.join(GECKO, 'comm', '.taskcluster.yml')
+            else:
+                template = os.path.join(GECKO, '.taskcluster.yml')
 
             with open(template, 'r') as f:
                 taskcluster_yml = yaml.safe_load(f)
                 if taskcluster_yml['version'] != 1:
                     raise Exception('actions.json must be updated to work with .taskcluster.yml')
                 if not isinstance(taskcluster_yml['tasks'], list):
                     raise Exception('.taskcluster.yml "tasks" must be a list for action tasks')