This repository has been archived by the owner on Feb 27, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 18
/
Copy path.taskcluster.yml
256 lines (242 loc) · 10.9 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
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
# The version is always required
version: 0
# Top level metadata is always required
metadata:
name: "TaskCluster Worker Tests"
description: "These tests should ensure that any new commits against taskcluster worker codebase are tested across all supported worker types in gekco."
owner: "{{ event.head.user.email }}" # the user who sent the pr/push e-mail will be inserted here
source: "{{ event.head.repo.url }}" # the repo where the pr came from will be inserted here
tasks:
##########################################################
##################### linux 64 build #####################
##########################################################
- provisionerId: "{{ taskcluster.docker.provisionerId }}"
workerType: "{{ taskcluster.docker.workerType }}"
metadata:
name: "Build/test 64 bit taskcluster-worker on Debian GNU/Linux 8 (jessie)"
description: "This builds the 64 bit linux version of taskcluster-worker"
owner: "{{ event.head.user.email }}" # the user who sent the pr/push e-mail will be inserted here
source: "{{ event.head.repo.url }}" # the repo where the pr came from will be inserted here
extra:
github:
# Events that will trigger this task
events:
- push
scopes:
- secrets:get:repo:github.com/taskcluster/taskcluster-worker
- docker-worker:cache:taskcluster-worker-checkout-1
payload:
features:
taskclusterProxy: true
maxRunTime: 3600
image: golang:1.10-stretch
command:
- /bin/bash
- -vxec
- |
curl -s http://taskcluster/secrets/v1/secret/repo:github.com/taskcluster/taskcluster-worker | sed -n 's/.*"b64_encoded_credentials_script": "\(.*\)".*/\1/p' | base64 -d > env_private.sh
source env_private.sh
go get -v "github.com/kardianos/govendor"
mkdir -p "${GOPATH}/src/github.com/taskcluster"
cd "${GOPATH}/src/github.com/taskcluster"
if [ ! -d taskcluster-worker/.git ]; then rm -rf taskcluster-worker; git clone '{{ event.head.repo.url }}' 'taskcluster-worker'; fi
cd 'taskcluster-worker'
git fetch --tags
git checkout -f '{{ event.head.sha }}'
git clean -d -f -e '/vendor/*' -x
# sometimes `govendor sync` fails first time, so run again, if fails first time
govendor sync || govendor sync
make reinstall check
artifacts:
public/build/taskcluster-worker-linux-amd64:
path: "/go/bin/taskcluster-worker"
expires: "{{ '2 weeks' | $fromNow }}"
type: file
cache:
taskcluster-worker-checkout-1: /go/src
##########################################################
#################### Windows 2012 R2 #####################
##########################################################
- provisionerId: aws-provisioner-v1
workerType: win2012r2-cu
metadata:
name: "Build/test 64 bit taskcluster-worker on Windows 2012 R2"
description: "This builds the 64 bit Windows version of taskcluster-worker"
owner: "{{ event.head.user.email }}" # the user who sent the pr/push e-mail will be inserted here
source: "{{ event.head.repo.url }}" # the repo where the pr came from will be inserted here
extra:
github:
# Events that will trigger this task
events:
- push
scopes:
- generic-worker:cache:taskcluster-worker-checkout-1
payload:
maxRunTime: 3600
artifacts:
- expires: "{{ '2 weeks' | $fromNow }}"
type: file
path: public/build/taskcluster-worker-windows-amd64.exe
command:
- 'set GOROOT=%CD%\go1.10\go'
- 'set GOPATH=%CD%\gopath'
- 'set PATH=%CD%\git\cmd;%GOPATH%\bin;%GOROOT%\bin;%PATH%'
- 'mkdir public\build'
- 'mklink public\build\taskcluster-worker-windows-amd64.exe "%GOPATH%\bin\taskcluster-worker.exe"'
- 'go get -v github.com/kardianos/govendor'
- 'if not exist "%GOPATH%\src\github.com\taskcluster" mkdir "%GOPATH%\src\github.com\taskcluster"'
- 'cd "%GOPATH%\src\github.com\taskcluster"'
- 'git config --global core.autocrlf false'
- 'if not exist taskcluster-worker git clone {{ event.head.repo.url }} taskcluster-worker'
- 'cd taskcluster-worker'
- 'git fetch --tags'
- 'git checkout -f {{ event.head.sha }}'
- 'git clean -d -f -e /vendor/* -x'
- ':: sometimes `govendor sync` fails first time, so run again, if fails first time'
- 'govendor sync || govendor sync'
- 'C:\taskcluster-worker-test-creds.cmd'
- '"C:\mozilla-build\msys\bin\bash.exe" --login -c "cd ${GOPATH}/src/github.com/taskcluster/taskcluster-worker && make reinstall check"'
mounts:
- cacheName: taskcluster-worker-checkout-1
directory: gopath/src
- content:
url: https://storage.googleapis.com/golang/go1.10.windows-amd64.zip
directory: go1.10
format: zip
- content:
url: https://github.com/git-for-windows/git/releases/download/v2.16.2.windows.1/MinGit-2.16.2-64-bit.zip
directory: git
format: zip
##########################################################
#################### OS X 10.10 build ####################
##########################################################
- provisionerId: pmoore-manual
workerType: mac-os-x
metadata:
name: "Build/test 64 bit taskcluster-worker on Mac OS X 10.10"
description: "This builds the 64 bit OS X version of taskcluster-worker"
owner: "{{ event.head.user.email }}" # the user who sent the pr/push e-mail will be inserted here
source: "{{ event.head.repo.url }}" # the repo where the pr came from will be inserted here
extra:
github:
# Events that will trigger this task
events:
- push
scopes:
- generic-worker:cache:taskcluster-worker-checkout-1
payload:
maxRunTime: 3600
artifacts:
- expires: "{{ '2 weeks' | $fromNow }}"
type: file
path: public/build/taskcluster-worker-darwin-amd64
command:
- - /bin/bash
- -vxec
- |
export GOROOT="$(pwd)/go1.10/go"
export GOPATH="$(pwd)/gopath"
export PATH="${GOPATH}/bin:${GOROOT}/bin:${PATH}"
source "${TASKCLUSTER_CREDS_BOOTSTRAP}"
go get -v "github.com/kardianos/govendor"
mkdir -p "${GOPATH}/src/github.com/taskcluster"
cd "${GOPATH}/src/github.com/taskcluster"
if [ ! -d taskcluster-worker/.git ]; then rm -rf taskcluster-worker; git clone '{{ event.head.repo.url }}' 'taskcluster-worker'; fi
cd 'taskcluster-worker'
git fetch --tags
git checkout -f '{{ event.head.sha }}'
git clean -d -f -e '/vendor/*' -x
# sometimes `govendor sync` fails first time, so run again, if fails first time
govendor sync || govendor sync
make reinstall check
cd ../../../../..
mkdir -p public/build
mv "${GOPATH}/bin/taskcluster-worker" public/build/taskcluster-worker-darwin-amd64
mounts:
- cacheName: taskcluster-worker-checkout-1
directory: gopath/src
- content:
url: https://storage.googleapis.com/golang/go1.10.darwin-amd64.tar.gz
directory: go1.10
format: tar.gz
##########################################################
#################### linux QEMU tests ####################
##########################################################
- provisionerId: terraform-packet
workerType: tc-worker-qemu-v1
metadata:
name: "Test taskcluster-worker QEMU engine on QEMU engine"
description: "Builds and tests tc-worker with QEMU engine..."
owner: "{{ event.head.user.email }}" # the user who sent the pr/push e-mail will be inserted here
source: "{{ event.head.repo.url }}" # the repo where the pr came from will be inserted here
extra:
github:
# Events that will trigger this task
events:
- push
payload:
image: 'https://s3-us-west-2.amazonaws.com/public-qemu-images/repository/github.com/taskcluster/taskcluster-worker/ubuntu-worker.tar.zst'
command:
- clone-and-exec.sh
- make
- tc-worker-env-tests
maxRunTime: '30 min'
env:
REPOSITORY: '{{ event.head.repo.url }}'
REVISION: '{{ event.head.sha }}'
##########################################################
##################### upload-docs #####################
##########################################################
- provisionerId: "{{ taskcluster.docker.provisionerId }}"
workerType: "{{ taskcluster.docker.workerType }}"
metadata:
name: "Upload docs for taskcluster-worker"
description: "Builds the 64 bit linux version of taskcluster-worker, generates and uploads docs"
owner: "{{ event.head.user.email }}" # the user who sent the pr/push e-mail will be inserted here
source: "{{ event.head.repo.url }}" # the repo where the pr came from will be inserted here
extra:
github:
# Events that will trigger this task
events:
- push
branches:
- master
scopes:
- auth:aws-s3:read-write:taskcluster-raw-docs/taskcluster-worker/
- docker-worker:cache:taskcluster-worker-checkout-1
payload:
features:
taskclusterProxy: true
maxRunTime: 3600
image: golang:1.10-stretch
command:
- /bin/bash
- -vxec
- |
go get -v "github.com/kardianos/govendor"
mkdir -p "${GOPATH}/src/github.com/taskcluster"
cd "${GOPATH}/src/github.com/taskcluster"
if [ ! -d taskcluster-worker/.git ]; then rm -rf taskcluster-worker; git clone '{{ event.head.repo.url }}' 'taskcluster-worker'; fi
cd 'taskcluster-worker'
git fetch --tags
git checkout -f '{{ event.head.sha }}'
git clean -d -f -e '/vendor/*' -x
# sometimes `govendor sync` fails first time, so run again, if fails first time
govendor sync || govendor sync
# build tc-worker
make install
# generate docs
taskcluster-worker schema config -o docs/config-schema.json
taskcluster-worker schema payload examples/docker-config.yml -f json -o docs/docker-engine-payload-schema.json
# install taskcluster-lib-docs
apt-get update -y
curl -sL https://deb.nodesource.com/setup_8.x | bash -
apt-get install -y nodejs
npm install -g [email protected]
# upload docs
export DOCS_PROJECT=taskcluster-worker DOCS_TIER=workers DOCS_FOLDER=docs DOCS_README=README.md
# Hack because we forgot to wrap with node binary in taskcluster-lib-docs
# See: https://github.com/taskcluster/taskcluster-lib-docs/pull/26
nodejs `which upload-project-docs`
cache:
taskcluster-worker-checkout-1: /go/src