mirror of
https://github.com/HeyPuter/firefox.git
synced 2026-11-26 21:50:42 -10:00
This adds a `--level` option to taskcluster-graph, and passes the level supplied from mozilla-taskcluster. It then substitutes that into cache names for just about every cache (tooltool being the exception, as it verifies hashes and is thus immune to poisoning). The scopes for these new cache names are already included in the relevant `moz-tree:level:*` roles. This also strips `-c6` from cache names; I added this when we were transitioning from the Ubuntu-based build images, to ensure I got clean caches. It's no longer necessary.
101 lines
3.4 KiB
YAML
101 lines
3.4 KiB
YAML
---
|
|
metadata:
|
|
name: 'Taskcluster decision task for {{project}}'
|
|
description: |
|
|
Try push for {{owner}}.
|
|
owner: [email protected]
|
|
source: "{{{source}}}"
|
|
|
|
scopes:
|
|
# Note the below scopes are insecure however these get overriden on the server
|
|
# side to whatever scopes are set by mozilla-taskcluster.
|
|
- queue:*
|
|
- docker-worker:*
|
|
- scheduler:*
|
|
|
|
tasks:
|
|
- taskId: '{{#as_slugid}}decision task{{/as_slugid}}'
|
|
reruns: 3
|
|
task:
|
|
created: '{{now}}'
|
|
deadline: '{{#from_now}}1 day{{/from_now}}'
|
|
metadata:
|
|
owner: [email protected]
|
|
source: {{{source}}}
|
|
name: "[tc] Initial decision task for try"
|
|
description: |
|
|
This is the single most important task as it decides how all other tasks
|
|
get built.
|
|
|
|
workerType: "gecko-decision"
|
|
provisionerId: "aws-provisioner-v1"
|
|
|
|
tags:
|
|
createdForUser: {{owner}}
|
|
|
|
scopes:
|
|
- "docker-worker:cache:level-{{level}}-{{project}}-tc-vcs-public-sources"
|
|
- "docker-worker:cache:level-{{level}}-{{project}}-gecko-decision"
|
|
- "queue:route:tc-treeherder-stage.{{project}}.{{revision_hash}}"
|
|
- "queue:route:tc-treeherder.{{project}}.{{revision_hash}}"
|
|
|
|
routes:
|
|
- "tc-treeherder.{{project}}.{{revision_hash}}"
|
|
- "tc-treeherder-stage.{{project}}.{{revision_hash}}"
|
|
|
|
payload:
|
|
env:
|
|
GECKO_BASE_REPOSITORY: 'https://hg.mozilla.org/mozilla-central'
|
|
GECKO_HEAD_REPOSITORY: '{{{url}}}'
|
|
GECKO_HEAD_REF: '{{revision}}'
|
|
GECKO_HEAD_REV: '{{revision}}'
|
|
|
|
cache:
|
|
# The taskcluster-vcs tooling stores the large clone caches in this
|
|
# directory and will reuse them for new requests this saves about 20s~ and
|
|
# is the most generic cache possible.
|
|
level-{{level}}-{{project}}-tc-vcs-public-sources: /home/worker/.tc-vcs/
|
|
level-{{level}}-{{project}}-gecko-decision: /home/worker/workspace
|
|
|
|
# Note: This task is built server side without the context or tooling that
|
|
# exist in tree so we must hard code the version
|
|
image: 'quay.io/mozilla/builder:0.5.0'
|
|
|
|
# Virtually no network or other potentially risky operations happen as part
|
|
# of the task timeout aside from the initial clone. We intentionally have
|
|
# set this to a lower value _all_ decision tasks should use a root
|
|
# repository which is cached.
|
|
maxRunTime: 1800
|
|
|
|
command:
|
|
- /bin/bash
|
|
- -cx
|
|
- >
|
|
mkdir -p /home/worker/artifacts &&
|
|
checkout-gecko workspace &&
|
|
cd workspace/gecko &&
|
|
./mach taskcluster-graph
|
|
--pushlog-id='{{pushlog_id}}'
|
|
--project='{{project}}'
|
|
--message='{{comment}}'
|
|
--owner='{{owner}}'
|
|
--level='{{level}}'
|
|
--revision-hash='{{revision_hash}}'
|
|
--extend-graph > /home/worker/artifacts/graph.json
|
|
|
|
graphs:
|
|
- /home/worker/artifacts/graph.json
|
|
|
|
artifacts:
|
|
'public':
|
|
type: 'directory'
|
|
path: '/home/worker/artifacts'
|
|
# Arbitrary value for keeping these artifacts around. They are just the
|
|
# graph.json and context directories for now, so nothing that needs
|
|
# to stay around for long.
|
|
expires: '{{#from_now}}7 days{{/from_now}}'
|
|
|
|
extra:
|
|
treeherder:
|
|
symbol: D
|