Do not put Treeherder route when on untrusted repo (#2921)
parent
57ca75139b
commit
fb4cfb1cb7
|
@ -77,8 +77,12 @@ tasks:
|
||||||
requires: all-completed # Must be explicit because of Chain of Trust
|
requires: all-completed # Must be explicit because of Chain of Trust
|
||||||
retries: 5
|
retries: 5
|
||||||
routes:
|
routes:
|
||||||
- statuses # Automatically added by taskcluster-github. It must be explicit because of Chain of Trust
|
$flatten:
|
||||||
- tc-treeherder.v2.fenix.${head_rev}
|
- statuses # Automatically added by taskcluster-github. It must be explicit because of Chain of Trust
|
||||||
|
- $if: 'trust_level == 3'
|
||||||
|
then:
|
||||||
|
- tc-treeherder.v2.fenix.${head_rev}
|
||||||
|
else: []
|
||||||
payload:
|
payload:
|
||||||
maxRunTime: 600 # Decision should remain fast enough to schedule a handful of tasks
|
maxRunTime: 600 # Decision should remain fast enough to schedule a handful of tasks
|
||||||
image: mozillamobile/fenix:1.4
|
image: mozillamobile/fenix:1.4
|
||||||
|
|
|
@ -362,6 +362,9 @@ class TaskBuilder(object):
|
||||||
deadline = taskcluster.fromNow('1 day')
|
deadline = taskcluster.fromNow('1 day')
|
||||||
expires = taskcluster.fromNow(DEFAULT_EXPIRES_IN)
|
expires = taskcluster.fromNow(DEFAULT_EXPIRES_IN)
|
||||||
|
|
||||||
|
if self.trust_level == 3:
|
||||||
|
routes.append('tc-treeherder.v2.fenix.{}'.format(self.commit))
|
||||||
|
|
||||||
return {
|
return {
|
||||||
"provisionerId": provisioner_id,
|
"provisionerId": provisioner_id,
|
||||||
"workerType": worker_type,
|
"workerType": worker_type,
|
||||||
|
@ -375,9 +378,7 @@ class TaskBuilder(object):
|
||||||
"priority": self.tasks_priority,
|
"priority": self.tasks_priority,
|
||||||
"dependencies": [self.task_id] + dependencies,
|
"dependencies": [self.task_id] + dependencies,
|
||||||
"requires": "all-completed",
|
"requires": "all-completed",
|
||||||
"routes": routes + [
|
"routes": routes,
|
||||||
"tc-treeherder.v2.fenix.{}".format(self.commit)
|
|
||||||
],
|
|
||||||
"scopes": scopes,
|
"scopes": scopes,
|
||||||
"payload": payload,
|
"payload": payload,
|
||||||
"extra": {
|
"extra": {
|
||||||
|
|
Loading…
Reference in New Issue