mirror of
https://github.com/servo/servo.git
synced 2025-06-06 00:25:37 +00:00
67 lines
2.5 KiB
YAML
67 lines
2.5 KiB
YAML
version: 1
|
|
policy:
|
|
# https://docs.taskcluster.net/docs/reference/integrations/taskcluster-github/docs/taskcluster-yml-v1#pull-requests
|
|
pullRequests: collaborators
|
|
tasks:
|
|
- $if: 'tasks_for == "github-push"'
|
|
then:
|
|
$if: >-
|
|
event.ref in ["refs/heads/auto", "refs/heads/try", "refs/heads/master"] ||
|
|
event.ref[:15] == "refs/heads/try-"
|
|
then:
|
|
|
|
# NOTE: when updating this consider whether the daily hook needs similar changes:
|
|
# https://tools.taskcluster.net/hooks/project-servo/daily
|
|
|
|
taskGroupId: {$eval: as_slugid("decision_task")}
|
|
taskId: {$eval: as_slugid("decision_task")}
|
|
provisionerId: aws-provisioner-v1
|
|
workerType: servo-docker-worker
|
|
created: {$fromNow: ''}
|
|
deadline: {$fromNow: '1 day'}
|
|
metadata:
|
|
name: "Servo: GitHub push decision task"
|
|
description: ""
|
|
owner: &task_owner ${event.pusher.name}@users.noreply.github.com
|
|
source: &task_source ${event.compare}
|
|
scopes:
|
|
- "assume:repo:github.com/servo/servo:branch:${event.ref[11:]}"
|
|
routes:
|
|
$let:
|
|
treeherder_repo:
|
|
$if: "event.ref[:15] != 'refs/heads/try-'"
|
|
then: "servo-${event.ref[11:]}"
|
|
else: "servo-try"
|
|
in:
|
|
- "tc-treeherder.v2._/${treeherder_repo}.${event.after}"
|
|
- "tc-treeherder-staging.v2._/${treeherder_repo}.${event.after}"
|
|
extra:
|
|
treeherder:
|
|
machine: {platform: Linux}
|
|
labels: [x64]
|
|
symbol: Decision
|
|
|
|
payload:
|
|
maxRunTime: {$eval: '20 * 60'}
|
|
# https://github.com/servo/taskcluster-bootstrap-docker-images#decision-task
|
|
image: "servobrowser/taskcluster-bootstrap:decision-task@sha256:28045b7ec0485ef363f8cb14f194008b47e9ede99f2ea40a1e945e921fce976e"
|
|
features:
|
|
taskclusterProxy: true
|
|
env:
|
|
GIT_URL: ${event.repository.clone_url}
|
|
GIT_REF: ${event.ref}
|
|
GIT_SHA: ${event.after}
|
|
TASK_FOR: ${tasks_for}
|
|
TASK_OWNER: *task_owner
|
|
TASK_SOURCE: *task_source
|
|
command:
|
|
- /bin/bash
|
|
- '--login'
|
|
- '-e'
|
|
- '-c'
|
|
- >-
|
|
git init repo &&
|
|
cd repo &&
|
|
git fetch --depth 1 "$GIT_URL" "$GIT_REF" &&
|
|
git reset --hard "$GIT_SHA" &&
|
|
python3 etc/taskcluster/decision_task.py
|