blob: bea38fa8d303b083002aab9dd2610354a9b71749 (
plain)
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
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
|
- project:
name: tcwg-llvm-kernel
arch:
- aarch64:
node: tcwg-d05_64-build
docker_arch: arm64
- armv8l:
node: tcwg-d05_32-build
docker_arch: armhf
repo:
- llvm
- linux
jobs:
- 'tcwg-llvm-kernel-build-{arch}'
- 'tcwg-llvm-kernel-bisect-{arch}'
- 'tcwg-llvm-kernel-trigger-{repo}'
- view:
name: tcwg-llvm-kernel
view-type: list
regex: 'tcwg-llvm-kernel.*'
- project:
name: tcwg-llvm-kernel-dead
suffix:
- aarch64-trigger-llvm
- aarch64-trigger-linux
- aarch64
- aarch64-bisect
- build-arm
- bisect-arm
jobs:
- 'tcwg-llvm-kernel-{suffix}'
- job-template:
name: tcwg-llvm-kernel-{suffix}
project-type: freestyle
defaults: global
properties:
- authorization:
anonymous:
- job-read
- job-extended-read
linaro:
- job-build
- job-cancel
- build-discarder:
days-to-keep: 30
num-to-keep: 30
disabled: true
node: tcwg-coordinator
display-name: 'TCWG DEAD tcwg-llvm-kernel-{suffix}'
- job-template:
name: tcwg-llvm-kernel-build-{arch}
project-type: freestyle
defaults: global
properties:
- authorization:
anonymous:
- job-read
- job-extended-read
linaro:
- job-build
- job-cancel
- build-discarder:
days-to-keep: 30
num-to-keep: 30
- build-blocker:
blocking-jobs:
- "tcwg-llvm-kernel-bisect-{arch}"
queue-scanning: 'ALL'
parameters:
- choice:
name: current_project
choices:
- llvm
- linux
description: 'Project to build'
- string:
name: current_rev
default: master
description: "Git rev of $current_project to build"
- bool:
name: use_baseline
default: true
description: "Either compare results against last-successful build or reset baseline"
- string:
name: distro
default: xenial
description: 'Distro image to use'
- string:
name: scripts_branch
default: llvm-kernel-v3
description: 'Scripts revision to use'
disabled: false
node: '{node}'
concurrent: false
display-name: 'TCWG BBB RRv3 Build LLVM + Linux-next @ {arch}'
scm:
- git:
url: https://git-us.linaro.org/toolchain/jenkins-scripts.git
refspec: +refs/heads/*:refs/remotes/origin/* +refs/changes/*:refs/changes/*
branches:
- $scripts_branch
basedir: jenkins-scripts
skip-tag: true
shallow-clone: true
wipe-workspace: false
clean:
before: true
prune: true
wrappers:
- timeout:
timeout: 600
- timestamps
- ssh-agent-credentials:
# tcwg-buildslave user id
users:
- 'e0958a95-204f-4c14-a66c-5e2be6c5d50a'
builders:
- shell: |
#!/bin/bash
set -e
echo "=== Print out environment for debug purposes ==="
env | grep "GERRIT\|GIT"
echo "=== Environment end ==="
set -x
build_name="#$BUILD_NUMBER-$current_project"
rm -rf prev_artifacts
echo "$build_name" > build-name
- build-name-setter:
name: 'build-name'
file: true
- conditional-step:
condition-kind: strings-match
condition-string1: '${{ENV,var="use_baseline"}}'
condition-string2: 'true'
steps:
- copyartifact:
project: tcwg-llvm-kernel-build-{arch}
target: prev_artifacts
optional: true
which-build: last-successful
- shell: |
#!/bin/bash
set -ex
./jenkins-scripts/docker-run.sh \
--arch {docker_arch} \
--distro $distro \
-- \
./jenkins-scripts/tcwg-llvm-kernel.sh \
--mode "jenkins-full" \
--current_project "$current_project" \
--current_rev "$current_rev" \
--verbose true || true
name="#$BUILD_NUMBER-$current_project"
if [ -e artifacts/linux_n_obj ]; then
name="$name-O$(cat artifacts/linux_n_obj)"
fi
if [ -e artifacts/distance-to-good ]; then
name="$name-G$(cat artifacts/distance-to-good)"
fi
if [ -e artifacts/distance-to-tested ]; then
name="$name-T$(cat artifacts/distance-to-tested)"
fi
if ! $use_baseline; then
name="$name-reset"
# Don't trigger bisect if this [possibly failed] build is
# the new baseline.
rm -f artifacts/trigger-bisect-on-failure
fi
if [ ! -f artifacts/failures ]; then
rm -f artifacts/trigger-bisect-on-failure
fi
if [ -f artifacts/trigger-bisect-on-failure ]; then
name="$name-bisect"
echo "distro=$distro" >> artifacts/trigger-bisect-on-failure
echo "scripts_branch=$scripts_branch" >> artifacts/trigger-bisect-on-failure
fi
echo "$name" > build-name
- build-name-setter:
name: 'build-name'
file: true
- conditional-step:
condition-kind: file-exists
condition-filename: artifacts/trigger-bisect-on-failure
steps:
- trigger-builds:
- project: tcwg-llvm-kernel-bisect-{arch}
property-file: artifacts/trigger-bisect-on-failure
- shell: |
#!/bin/bash
if [ -f artifacts/failures ]; then
exit 1
fi
publishers:
- archive:
artifacts: 'artifacts/**'
latest-only: false
- job-template:
name: tcwg-llvm-kernel-bisect-{arch}
project-type: freestyle
defaults: global
properties:
- authorization:
anonymous:
- job-read
- job-extended-read
linaro:
- job-build
- job-cancel
- build-discarder:
days-to-keep: 30
num-to-keep: 30
parameters:
- choice:
name: current_project
choices:
- llvm
- linux
description: 'Project to bisect'
- string:
name: good_rev
default: refs/remotes/gerrit/linaro-local/ci/llvm-kernel-{arch}-good
description: "Good revision"
- string:
name: bad_rev
default: refs/remotes/gerrit/linaro-local/ci/llvm-kernel-{arch}-tested
description: "Bad revision"
- bool:
name: use_baseline
default: true
description: "Either compare results against last-successful build or reset baseline"
- string:
name: distro
default: xenial
description: 'Distro image to use'
- string:
name: scripts_branch
default: llvm-kernel-v3
description: 'Scripts revision to use'
disabled: false
node: '{node}'
concurrent: false
display-name: 'TCWG BBB RRv3 Bisect LLVM + Linux-next @ {arch}'
scm:
- git:
url: https://git-us.linaro.org/toolchain/jenkins-scripts.git
refspec: +refs/heads/*:refs/remotes/origin/* +refs/changes/*:refs/changes/*
branches:
- $scripts_branch
basedir: jenkins-scripts
skip-tag: true
shallow-clone: true
wipe-workspace: false
clean:
before: true
prune: true
wrappers:
- timeout:
timeout: 600
- timestamps
- ssh-agent-credentials:
# tcwg-buildslave user id
users:
- 'e0958a95-204f-4c14-a66c-5e2be6c5d50a'
builders:
- shell: |
#!/bin/bash
set -e
echo "=== Print out environment for debug purposes ==="
env | grep "GERRIT\|GIT"
echo "=== Environment end ==="
set -x
build_name="#$BUILD_NUMBER-$current_project"
rm -rf prev_artifacts
echo "$build_name" > build-name
- build-name-setter:
name: 'build-name'
file: true
- conditional-step:
condition-kind: strings-match
condition-string1: '${{ENV,var="use_baseline"}}'
condition-string2: 'true'
steps:
- copyartifact:
project: tcwg-llvm-kernel-build-{arch}
target: prev_artifacts
optional: true
which-build: last-successful
- shell: |
#!/bin/bash
set -ex
./jenkins-scripts/docker-run.sh \
--arch {docker_arch} \
--distro $distro \
-- \
./jenkins-scripts/tcwg-bisect-llvm-kernel.sh \
--current_project "$current_project" \
--good_rev "$good_rev" \
--bad_rev "$bad_rev" \
--verbose true
for i in bisect-artifacts/trigger-1-reset-baseline bisect-artifacts/trigger-2-build-master; do
if [ -f $i ]; then
echo "distro=$distro" >> $i
echo "scripts_branch=$scripts_branch" >> $i
fi
done
echo "#$BUILD_NUMBER-$current_project-$(cat bisect-artifacts/first-bad)" > build-name
CI_MAIL_RECIPIENTS="tcwg-validation@linaro.org, ndesaulniers@google.com"
case "$current_project" in
linux) CI_MAIL_RECIPIENTS="$CI_MAIL_RECIPIENTS, arnd@linaro.org, mark.brown@linaro.org" ;;
*) CI_MAIL_RECIPIENTS="CI_MAIL_RECIPIENTS, yvan.roux@linaro.org" ;;
esac
echo "CI_MAIL_RECIPIENTS=$CI_MAIL_RECIPIENTS" > ci_mail_parameters
- build-name-setter:
name: 'build-name'
file: true
- trigger-builds:
- project: tcwg-llvm-kernel-build-{arch}
property-file: bisect-artifacts/trigger-1-reset-baseline
- trigger-builds:
- project: tcwg-llvm-kernel-build-{arch}
property-file: bisect-artifacts/trigger-2-build-master
- inject:
properties-file: ci_mail_parameters
publishers:
- archive:
artifacts: 'bisect-artifacts/**'
latest-only: false
- email-ext:
recipients: '${{CI_MAIL_RECIPIENTS}}'
content-type: text
body: |
Bisected ${{current_project}} on {arch} between ${{bad_rev}} ${{good_rev}} .
Culprit: ${{PROJECT_URL}}${{BUILD_NUMBER}}/artifact/bisect-artifacts/BISECT_RUN/*view*/
Artifacts: ${{PROJECT_URL}}${{BUILD_NUMBER}}/artifact/bisect-artifacts/
Build URL: ${{PROJECT_URL}}${{BUILD_NUMBER}}/
Build log: ${{PROJECT_URL}}${{BUILD_NUMBER}}/consoleText
always: true
- scm:
name: llvm
scm:
- git:
url: https://github.com/llvm-project/llvm-project-20170507.git
branches:
- refs/heads/master
basedir: llvm
skip-tag: true
shallow-clone: true
wipe-workspace: false
clean:
before: true
prune: true
- scm:
name: linux
scm:
- git:
url: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
branches:
- refs/heads/master
basedir: linux
skip-tag: true
shallow-clone: true
reference-repo: /home/tcwg-buildslave/snapshots-ref/linux.git
wipe-workspace: false
clean:
before: true
prune: true
- job-template:
name: tcwg-llvm-kernel-trigger-{repo}
project-type: freestyle
defaults: global
properties:
- authorization:
anonymous:
- job-read
- job-extended-read
linaro:
- job-build
- job-cancel
- build-discarder:
days-to-keep: 30
num-to-keep: 30
- build-blocker:
blocking-jobs:
- "tcwg-llvm-kernel-bisect-aarch64"
- "tcwg-llvm-kernel-bisect-armv8l"
queue-scanning: 'ALL'
disabled: false
node: tcwg-coordinator
concurrent: false
display-name: 'TCWG BBB RRv3 Trigger LLVM + Linux-next @ {repo}'
scm:
- '{repo}'
triggers:
- pollscm:
cron: '@daily'
wrappers:
- timeout:
timeout: 600
- timestamps
builders:
- trigger-builds:
- project: tcwg-llvm-kernel-build-aarch64
predefined-parameters: |
current_project={repo}
- trigger-builds:
- project: tcwg-llvm-kernel-build-armv8l
predefined-parameters: |
current_project={repo}
|