-
Notifications
You must be signed in to change notification settings - Fork 22
/
.taskcluster.yml
118 lines (113 loc) · 3.73 KB
/
.taskcluster.yml
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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
version: 1
policy:
pullRequests: public
tasks:
$let:
user: ${event.sender.login}
head_branch:
$if: 'tasks_for == "github-pull-request"'
then: ${event.pull_request.head.ref}
else:
$if: 'tasks_for == "github-push"'
then:
# Strip ref branch prefix
$if: 'event.ref[0:11] == "refs/heads/"'
then: ${event.ref[11:]}
else: ${event.ref}
else: ${event.release.target_commitish}
head_rev:
$if: 'tasks_for == "github-pull-request"'
then: ${event.pull_request.head.sha}
else:
$if: 'tasks_for == "github-push"'
then: ${event.after}
else: ${event.release.tag_name}
repository:
$if: 'tasks_for == "github-pull-request"'
then: ${event.pull_request.head.repo.html_url}
else: ${event.repository.html_url}
in:
- taskId: { $eval: as_slugid("tests_task") }
created: { $fromNow: "" }
deadline: { $fromNow: "1 hour" }
provisionerId: proj-mozci
workerType: ci
payload:
maxRunTime: 3600
image: python:3.10
command:
- "/bin/bash"
- "-lcx"
- "git clone --quiet ${repository} &&
cd mozci &&
git -c advice.detachedHead=false checkout ${head_rev} &&
pip install --quiet tox==3.28.0 &&
tox"
metadata:
name: mozci linting and tests
description: mozci linting and tests
owner: mcastelluccio@mozilla.com
source: ${repository}/raw/${head_rev}/.taskcluster.yml
- taskId: { $eval: as_slugid("docker_build") }
created: { $fromNow: "" }
deadline: { $fromNow: "1 hour" }
dependencies:
- { $eval: as_slugid("tests_task") }
provisionerId: proj-mozci
workerType: generic-worker-ubuntu-24-04
payload:
maxRunTime: 3600
command:
- - bash
- "-cx"
- >-
podman run -v $(pwd):/work -w /work --privileged -e
"GIT_REPOSITORY=${repository}" -e
"GIT_REVISION=${head_rev}"
'mozilla/taskboot:0.3.6' taskboot build --build-tool podman --image
mozilla/mozci --tag ${head_rev} --write
'/work/mozci.tar' Dockerfile
artifacts:
- name: public/mozci.tar.zst
expires:
$if: 'head_branch == "production"'
then: { $fromNow: "1 year" }
else: { $fromNow: "1 month" }
path: mozci.tar.zst
type: file
routes:
$if: 'tasks_for == "github-pull-request"'
then:
- "index.project.mozci.docker-pr.revision.${head_rev}"
- "index.project.mozci.docker-pr.branch.${head_branch}"
else:
- "index.project.mozci.docker.revision.${head_rev}"
- "index.project.mozci.docker.branch.${head_branch}"
metadata:
name: mozci docker build
description: mozci docker build
owner: mcastelluccio@mozilla.com
source: ${repository}/raw/${head_rev}/.taskcluster.yml
- taskId: { $eval: as_slugid("docker_test") }
created: { $fromNow: "" }
deadline: { $fromNow: "1 hour" }
dependencies:
- { $eval: as_slugid("docker_build") }
provisionerId: proj-mozci
workerType: ci
payload:
maxRunTime: 3600
image:
type: task-image
path: public/mozci.tar.zst
taskId: { $eval: as_slugid("docker_build") }
env:
GIT_REPOSITORY: ${repository}
GIT_REVISION: ${head_rev}
command:
- help
metadata:
name: mozci docker test
description: mozci docker test
owner: mcastelluccio@mozilla.com
source: ${repository}/raw/${head_rev}/.taskcluster.yml