aboutsummaryrefslogtreecommitdiffstats
path: root/.taskcluster.yml
blob: 098a1414fe7b212d4ae430b491881834ad536d11 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
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/try-taskcluster"]'
      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:
          - "queue:scheduler-id:taskcluster-github"

          # Granted to role "repo:github.com/servo/servo:branch:*"
          - "queue:create-task:highest:aws-provisioner-v1/servo-*"
          - "queue:route:index.project.servo.servo.*"
          - "docker-worker:cache:cargo-*"

        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