blob: 375476ede76e8534373e2752cd4be8384482e28e [file] [log] [blame]
Maxim Kuvyrkov27f48c92021-08-06 13:52:40 +00001# Auto generated by ./tcwg/generate-yamlfiles.sh from tcwg_gnu.yaml.in and tcwg_gnu/tcwg_gnu_cross.def. Do not edit.
Christophe Lyon47916452021-04-07 12:04:51 +00002# Beware: git branch names need the 'refs/heads/' prefix, while tags need 'refs/tags/'
Maxim Kuvyrkoveab86202020-06-03 13:16:37 +00003- project:
Maxim Kuvyrkov27f48c92021-08-06 13:52:40 +00004 name: tcwg_gnu_cross
5 type_of_test: ""
Thiago Jung Bauermannf924a922023-08-23 16:24:29 -03006 timeout_build: 1000
Maxim Kuvyrkov708b9e62023-08-18 13:07:46 +00007 # By default, run each CI loop daily.
8 cron_master: 'H H * * *'
Adhemerval Zanella1f05dc72023-07-18 14:34:02 -03009 docker_security: ''
Maxim Kuvyrkov27f48c92021-08-06 13:52:40 +000010 ci_project:
Maxim Kuvyrkovad929ab2023-02-25 12:30:16 +000011 - tcwg_gnu_cross_build
Maxim Kuvyrkov76197c52023-03-24 14:19:01 +000012 - tcwg_gnu_cross_check_binutils
Maxim Kuvyrkovad929ab2023-02-25 12:30:16 +000013 - tcwg_gnu_cross_check_gcc
Maxim Kuvyrkoveab86202020-06-03 13:16:37 +000014 binutils_url: git://sourceware.org/git/binutils-gdb.git
Christophe Lyon60f22442025-04-30 17:06:47 +000015 gcc_url: git+ssh://linaroci@gcc.gnu.org/git/gcc.git
Maxim Kuvyrkoveab86202020-06-03 13:16:37 +000016 glibc_url: git://sourceware.org/git/glibc.git
Maxim Kuvyrkov09a576e2021-08-07 12:14:50 +000017 gdb_url: git://sourceware.org/git/binutils-gdb.git
Maxim Kuvyrkov78bc2722021-08-18 12:19:18 +000018 qemu_url: https://gitlab.com/qemu-project/qemu.git
Maxim Kuvyrkoveab86202020-06-03 13:16:37 +000019 target:
20 - aarch64
21 - arm
Maxim Kuvyrkov7adc4cb2023-03-17 15:50:16 +000022 node: tcwg-build && tcwg-x86_64
Maxim Kuvyrkoveab86202020-06-03 13:16:37 +000023 jobs:
Maxim Kuvyrkov27f48c92021-08-06 13:52:40 +000024 - tcwg_gnu_cross-master
Maxim Kuvyrkov9e17add2021-07-16 07:50:51 +000025
26- job-group:
Maxim Kuvyrkov27f48c92021-08-06 13:52:40 +000027 name: tcwg_gnu_cross-master
Maxim Kuvyrkov9e17add2021-07-16 07:50:51 +000028 toolchain_ver: master
Maxim Kuvyrkov27f48c92021-08-06 13:52:40 +000029 cron: '{cron_master}'
Laurent Alfonsi0cacf302024-06-13 14:32:10 +020030 binutils_branch: master
31 gcc_branch: master
Laurent Alfonsif12931b2024-07-01 18:26:03 +020032 linux_url: https://gitlab.com/Linaro/lkft/mirrors/torvalds/linux-mainline.git
Laurent Alfonsi0cacf302024-06-13 14:32:10 +020033 linux_branch: master
34 glibc_branch: master
35 gdb_branch: master
36 qemu_branch: master
Maxim Kuvyrkov08ef64c2023-02-15 07:54:00 +000037 distro: default
Maxim Kuvyrkov9e17add2021-07-16 07:50:51 +000038 jobs:
Laurent Alfonsi00931492023-02-21 11:10:45 +010039 - '{ci_project}--{toolchain_ver}-{target}{type_of_test}-build'
Maxim Kuvyrkov972075c2024-01-08 09:19:06 +000040 - '{ci_project}--{toolchain_ver}-{target}{type_of_test}-precommit'
Laurent Alfonsi00931492023-02-21 11:10:45 +010041 - '{ci_project}--{toolchain_ver}-{target}{type_of_test}-bisect'
Laurent Alfonsib5d5a082023-02-23 12:08:35 +010042 ci_config: '{toolchain_ver}-{target}{type_of_test}'
Maxim Kuvyrkov9e17add2021-07-16 07:50:51 +000043
Maxim Kuvyrkoveab86202020-06-03 13:16:37 +000044#BEGIN: tcwg/round-robin.yaml.inc
45# -*- mode: Yaml -*-
46
47#BEGIN: tcwg/default.yaml.inc
48# -*- mode: Yaml -*-
49
50- property:
51 name: default-properties
52 properties:
53 - authorization:
54 anonymous:
55 - job-read
56 - job-extended-read
Benjamin Copeland9dc2eb82022-10-11 12:40:33 +010057 everyone-flat:
Maxim Kuvyrkoveab86202020-06-03 13:16:37 +000058 - job-build
59 - job-cancel
60 - build-discarder:
Maxim Kuvyrkov5e1f6662025-02-20 05:32:41 +000061 days-to-keep: 20
Maxim Kuvyrkov470ea172021-01-15 13:45:09 +000062
63- scm:
64 name: jenkins-scripts
65 scm:
66 - git:
Laurent Alfonsi3c7c10a2025-04-17 17:04:51 +020067 url: https://gitlab.com/Linaro/tcwg/jenkins-scripts.git
Maxim Kuvyrkov470ea172021-01-15 13:45:09 +000068 refspec: +refs/heads/*:refs/remotes/origin/* +refs/changes/*:refs/changes/*
69 branches:
70 - $scripts_branch
71 basedir: jenkins-scripts
72 skip-tag: true
73 reference-repo: /home/tcwg-buildslave/snapshots-ref/jenkins-scripts.git
74 wipe-workspace: false
75 clean:
76 before: true
77 prune: true
Maxim Kuvyrkov83939c12021-03-23 08:53:54 +000078
Maxim Kuvyrkoveab86202020-06-03 13:16:37 +000079#END: tcwg/default.yaml.inc
80
81- parameter:
82 name: default-parameters
83 parameters:
84 - string:
Maxim Kuvyrkoveab86202020-06-03 13:16:37 +000085 name: extra_build_params
86 default: ""
Maxim Kuvyrkov5eed3052021-06-24 15:55:59 +000087 description: "Extra parameters to pass to the build script; can be used to override settings extracted from ci_project/ci_config"
Maxim Kuvyrkoveab86202020-06-03 13:16:37 +000088 - string:
Maxim Kuvyrkoveab86202020-06-03 13:16:37 +000089 name: distro
Maxim Kuvyrkovf2023b72021-01-20 13:49:47 +000090 default: '{distro}'
Maxim Kuvyrkoveab86202020-06-03 13:16:37 +000091 description: 'Distro image to use'
92 - string:
93 name: scripts_branch
94 default: master
95 description: 'Scripts revision to use'
96
Maxim Kuvyrkoveab86202020-06-03 13:16:37 +000097- parameter:
98 name: component-parameters
99 parameters:
100 - string:
Maxim Kuvyrkovaa2b43e2021-07-20 18:03:06 +0000101 name: '{component}_git'
102 default: '{default_git}'
Christophe Lyon1290bab2024-02-13 22:23:45 +0000103 description: "{component} git_url#branch/sha1 to build, or 'default', 'baseline' or 'jenkins-scm', or pw://series/<id> to build with patches from patchwork ('precommit' mode, use 'pw://series/<id>/retrigger/' to force a rebuild)"
Maxim Kuvyrkoveab86202020-06-03 13:16:37 +0000104
105- parameter:
Maxim Kuvyrkovc81e4722023-11-22 18:11:33 +0000106 name: all-component-parameters
Maxim Kuvyrkoveab86202020-06-03 13:16:37 +0000107 parameters:
108 - component-parameters:
109 component: binutils
Maxim Kuvyrkovaa2b43e2021-07-20 18:03:06 +0000110 default_git: '{default_git}'
Maxim Kuvyrkoveab86202020-06-03 13:16:37 +0000111 - component-parameters:
112 component: gcc
Maxim Kuvyrkovaa2b43e2021-07-20 18:03:06 +0000113 default_git: '{default_git}'
Maxim Kuvyrkoveab86202020-06-03 13:16:37 +0000114 - component-parameters:
Maxim Kuvyrkov09a576e2021-08-07 12:14:50 +0000115 component: gdb
116 default_git: '{default_git}'
117 - component-parameters:
Maxim Kuvyrkoveab86202020-06-03 13:16:37 +0000118 component: glibc
Maxim Kuvyrkovaa2b43e2021-07-20 18:03:06 +0000119 default_git: '{default_git}'
Maxim Kuvyrkov4a6a0cf2020-06-19 15:18:18 +0000120 - component-parameters:
Maxim Kuvyrkovf8e3c4f2021-08-08 08:58:56 +0000121 component: linux
122 default_git: '{default_git}'
123 - component-parameters:
Maxim Kuvyrkov4a6a0cf2020-06-19 15:18:18 +0000124 component: qemu
Maxim Kuvyrkovaa2b43e2021-07-20 18:03:06 +0000125 default_git: '{default_git}'
Maxim Kuvyrkovc81e4722023-11-22 18:11:33 +0000126
127- parameter:
128 name: build-parameters
129 parameters:
130 - all-component-parameters:
131 default_git: '{default_git}'
Maxim Kuvyrkoveab86202020-06-03 13:16:37 +0000132 - choice:
133 name: update_baseline
134 choices:
Maxim Kuvyrkovaf6009c2022-08-05 15:52:12 +0000135 - onsuccess
136 - force
Maxim Kuvyrkoveab86202020-06-03 13:16:37 +0000137 - init
Prathamesh Kulkarni77452f02022-06-30 18:26:44 +0530138 - ignore
Maxim Kuvyrkoveab86202020-06-03 13:16:37 +0000139 description: "What to do with baseline in this build"
Maxim Kuvyrkov069813f2023-05-06 19:17:00 +0000140 - choice:
141 name: notify
142 choices:
143 - ignore
144 - onregression
Maxim Kuvyrkov333b2962023-08-14 08:55:46 +0000145 - precommit
Maxim Kuvyrkov069813f2023-05-06 19:17:00 +0000146 description: "Whether to notify developers about the result of this build"
Laurent Alfonsi464db222024-05-28 14:09:45 +0200147 - string:
Laurent Alfonsi8527d662024-05-24 16:27:08 +0200148 name: rr_stage
149 default: build
150 description: "Describe the current round-robin stage for this run (informative only)"
Maxim Kuvyrkoveab86202020-06-03 13:16:37 +0000151 - default-parameters:
Maxim Kuvyrkovf2023b72021-01-20 13:49:47 +0000152 distro: '{distro}'
Laurent Alfonsi87ab4de2024-04-25 07:34:20 +0200153
Maxim Kuvyrkov972075c2024-01-08 09:19:06 +0000154# Precommit parameters ...
155# - allow only "ignore" value for update_baseline parameter;
156# - allow string (which should be an email) for notify parameter.
157- parameter:
158 name: precommit-parameters
159 parameters:
160 - all-component-parameters:
161 default_git: '{default_git}'
Maxim Kuvyrkov972075c2024-01-08 09:19:06 +0000162 - string:
163 name: notify
164 default: 'precommit'
165 description: "Email to send failure notifications to"
166 - default-parameters:
167 distro: '{distro}'
Maxim Kuvyrkoveab86202020-06-03 13:16:37 +0000168
Laurent Alfonsi2ac30aa2023-08-23 16:13:37 +0200169- property:
170 name: build-properties
171 properties:
172 - default-properties
173 - build-blocker:
174 blocking-jobs:
175 - '{ci_project}--{ci_config}-bisect'
176 queue-scanning: 'ALL'
177
Maxim Kuvyrkov972075c2024-01-08 09:19:06 +0000178- property:
179 name: precommit-properties
180 properties:
181 - default-properties
182 - build-blocker:
183 blocking-jobs:
184 - '{ci_project}--{ci_config}-build'
Maxim Kuvyrkov4f690942024-01-11 17:50:15 +0000185 queue-scanning: 'BUILDABLE'
Maxim Kuvyrkovab90c432024-01-08 08:51:26 +0000186
Laurent Alfonsi2ac30aa2023-08-23 16:13:37 +0200187- property:
188 name: bisect-properties
189 properties:
190 - default-properties
191 - build-blocker:
192 # Run at most 1 bisect job for all configurations.
193 # Bisect jobs can easily run for 5+ hours, and a few of them
194 # can hog the entire TCWG build farm for a long time. Since
195 # same regression tends to appear in multiple configurations,
196 # run bisections for all configurations in-order.
197 blocking-jobs:
198 - '{ci_project}--.*-bisect'
199 queue-scanning: 'BUILDABLE'
200
Christophe Lyon47916452021-04-07 12:04:51 +0000201# Beware: git branch names need the 'refs/heads/' prefix while tags
202# need 'refs/tags/'.
Maxim Kuvyrkoveab86202020-06-03 13:16:37 +0000203- scm:
204 name: component-scm
205 scm:
206 - git:
207 url: '{url}'
208 branches:
Laurent Alfonsi0cacf302024-06-13 14:32:10 +0200209 - 'refs/heads/{branch}'
Maxim Kuvyrkoveab86202020-06-03 13:16:37 +0000210 basedir: '{component}'
Laurent Alfonsicdf084e2024-06-28 14:50:37 +0200211 do-not-fetch-tags: true
Maxim Kuvyrkove421fb72020-06-19 11:26:02 +0000212 reference-repo: '/home/tcwg-buildslave/snapshots-ref/{reference}'
Laurent Alfonsi1ed7e3f2024-06-25 14:52:06 +0200213 refspec: '+refs/heads/{branch}:refs/remotes/origin/{branch}'
Laurent Alfonsi0cde2752024-06-13 14:32:10 +0200214 shallow-clone: true
Maxim Kuvyrkoveab86202020-06-03 13:16:37 +0000215 wipe-workspace: false
216 clean:
217 before: true
218 prune: true
219
Maxim Kuvyrkov54c21312020-06-03 13:55:17 +0000220# SCMs must start with jenkins-scripts and then be ordered alphabetically.
221# Same alphabetical order must be followed in .def files. The reason behind
222# this is that jenkins sets $GIT_COMMIT to sha1 of jenkins-scripts, and then
223# sets $GIT_COMMIT_1, $GIT_COMMIT_2, etc. to sha1s of component SCM /in the
224# order that they are declared here/.
Maxim Kuvyrkoveab86202020-06-03 13:16:37 +0000225- scm:
226 name: build-scms
227 scm:
228 - jenkins-scripts
Laurent Alfonsiaa15d362025-05-15 12:56:49 +0000229 - component-scm:
230 component: binutils
231 url: '{binutils_url}'
232 branch: '{binutils_branch}'
233 reference: binutils-gdb.git
234 - component-scm:
235 component: gcc
236 url: '{gcc_url}'
237 branch: '{gcc_branch}'
238 reference: gcc.git
239 - component-scm:
240 component: gdb
241 url: '{gdb_url}'
242 branch: '{gdb_branch}'
243 reference: binutils-gdb.git
244 - component-scm:
245 component: glibc
246 url: '{glibc_url}'
247 branch: '{glibc_branch}'
248 reference: glibc.git
249 - component-scm:
250 component: linux
251 url: '{linux_url}'
252 branch: '{linux_branch}'
253 reference: linux.git
254 - component-scm:
255 component: qemu
256 url: '{qemu_url}'
257 branch: '{qemu_branch}'
258 reference: qemu.git
Maxim Kuvyrkoveab86202020-06-03 13:16:37 +0000259
260- wrapper:
261 name: build-wrappers
262 wrappers:
263 - timeout:
264 timeout: '{timeout}'
265 - timestamps
266 - ssh-agent-credentials:
267 # tcwg-buildslave user id
268 users:
269 - 'e0958a95-204f-4c14-a66c-5e2be6c5d50a'
Christophe Lyonee8d3e82025-04-29 13:50:15 +0000270 - 'tcwg-buildslave-20220725'
Maxim Kuvyrkov972075c2024-01-08 09:19:06 +0000271# - 'tcwg-build-20220725'
Maxim Kuvyrkov7f0f1802022-09-01 08:30:58 +0000272 - credentials-binding:
273 - text:
274 credential-id: TCWG_JIRA_TOKEN
275 variable: TCWG_JIRA_TOKEN
Maxim Kuvyrkoveab86202020-06-03 13:16:37 +0000276
277- builder:
Maxim Kuvyrkovccd89ea2023-06-30 17:16:10 +0000278 name: trigger-followup-builds-1
Maxim Kuvyrkoveab86202020-06-03 13:16:37 +0000279 builders:
Maxim Kuvyrkov7b799fb2023-06-28 16:01:34 +0000280 - shell: |
281 #!/bin/bash
Maxim Kuvyrkov8adf09b2023-07-01 15:47:55 +0000282 source artifacts/jenkins/run-build.env
Maxim Kuvyrkov8c8e4aa2023-11-22 18:56:53 +0000283 set -ex
Maxim Kuvyrkov8adf09b2023-07-01 15:47:55 +0000284
Maxim Kuvyrkov7b799fb2023-06-28 16:01:34 +0000285 for i in artifacts/trigger-build-* artifacts/trigger-bisect; do
286 if [ -f $i ]; then
Maxim Kuvyrkov7b799fb2023-06-28 16:01:34 +0000287 echo "distro=$distro" >> $i
288 echo "scripts_branch=$scripts_branch" >> $i
289 fi
290 done
Maxim Kuvyrkovccd89ea2023-06-30 17:16:10 +0000291
Maxim Kuvyrkov3ab321b2023-08-14 08:28:29 +0000292 trap "" EXIT
293
Maxim Kuvyrkovccd89ea2023-06-30 17:16:10 +0000294- builder:
295 name: trigger-followup-builds-2
296 builders:
Maxim Kuvyrkov7b799fb2023-06-28 16:01:34 +0000297 - trigger-builds:
Maxim Kuvyrkov52c3cc22024-01-05 15:40:26 +0000298 - project: '{ci_project}--{ci_config}-build'
Maxim Kuvyrkov7b799fb2023-06-28 16:01:34 +0000299 parameter-factories:
300 - factory: filebuild
301 file-pattern: artifacts/trigger-build-*
Maxim Kuvyrkov52c3cc22024-01-05 15:40:26 +0000302 - project: '{ci_project}--{ci_config}-bisect'
Maxim Kuvyrkov7b799fb2023-06-28 16:01:34 +0000303 property-file: artifacts/trigger-bisect
Maxim Kuvyrkov12858ec2023-05-03 18:38:05 +0000304
305- builder:
Maxim Kuvyrkov333b2962023-08-14 08:55:46 +0000306 name: run-build-notify
Maxim Kuvyrkov12858ec2023-05-03 18:38:05 +0000307 builders:
Maxim Kuvyrkov7b799fb2023-06-28 16:01:34 +0000308 - shell: |
309 #!/bin/bash
Maxim Kuvyrkov8adf09b2023-07-01 15:47:55 +0000310 source artifacts/jenkins/run-build.env
Maxim Kuvyrkov8c8e4aa2023-11-22 18:56:53 +0000311 set -ex
Maxim Kuvyrkov7e9dd642022-09-01 13:05:40 +0000312
Maxim Kuvyrkov7b799fb2023-06-28 16:01:34 +0000313 if [ -f artifacts/failed ]; then
Maxim Kuvyrkovab01ec02023-08-14 08:52:38 +0000314 # Only send notifications for forced successful
315 # (aka "onregression") builds; never for failed builds.
Laurent Alfonsia723e002023-10-02 15:25:05 +0200316 echo "Build failed. Using option notify=ignore."
Maxim Kuvyrkovab01ec02023-08-14 08:52:38 +0000317 notify=ignore
Maxim Kuvyrkov7b799fb2023-06-28 16:01:34 +0000318 fi
Maxim Kuvyrkovb1f99992023-05-25 15:16:53 +0000319
Maxim Kuvyrkov7b799fb2023-06-28 16:01:34 +0000320 # Basic notification -- create entry in interesting-commits.
Maxim Kuvyrkov835cfc22023-07-04 15:40:32 +0000321 # Note that we add --notify to the manifest -- we will need this
322 # later in round-robin-baseline.sh when re-writing history
323 # to update notifications files in interesting-commits and jira.
Maxim Kuvyrkov3ab321b2023-08-14 08:28:29 +0000324 build_container_exec \
Maxim Kuvyrkovd2207ec2024-06-28 14:10:30 +0000325 ./jenkins-scripts/rr/round-robin-notify.sh \
Maxim Kuvyrkov835cfc22023-07-04 15:40:32 +0000326 @@rr[top_artifacts] artifacts --notify "$notify" \
327 __stage init __verbose true \
Thiago Jung Bauermann676c14a2023-09-12 12:37:40 -0300328 __build_script {build_script} \
Maxim Kuvyrkov333b2962023-08-14 08:55:46 +0000329 &> ./artifacts/jenkins/notify-init.log &
Maxim Kuvyrkov3966f7e2023-06-16 13:36:25 +0000330
Maxim Kuvyrkov7b799fb2023-06-28 16:01:34 +0000331 if ! wait $!; then
332 echo "maxim.kuvyrkov@linaro.org, laurent.alfonsi@linaro.org" \
333 > artifacts/jenkins/error-mail-recipients.txt
334 echo -e "$BUILD_URL\nERROR: notify-init failed\n" \
335 >> artifacts/jenkins/error-mail-body.txt
Laurent Alfonsi53446912023-09-10 15:14:16 +0200336 echo "ERROR: notify-init failed"
Maxim Kuvyrkov7b799fb2023-06-28 16:01:34 +0000337 exit 1
338 fi
Maxim Kuvyrkov3966f7e2023-06-16 13:36:25 +0000339
Maxim Kuvyrkov7b799fb2023-06-28 16:01:34 +0000340 # Full notification
341 echo "NOTE: Notify developers about this build"
Maxim Kuvyrkove8a19542023-12-26 10:12:55 +0000342
Maxim Kuvyrkov3ab321b2023-08-14 08:28:29 +0000343 build_container_exec \
Maxim Kuvyrkovd2207ec2024-06-28 14:10:30 +0000344 ./jenkins-scripts/rr/round-robin-notify.sh \
Maxim Kuvyrkove8a19542023-12-26 10:12:55 +0000345 @@rr[top_artifacts] artifacts __stage full __verbose true \
Thiago Jung Bauermann676c14a2023-09-12 12:37:40 -0300346 __build_script {build_script} \
Maxim Kuvyrkov333b2962023-08-14 08:55:46 +0000347 &> ./artifacts/jenkins/notify-full.log &
Maxim Kuvyrkov7e9dd642022-09-01 13:05:40 +0000348
Maxim Kuvyrkov7b799fb2023-06-28 16:01:34 +0000349 if ! wait $!; then
350 echo "maxim.kuvyrkov@linaro.org, laurent.alfonsi@linaro.org" \
351 > artifacts/jenkins/error-mail-recipients.txt
352 echo -e "$BUILD_URL\nERROR: notify-full failed\n" \
353 >> artifacts/jenkins/error-mail-body.txt
Laurent Alfonsi53446912023-09-10 15:14:16 +0200354 echo "ERROR: notify-full failed"
Maxim Kuvyrkov7b799fb2023-06-28 16:01:34 +0000355 fi
Maxim Kuvyrkov7b8d88c2022-08-30 11:04:35 +0000356
Maxim Kuvyrkov7b799fb2023-06-28 16:01:34 +0000357 # Failsafe for avoid spamming developers.
358 if [ "$notify" = "ignore" ] \
359 && [ -f artifacts/jenkins/mail-recipients.txt ]; then
360 echo "maxim.kuvyrkov@linaro.org, laurent.alfonsi@linaro.org" \
361 > artifacts/jenkins/error-mail-recipients.txt
362 echo -e "$BUILD_URL\nERROR: tried to unexpectedly notify developers\n" \
363 >> artifacts/jenkins/error-mail-body.txt
364 mv artifacts/jenkins/mail-recipients.txt \
365 artifacts/jenkins/mail-recipients.bak
366 fi
Maxim Kuvyrkovdc5adc12023-07-01 08:02:24 +0000367
Maxim Kuvyrkov3ab321b2023-08-14 08:28:29 +0000368 trap "" EXIT
369
Maxim Kuvyrkovdc5adc12023-07-01 08:02:24 +0000370- builder:
371 name: run-exit-on-failure
372 builders:
Maxim Kuvyrkov7b799fb2023-06-28 16:01:34 +0000373 - shell: |
374 #!/bin/bash
Maxim Kuvyrkov8adf09b2023-07-01 15:47:55 +0000375 source artifacts/jenkins/run-build.env
Maxim Kuvyrkov8c8e4aa2023-11-22 18:56:53 +0000376 set -ex
Maxim Kuvyrkov5a415222023-05-25 15:43:31 +0000377
Maxim Kuvyrkov7b799fb2023-06-28 16:01:34 +0000378 if [ -f artifacts/failed ]; then
379 # Mark failed build as FAILURE; no further steps will run.
380 exit $(cat artifacts/failed)
381 fi
382 # Only successful builds run beyond this point.
Maxim Kuvyrkov909dfbe2023-05-06 19:56:28 +0000383
Maxim Kuvyrkov3ab321b2023-08-14 08:28:29 +0000384 trap "" EXIT
385
Maxim Kuvyrkovb1f99992023-05-25 15:16:53 +0000386- builder:
387 name: run-push-baseline
388 builders:
Maxim Kuvyrkov7b799fb2023-06-28 16:01:34 +0000389 - shell: |
390 #!/bin/bash
Maxim Kuvyrkov8adf09b2023-07-01 15:47:55 +0000391 source artifacts/jenkins/run-build.env
Maxim Kuvyrkov8c8e4aa2023-11-22 18:56:53 +0000392 set -ex
Maxim Kuvyrkovb1f99992023-05-25 15:16:53 +0000393
Maxim Kuvyrkov7b799fb2023-06-28 16:01:34 +0000394 # Update baseline branch of base-artifacts.
395 # If we made it this far, then the build is successful
396 # (possibly because it was forced to be declared successful).
397 if [ "$update_baseline" = "ignore" ]; then
Maxim Kuvyrkova5f21f42023-08-18 16:07:57 +0000398 trap "" EXIT
Maxim Kuvyrkov7b799fb2023-06-28 16:01:34 +0000399 exit 0
400 fi
Maxim Kuvyrkov7e9dd642022-09-01 13:05:40 +0000401
Laurent Alfonsie6cb4ea2024-04-26 15:15:08 +0200402 # We may need jira token while rewriting history.
Laurent Alfonsic7a40952024-04-26 19:44:08 +0200403 if [ -f $HOME/.jipdate.yml ]; then
Laurent Alfonsie6cb4ea2024-04-26 15:15:08 +0200404 (
405 # BE CAREFUL WITH TCWG_JIRA_TOKEN
406 set +x
407 build_container_exec \
408 sed -i -e "s/#TCWG_JIRA_TOKEN#/$TCWG_JIRA_TOKEN/" \
409 "$HOME/.jipdate.yml"
410 )
411 fi
412
Maxim Kuvyrkov3ab321b2023-08-14 08:28:29 +0000413 build_container_exec \
Maxim Kuvyrkovd2207ec2024-06-28 14:10:30 +0000414 ./jenkins-scripts/rr/round-robin-baseline.sh \
Maxim Kuvyrkov7b799fb2023-06-28 16:01:34 +0000415 @@rr[top_artifacts] artifacts \
Maxim Kuvyrkov570e5ea2023-07-01 19:43:07 +0000416 __build_script {build_script} \
Maxim Kuvyrkove5b3c062023-07-01 12:45:48 +0000417 __push_base_artifacts true \
Maxim Kuvyrkov5e3db0f2023-07-01 12:46:59 +0000418 __rewrite_base_artifacts true \
Laurent Alfonsi87ab4de2024-04-25 07:34:20 +0200419 __commit_artifacts {commit_artifacts} \
Maxim Kuvyrkovc92618b2023-08-16 07:22:39 +0000420 __rewrite_num 100 \
Laurent Alfonsie2a36ca2024-11-04 13:04:24 +0100421 &> ./artifacts/jenkins/rewrite-{commit_artifacts}.log &
Maxim Kuvyrkovdbee9522023-05-06 19:39:52 +0000422
Maxim Kuvyrkovbdf8f062025-02-20 05:53:02 +0000423 res=0 && wait $! || res=$?
424
425 # Compress big files in artifacts/NN-* directories to save disk space
426 # on ci.linaro.org.
427 find artifacts/ -size +1M ! -name "*.xz" \
428 -path "artifacts/[0-9]*" -print0 \
Maxim Kuvyrkov2fc30f92025-02-20 23:33:00 +0000429 | xargs -0 -i@ xz -T0 @
Maxim Kuvyrkovbdf8f062025-02-20 05:53:02 +0000430
431 if [ $res != 0 ]; then
Maxim Kuvyrkov7b799fb2023-06-28 16:01:34 +0000432 echo "maxim.kuvyrkov@linaro.org, laurent.alfonsi@linaro.org" \
433 > artifacts/jenkins/error-mail-recipients.txt
Maxim Kuvyrkov25379cc2024-03-28 07:30:27 +0000434 echo -e "$BUILD_URL\nERROR: round-robin-baseline.sh failed" \
Maxim Kuvyrkov7b799fb2023-06-28 16:01:34 +0000435 >> artifacts/jenkins/error-mail-body.txt
Laurent Alfonsi53446912023-09-10 15:14:16 +0200436 echo "ERROR: round-robin-baseline.sh failed"
Maxim Kuvyrkov7b799fb2023-06-28 16:01:34 +0000437 # We have failed to update the baseline, so let's fail and
438 # not notify developers.
439 exit 1
440 fi
Maxim Kuvyrkov7b8d88c2022-08-30 11:04:35 +0000441
Maxim Kuvyrkov3ab321b2023-08-14 08:28:29 +0000442 trap "" EXIT
443
Laurent Alfonsia8284ec2023-11-16 10:05:38 +0100444- builder:
445 name: run-push-lnt-results
446 builders:
447 - trigger-builds:
Laurent Alfonsi1678ed72023-11-20 22:06:39 +0100448 - project: tcwg-update-lnt-results
Laurent Alfonsia8284ec2023-11-16 10:05:38 +0100449 predefined-parameters: |
Maxim Kuvyrkov67698ea2024-01-05 15:26:07 +0000450 ci_project={ci_project}
451 ci_config={ci_config}
Laurent Alfonsia8284ec2023-11-16 10:05:38 +0100452
Maxim Kuvyrkovc7719602024-01-10 09:35:19 +0000453# We place trigger-precommit-builds-2 outside of PRECOMMIT_TRIGGER_yes
454# #ifdef to get an upstream/downstream links between build/precommit jobs
455# in jenkins UI.
456- builder:
457 name: trigger-precommit-builds-2
458 builders:
459 - trigger-builds:
460 - project: '{ci_project}--{ci_config}-precommit'
461 parameter-factories:
462 - factory: filebuild
463 file-pattern: artifacts/jenkins/trigger-precommit-*
Maxim Kuvyrkoveab86202020-06-03 13:16:37 +0000464
465- builder:
Maxim Kuvyrkov99695092023-06-28 09:52:05 +0000466 name: run-build-init
Maxim Kuvyrkoveab86202020-06-03 13:16:37 +0000467 builders:
468 - shell:
469 command: |
470 #!/bin/bash
471 set -ex
472 # Delete artifacts now to avoid re-using stale artifacts if
473 # below docker-run.sh fails to start up a container.
474 rm -rf artifacts/
475 mkdir -p artifacts/jenkins
476
Maxim Kuvyrkovbc309d52023-05-25 16:08:50 +0000477 build_name="#$BUILD_NUMBER"
Maxim Kuvyrkovd3bf8272023-06-28 17:51:53 +0000478 echo "$build_name" > artifacts/jenkins/build-name
479
Laurent Alfonsia9572792024-10-24 12:00:20 +0200480 git -C jenkins-scripts submodule update --init --remote
Maxim Kuvyrkovd2207ec2024-06-28 14:10:30 +0000481
Maxim Kuvyrkov5d4ddd82024-01-17 15:12:28 +0000482 if [ "{precommit}" = "True" ]; then
Maxim Kuvyrkov02987c12024-01-10 09:43:41 +0000483 cat >> artifacts/jenkins/run-build.env <<EOF
484 update_baseline=ignore
485 EOF
486 fi
487
Maxim Kuvyrkovd3bf8272023-06-28 17:51:53 +0000488 cat >> artifacts/jenkins/run-build.env <<EOF
489 build_name="$build_name"
490 EOF
491 unstable-return: 125
492
493- builder:
494 name: run-build-skip-if-queue
495 builders:
496 - shell:
497 command: |
498 #!/bin/bash
Maxim Kuvyrkovd3bf8272023-06-28 17:51:53 +0000499 source artifacts/jenkins/run-build.env
Maxim Kuvyrkov8c8e4aa2023-11-22 18:56:53 +0000500 set -ex
Maxim Kuvyrkovbc309d52023-05-25 16:08:50 +0000501
Maxim Kuvyrkov3962f6e2021-07-15 11:08:13 +0000502 # Skip SCM-triggered builds if there are other builds in
503 # the queue. We need to process all pending bisection-triggered
504 # builds before fetching a new batch of upstream changes.
Maxim Kuvyrkovb4872112023-07-01 18:33:31 +0000505 # Re. skipping post-commit build if pre-commit queue is
506 # not empty -- it's just a favor to pre-commit builds.
Maxim Kuvyrkoveb378e42024-01-08 06:50:57 +0000507 if [ x"${{BUILD_CAUSE_SCMTRIGGER-false}}" = x"true" ] \
508 || [ x"${{BUILD_CAUSE_TIMERTRIGGER-false}}" = x"true" ]; then
Maxim Kuvyrkov972075c2024-01-08 09:19:06 +0000509 for job_type in build precommit; do
Maxim Kuvyrkove8e49eb2023-07-01 18:52:20 +0000510 url="${{JOB_URL%-build/}}-$job_type"
Laurent Alfonsib81499a2025-01-06 15:32:36 +0100511 inQueue=$(curl --retry 5 --max-time 5 -s "$url/api/xml?tree=inQueue" \
Maxim Kuvyrkovb4872112023-07-01 18:33:31 +0000512 | sed -e "s#.*<inQueue>\(.*\)</inQueue>.*#\1#")
513 if [ "$inQueue" != "false" ]; then
514 echo "SKIP SCM BUILD"
515 touch artifacts/jenkins/skip-scm-build
516 build_name="$build_name-skip-scm-build"
517 echo "$build_name" > artifacts/jenkins/build-name
Maxim Kuvyrkov3782aea2023-05-25 15:24:41 +0000518
Maxim Kuvyrkovb4872112023-07-01 18:33:31 +0000519 # Mark build unstable aka a skipped build
520 exit 125
521 fi
522 done
Maxim Kuvyrkov3962f6e2021-07-15 11:08:13 +0000523 fi
Maxim Kuvyrkov3ab321b2023-08-14 08:28:29 +0000524
525 trap "" EXIT
Maxim Kuvyrkovd3bf8272023-06-28 17:51:53 +0000526 unstable-return: 125
Maxim Kuvyrkov3962f6e2021-07-15 11:08:13 +0000527
Maxim Kuvyrkovd3bf8272023-06-28 17:51:53 +0000528- builder:
529 name: run-build-start-manifest
530 builders:
531 - shell:
532 command: |
533 #!/bin/bash
Maxim Kuvyrkovd3bf8272023-06-28 17:51:53 +0000534 source artifacts/jenkins/run-build.env
Maxim Kuvyrkov8c8e4aa2023-11-22 18:56:53 +0000535 set -ex
Maxim Kuvyrkov8adf09b2023-07-01 15:47:55 +0000536
Maxim Kuvyrkov3ab321b2023-08-14 08:28:29 +0000537 docker_opts=(
Maxim Kuvyrkovbc309d52023-05-25 16:08:50 +0000538 --distro $distro
Maxim Kuvyrkov843ba812024-09-30 06:24:27 +0000539 --node_labels "$NODE_LABELS"
Maxim Kuvyrkovbc309d52023-05-25 16:08:50 +0000540 )
541
Maxim Kuvyrkov3ab321b2023-08-14 08:28:29 +0000542 ./jenkins-scripts/start-container-docker.sh --prefix build_ \
543 "${{docker_opts[@]}}" > build_container.sh
544 source build_container.sh
545 trap "cleanup_all_containers" EXIT
546
Maxim Kuvyrkov8da7e852023-05-25 16:26:30 +0000547 # Run the build script to fetch base-artifacts/, which are
548 # required to fetch baseline sources to apply patches to in
549 # pw-apply.sh below. This also initializes the build manifest
550 # with all below settings; we then import this manifest below.
551 #
552 # The parameter __finish_after makes the build script stop
553 # after fetching the baseline and "__" avoids saving this parameter
554 # in the manifest, so that we don't see this option in the main
555 # run of the build script below.
Maxim Kuvyrkov3ab321b2023-08-14 08:28:29 +0000556 build_container_exec \
Maxim Kuvyrkov8da7e852023-05-25 16:26:30 +0000557 ./jenkins-scripts/{build_script} \
558 %%rr[top_artifacts] artifacts \
Maxim Kuvyrkov67698ea2024-01-05 15:26:07 +0000559 ==rr[ci_project] '{ci_project}' \
560 ==rr[ci_config] '{ci_config}' \
Maxim Kuvyrkov8da7e852023-05-25 16:26:30 +0000561 $extra_build_params \
562 --scripts_branch "$scripts_branch" \
563 ==rr[mode] "build" \
564 ==rr[update_baseline] "$update_baseline" \
565 --BUILD_URL "$BUILD_URL" \
Maxim Kuvyrkov8da7e852023-05-25 16:26:30 +0000566 __finish_at reset_artifacts
567
Laurent Alfonsiaf2d9852024-07-02 14:09:46 +0200568 echo "$rr_stage" > artifacts/rr_stage.txt
569
Maxim Kuvyrkov99695092023-06-28 09:52:05 +0000570 cat >> artifacts/jenkins/run-build.env <<EOF
Maxim Kuvyrkov3ab321b2023-08-14 08:28:29 +0000571 docker_opts=(${{docker_opts[@]+$(printf "%q$IFS" "${{docker_opts[@]}}")}})
572 source build_container.sh
573 trap "cleanup_all_containers" EXIT
Maxim Kuvyrkov99695092023-06-28 09:52:05 +0000574 EOF
Maxim Kuvyrkov3ab321b2023-08-14 08:28:29 +0000575
576 # Now that we have "trap cleanup_all_containers EXIT" in
577 # run-build.env we need to reset the trap at the end of every
578 # step to preserve container[s] for the next step.
579 trap "" EXIT
Maxim Kuvyrkov99695092023-06-28 09:52:05 +0000580 unstable-return: 125
581
582- builder:
Maxim Kuvyrkovd3bf8272023-06-28 17:51:53 +0000583 name: run-build-process-params
Maxim Kuvyrkov99695092023-06-28 09:52:05 +0000584 builders:
585 - shell:
586 command: |
587 #!/bin/bash
Maxim Kuvyrkov99695092023-06-28 09:52:05 +0000588 source artifacts/jenkins/run-build.env
Maxim Kuvyrkov8c8e4aa2023-11-22 18:56:53 +0000589 set -ex
Maxim Kuvyrkov99695092023-06-28 09:52:05 +0000590
591 branch_opt=()
Maxim Kuvyrkoveab86202020-06-03 13:16:37 +0000592 # 1 to skip jenkins-scripts
593 i=1
Maxim Kuvyrkov55290762024-01-05 15:47:34 +0000594 for c in binutils gcc gdb glibc linux qemu; do
Maxim Kuvyrkovaa2b43e2021-07-20 18:03:06 +0000595 eval "g=\$$$${{c}}_git"
Maxim Kuvyrkov479d5e12021-09-07 09:54:06 +0000596 if [ x"$g" = x"default" ]; then
Maxim Kuvyrkoveb378e42024-01-08 06:50:57 +0000597 if [ x"${{BUILD_CAUSE_SCMTRIGGER-false}}" = x"true" ] \
598 || [ x"${{BUILD_CAUSE_TIMERTRIGGER-false}}" = x"true" ]; then
Maxim Kuvyrkov479d5e12021-09-07 09:54:06 +0000599 g="jenkins-scm"
600 else
601 g="baseline"
602 fi
603 fi
Maxim Kuvyrkovaa2b43e2021-07-20 18:03:06 +0000604 if [ x"$g" = x"jenkins-scm" ]; then
Laurent Alfonsiaa15d362025-05-15 12:56:49 +0000605 eval "gb=\$GIT_BRANCH_$i"
606 gb=$(echo $gb | sed 's+origin/++')
607 eval "g=\$GIT_URL_$i#$gb"
Maxim Kuvyrkoveab86202020-06-03 13:16:37 +0000608 fi
609 i=$(($i+1))
Maxim Kuvyrkovbc309d52023-05-25 16:08:50 +0000610
Maxim Kuvyrkovaa2b43e2021-07-20 18:03:06 +0000611 if [ x"$g" != x"baseline" ]; then
Maxim Kuvyrkoveab86202020-06-03 13:16:37 +0000612 build_name="$build_name-$c"
Maxim Kuvyrkov99695092023-06-28 09:52:05 +0000613 branch_opt+=("==rr[${{c}}_git]" "$g")
Maxim Kuvyrkoveab86202020-06-03 13:16:37 +0000614 fi
615 done
616
Maxim Kuvyrkovd3bf8272023-06-28 17:51:53 +0000617 echo "$build_name" > artifacts/jenkins/build-name
618
Maxim Kuvyrkov99695092023-06-28 09:52:05 +0000619 cat >> artifacts/jenkins/run-build.env <<EOF
Maxim Kuvyrkov99695092023-06-28 09:52:05 +0000620 build_name="$build_name"
Maxim Kuvyrkovfcbaf902023-07-01 19:20:46 +0000621 branch_opt=(${{branch_opt[@]+$(printf "%q$IFS" "${{branch_opt[@]}}")}})
Maxim Kuvyrkov99695092023-06-28 09:52:05 +0000622 EOF
Maxim Kuvyrkov3ab321b2023-08-14 08:28:29 +0000623
624 trap "" EXIT
Maxim Kuvyrkov99695092023-06-28 09:52:05 +0000625 unstable-return: 125
626
627- builder:
628 name: run-build-main
629 builders:
630 - shell:
631 command: |
632 #!/bin/bash
Maxim Kuvyrkov99695092023-06-28 09:52:05 +0000633 source artifacts/jenkins/run-build.env
Maxim Kuvyrkov8c8e4aa2023-11-22 18:56:53 +0000634 set -ex
Maxim Kuvyrkov3a78c872023-05-28 10:25:15 +0000635
Maxim Kuvyrkov86efb0b2023-05-29 09:58:03 +0000636 # Run the build script to from the manifest created above.
637 #
638 # The parameter __start_at makes the build script start right
639 # where the above run finished. This allows us to use read-only
640 # bind-mount for base-artifacts/, which, otherwise, may require
641 # multi-gig rsync.
Maxim Kuvyrkov3ab321b2023-08-14 08:28:29 +0000642 build_container_exec \
Maxim Kuvyrkoveab86202020-06-03 13:16:37 +0000643 ./jenkins-scripts/{build_script} \
Maxim Kuvyrkov8da7e852023-05-25 16:26:30 +0000644 @@rr[top_artifacts] artifacts \
Maxim Kuvyrkov99695092023-06-28 09:52:05 +0000645 "${{branch_opt[@]}}" \
Maxim Kuvyrkov86efb0b2023-05-29 09:58:03 +0000646 __start_at reset_artifacts+ &
Maxim Kuvyrkoveab86202020-06-03 13:16:37 +0000647 res=0 && wait $! || res=$?
648
Maxim Kuvyrkov5a415222023-05-25 15:43:31 +0000649 # Update build_name
Maxim Kuvyrkovd3bf8272023-06-28 17:51:53 +0000650 if [ -f artifacts/results ]; then
651 build_name="$build_name-R$(tail -n1 artifacts/results)"
Maxim Kuvyrkoveab86202020-06-03 13:16:37 +0000652 fi
Maxim Kuvyrkovd3bf8272023-06-28 17:51:53 +0000653 if [ "$update_baseline" != "onsuccess" ]; then
654 build_name="$build_name-$update_baseline"
655 fi
656
Maxim Kuvyrkoveab86202020-06-03 13:16:37 +0000657 if [ -f artifacts/trigger-bisect ]; then
Maxim Kuvyrkov877e63b2020-09-07 15:58:14 +0000658 build_name="$build_name-trigger-bisect"
Maxim Kuvyrkoveab86202020-06-03 13:16:37 +0000659 fi
660 echo "$build_name" > artifacts/jenkins/build-name
Maxim Kuvyrkov5a415222023-05-25 15:43:31 +0000661
662 # Everything but 0 and $INTERNAL_FAILURE is an unexpected exit code,
663 # so stop here and do nothing else. From jenkins point of view ...
664 # - if $res==0: build is successful, so proceed with all
665 # followup steps -- notify, push, trigger precommit.
666 # - if $res==123: build has a regression, so proceed with triggering
667 # followup builds and sending precommit notifications; but stop
668 # before run-push-baseline by checking artifacts/failed.
669 # - if $res is anything else: build has an unexpected failure, so
670 # skip the rest of the steps by setting UNSTABLE build status.
671 # This will cause all followup conditional-steps to skip due to
672 # "current-status" condition.
673 #
674 # See comment before round-robin.sh:check_regression() for details.
675 case $res in
Maxim Kuvyrkov8441bde2023-06-30 16:07:03 +0000676 0)
677 ;;
Maxim Kuvyrkov5a415222023-05-25 15:43:31 +0000678 123)
679 echo 123 > artifacts/failed
680 ;;
681 *)
682 res=125
683 ;;
684 esac
685
686 if [ $res = 125 ]; then
687 # We had unexpected failure in the build scripts, so can't
688 # proceed with triggers and notifications. Mark this build
689 # as UNSTABLE, which will skip all following conditional-steps.
690 exit 125
691 fi
Maxim Kuvyrkov307e26e2023-08-11 10:41:28 +0000692
693 cat >> artifacts/jenkins/run-build.env <<EOF
694 build_name="$build_name"
695 EOF
Maxim Kuvyrkov3ab321b2023-08-14 08:28:29 +0000696
697 trap "" EXIT
Maxim Kuvyrkoveaa90442020-07-06 14:11:37 +0000698 unstable-return: 125
Maxim Kuvyrkovac7ff472023-06-28 07:35:50 +0000699
700- builder:
Maxim Kuvyrkov3ab321b2023-08-14 08:28:29 +0000701 name: run-build-fini
702 builders:
703 - shell:
704 command: |
705 #!/bin/bash
Maxim Kuvyrkov3ab321b2023-08-14 08:28:29 +0000706 source artifacts/jenkins/run-build.env
Maxim Kuvyrkov8c8e4aa2023-11-22 18:56:53 +0000707 set -ex
Maxim Kuvyrkov3ab321b2023-08-14 08:28:29 +0000708 # The "trap cleanup_all_containers EXIT" statement in
709 # artifacts/jenkins/run-build.env will remove build and precommit
710 # containers.
711
712- builder:
Maxim Kuvyrkovac7ff472023-06-28 07:35:50 +0000713 name: run-build
714 builders:
Maxim Kuvyrkov99695092023-06-28 09:52:05 +0000715 - conditional-step:
716 condition-kind: current-status
717 steps:
Maxim Kuvyrkov5deb8a82023-06-30 13:51:06 +0000718 - run-build-init:
Maxim Kuvyrkov02987c12024-01-10 09:43:41 +0000719 precommit: false
Maxim Kuvyrkovd3bf8272023-06-28 17:51:53 +0000720 - build-name-setter:
721 name: 'artifacts/jenkins/build-name'
722 file: true
723 - conditional-step:
724 condition-kind: current-status
725 steps:
Maxim Kuvyrkov5deb8a82023-06-30 13:51:06 +0000726 - run-build-skip-if-queue:
727 dummy: dummy
Maxim Kuvyrkovd3bf8272023-06-28 17:51:53 +0000728 - build-name-setter:
729 name: 'artifacts/jenkins/build-name'
730 file: true
731 - conditional-step:
732 condition-kind: current-status
733 steps:
734 - run-build-start-manifest:
Maxim Kuvyrkov67698ea2024-01-05 15:26:07 +0000735 ci_project: '{ci_project}'
736 ci_config: '{ci_config}'
Maxim Kuvyrkov99695092023-06-28 09:52:05 +0000737 build_script: '{build_script}'
Maxim Kuvyrkov7b799fb2023-06-28 16:01:34 +0000738 - build-name-setter:
739 name: 'artifacts/jenkins/build-name'
740 file: true
Maxim Kuvyrkov99695092023-06-28 09:52:05 +0000741 - conditional-step:
742 condition-kind: current-status
743 steps:
Maxim Kuvyrkovd3bf8272023-06-28 17:51:53 +0000744 - run-build-process-params:
Maxim Kuvyrkov55290762024-01-05 15:47:34 +0000745 dummy: dummy
Maxim Kuvyrkov99695092023-06-28 09:52:05 +0000746 - build-name-setter:
747 name: 'artifacts/jenkins/build-name'
748 file: true
749 - conditional-step:
750 condition-kind: current-status
751 steps:
Laurent Alfonsi87ab4de2024-04-25 07:34:20 +0200752 - run-push-baseline:
753 build_script: '{build_script}'
Laurent Alfonsi5a667f72024-04-25 14:49:44 +0200754 commit_artifacts: 'false'
Laurent Alfonsi87ab4de2024-04-25 07:34:20 +0200755 - conditional-step:
756 condition-kind: current-status
757 steps:
Maxim Kuvyrkov99695092023-06-28 09:52:05 +0000758 - run-build-main:
759 build_script: '{build_script}'
760 - build-name-setter:
761 name: 'artifacts/jenkins/build-name'
762 file: true
763 - conditional-step:
764 condition-kind: current-status
765 steps:
Maxim Kuvyrkovccd89ea2023-06-30 17:16:10 +0000766 - trigger-followup-builds-1:
Maxim Kuvyrkov52c3cc22024-01-05 15:40:26 +0000767 dummy: dummy
Maxim Kuvyrkovccd89ea2023-06-30 17:16:10 +0000768 - trigger-followup-builds-2:
Maxim Kuvyrkov52c3cc22024-01-05 15:40:26 +0000769 ci_project: '{ci_project}'
770 ci_config: '{ci_config}'
Maxim Kuvyrkov99695092023-06-28 09:52:05 +0000771 - build-name-setter:
772 name: 'artifacts/jenkins/build-name'
773 file: true
774 - conditional-step:
775 condition-kind: current-status
776 steps:
Maxim Kuvyrkov333b2962023-08-14 08:55:46 +0000777 - run-build-notify:
Thiago Jung Bauermann676c14a2023-09-12 12:37:40 -0300778 build_script: '{build_script}'
Maxim Kuvyrkov99695092023-06-28 09:52:05 +0000779 - build-name-setter:
780 name: 'artifacts/jenkins/build-name'
781 file: true
782 - conditional-step:
783 condition-kind: current-status
784 steps:
Maxim Kuvyrkovdc5adc12023-07-01 08:02:24 +0000785 - run-exit-on-failure:
786 dummy: dummy
787 - build-name-setter:
788 name: 'artifacts/jenkins/build-name'
789 file: true
790 - conditional-step:
791 condition-kind: current-status
792 steps:
Maxim Kuvyrkov5deb8a82023-06-30 13:51:06 +0000793 - run-push-baseline:
Maxim Kuvyrkov570e5ea2023-07-01 19:43:07 +0000794 build_script: '{build_script}'
Laurent Alfonsiaa30fa72024-04-26 10:53:34 +0200795 commit_artifacts: 'true'
Laurent Alfonsia8284ec2023-11-16 10:05:38 +0100796 - conditional-step:
797 condition-kind: current-status
798 steps:
799 - run-push-lnt-results:
Maxim Kuvyrkov67698ea2024-01-05 15:26:07 +0000800 ci_project: '{ci_project}'
801 ci_config: '{ci_config}'
Maxim Kuvyrkov99695092023-06-28 09:52:05 +0000802 - build-name-setter:
803 name: 'artifacts/jenkins/build-name'
804 file: true
Maxim Kuvyrkov3ab321b2023-08-14 08:28:29 +0000805 - conditional-step:
806 condition-kind: current-status
807 steps:
Maxim Kuvyrkovc7719602024-01-10 09:35:19 +0000808 - trigger-precommit-builds-2:
809 ci_project: '{ci_project}'
810 ci_config: '{ci_config}'
811 - build-name-setter:
812 name: 'artifacts/jenkins/build-name'
813 file: true
814 - conditional-step:
815 condition-kind: current-status
816 steps:
Maxim Kuvyrkov3ab321b2023-08-14 08:28:29 +0000817 - run-build-fini:
818 dummy: dummy
Maxim Kuvyrkoveab86202020-06-03 13:16:37 +0000819
Maxim Kuvyrkov972075c2024-01-08 09:19:06 +0000820- builder:
821 name: run-precommit-process-params
822 builders:
823 - shell:
824 command: |
825 #!/bin/bash
826 source artifacts/jenkins/run-build.env
827 set -ex
828
829 ./jenkins-scripts/start-container-docker.sh --prefix precommit_ \
830 --task precommit --secondary true "${{docker_opts[@]}}" \
831 > precommit_container.sh
832 source precommit_container.sh
833
834 precommit_container_rsync -az --del \
835 jenkins-scripts/ :jenkins-scripts/
836
837 branch_opt=()
838 for c in binutils gcc gdb glibc linux qemu; do
839 eval "g=\$$$${{c}}_git"
840 case "$g" in
841 "pw://"*|"ssh://"*)
842 # Handle pre-commit testing
843 case "$g" in
844 "pw://"*)
845 build_container_exec \
846 ./jenkins-scripts/pw-apply.sh \
847 --ci_bot '{ci_project}--{ci_config}' \
848 --project "$c" --pw_url "$g" __pw_token "$TCWG_PW_TOKEN" \
849 --build_url "$BUILD_URL" \
850 --pw_dir artifacts/jenkins/pw \
851 &> artifacts/jenkins/pw-apply.log &
852 ;;
853 "ssh://"*)
854 build_container_exec \
855 ./jenkins-scripts/precommit-ssh-apply.sh \
856 --project "$c" --pw_url "$g" \
857 --build_url "$BUILD_URL" \
858 --patch_submitter "$notify" \
859 --pw_dir artifacts/jenkins/pw \
860 &> artifacts/jenkins/precommit-ssh-apply.log &
861 ;;
862 esac
863 res=0 && wait $! || res=$?
864
865 if [ "$res" != "0" ]; then
866 build_name="$build_name-$g-$c-apply-fail"
867 echo "$build_name" > artifacts/jenkins/build-name
Maxim Kuvyrkov4bdc20b2024-01-10 14:44:19 +0000868
869 # Notify developer of failure to apply.
870 for f in mail-body.txt mail-subject.txt \
871 mail-recipients.txt; do
872 # copy the file if exists, and not emtpy.
873 # this is important for mail-recipient.txt, which may
874 # be empty.
875 if [ -s artifacts/jenkins/pw/$f ]; then
876 cp artifacts/jenkins/pw/$f artifacts/jenkins/$f
877 fi
878 done
879
880 case "$g" in
881 "ssh://"*)
882 # Build was triggered manually, so failure-to-apply
883 # is a real failure.
884 exit 1
885 ;;
886 esac
887
Maxim Kuvyrkov972075c2024-01-08 09:19:06 +0000888 # Skip the build
889 exit 125
890 fi
891
Christophe Lyon7fde5072024-09-23 14:25:59 +0000892 # Check whether we should keep or skip this commit
893 build_container_exec \
894 ./jenkins-scripts/precommit-keep-or-skip.sh \
895 --pw_dir artifacts/jenkins/pw \
896 --ci_project '{ci_project}' \
897 --ci_config '{ci_config}' \
898 --project "$c" &
899 keep=0 && wait $! || keep=$?
900
901 skip=$(declare -A pw
902 source "artifacts/jenkins/pw/$c"
903 echo "${{pw[${{c}}_skip]}}")
904
905 if $skip; then
906 build_name="$build_name-$g-$c-test-skip"
907 echo "$build_name" > artifacts/jenkins/build-name
908
909 # pw-report.sh does not use artifacts/artifacts.precommit,
910 # so it is OK to use unsafe container.
911 build_container_exec \
912 ./jenkins-scripts/pw-report.sh --pw_dir "artifacts/jenkins/pw" \
913 --check test --result skip \
Christophe Lyon13ab07e2024-10-11 18:34:03 +0000914 &> artifacts/jenkins/pw-report.log
Christophe Lyon7fde5072024-09-23 14:25:59 +0000915
916 # Skip the build
917 exit 125
918 fi
919
Maxim Kuvyrkov972075c2024-01-08 09:19:06 +0000920 patch_id=$(declare -A pw
921 source "artifacts/jenkins/pw/$c"
922 echo "${{pw[${{c}}_patch_id]}}")
923 build_name="$build_name-$g/$patch_id"
924 g=HEAD
925 precommit_container_rsync -az --del \
926 "$c/" ":$c/"
927 ;;
928 esac
929
930 if [ x"$g" != x"baseline" ]; then
931 build_name="$build_name-$c"
932 branch_opt+=("==rr[${{c}}_git]" "$g")
933 fi
934 done
935
936 # Now that artifacts/ include all necessary data (including
937 # artifacts/jenkins/pw/ directory -- rsync them into precommit
938 # container.
939 precommit_container_rsync -az --del \
940 artifacts/ :artifacts/
941
942 echo "$build_name" > artifacts/jenkins/build-name
943
944 cat >> artifacts/jenkins/run-build.env <<EOF
945 source precommit_container.sh
946 build_name="$build_name"
947 branch_opt=(${{branch_opt[@]+$(printf "%q$IFS" "${{branch_opt[@]}}")}})
948 EOF
949
950 trap "" EXIT
951 unstable-return: 125
952
953- builder:
954 name: run-precommit-main
955 builders:
956 - shell:
957 command: |
958 #!/bin/bash
959 source artifacts/jenkins/run-build.env
960 set -ex
961
962 # Run the build script to from the manifest created above.
963 #
964 # The parameter __start_at makes the build script start right
965 # where the above run finished. This allows us to use read-only
966 # bind-mount for base-artifacts/, which, otherwise, may require
967 # multi-gig rsync.
968 precommit_container_exec \
969 ./jenkins-scripts/{build_script} \
970 @@rr[top_artifacts] artifacts \
971 "${{branch_opt[@]}}" \
972 __start_at reset_artifacts+ &
973 res=0 && wait $! || res=$?
974
975 precommit_container_rsync -az --del \
976 :artifacts/ artifacts/artifacts.precommit/
977 find artifacts/artifacts.precommit -size +1M ! -name "*.xz" \
978 -print0 | xargs -0 -P0 -i@ xz -T0 @
979
980 # Everything but 0 and $INTERNAL_FAILURE is an unexpected exit code,
981 # so stop here and do nothing else. From jenkins point of view ...
982 # - if $res==0: build is successful, so proceed with all
983 # followup steps -- notify, push, trigger precommit.
984 # - if $res==123: build has a regression, so proceed with triggering
985 # followup builds and sending precommit notifications; but stop
986 # before run-push-baseline by checking artifacts/failed.
987 # - if $res is anything else: build has an unexpected failure, so
988 # skip the rest of the steps by setting UNSTABLE build status.
989 # This will cause all followup conditional-steps to skip due to
990 # "current-status" condition.
991 #
992 # See comment before round-robin.sh:check_regression() for details.
993 case $res in
994 0)
995 pw_result=pass
996 ;;
997 123)
998 echo 123 > artifacts/failed
999 pw_result=fail
1000 ;;
1001 *)
1002 res=125
1003 pw_result=ignore
1004 ;;
1005 esac
1006
1007 # pw-report.sh does not use artifacts/artifacts.precommit,
1008 # so it is OK to use unsafe container.
1009 build_container_exec \
1010 ./jenkins-scripts/pw-report.sh --pw_dir "artifacts/jenkins/pw" \
Maxim Kuvyrkov9fe0af92024-04-10 15:51:23 +00001011 --check test --result "$pw_result"
Maxim Kuvyrkov972075c2024-01-08 09:19:06 +00001012 &> artifacts/jenkins/pw-report.log &
1013 if ! wait $!; then
1014 res=125
1015 fi
1016
1017 if [ $res = 125 ]; then
1018 # We had unexpected failure in the build scripts, so can't
1019 # proceed with triggers and notifications. Mark this build
1020 # as UNSTABLE, which will skip all following conditional-steps.
1021 exit 125
1022 fi
1023
1024 cat >> artifacts/jenkins/run-build.env <<EOF
1025 build_name="$build_name"
1026 EOF
1027
1028 trap "" EXIT
1029 unstable-return: 125
1030
1031- builder:
1032 name: run-precommit-notify
1033 builders:
1034 - shell: |
1035 #!/bin/bash
1036 source artifacts/jenkins/run-build.env
1037 set -ex
1038
1039 precommit_container_exec \
Maxim Kuvyrkovd2207ec2024-06-28 14:10:30 +00001040 ./jenkins-scripts/rr/round-robin-notify.sh \
Maxim Kuvyrkov972075c2024-01-08 09:19:06 +00001041 @@rr[top_artifacts] artifacts --notify "$notify" \
1042 --pw_dir artifacts/jenkins/pw __verbose true \
1043 __build_script {build_script} \
1044 &> ./artifacts/jenkins/notify.log &
1045
1046 if ! wait $!; then
1047 echo "maxim.kuvyrkov@linaro.org, laurent.alfonsi@linaro.org" \
1048 > artifacts/jenkins/error-mail-recipients.txt
1049 echo -e "$BUILD_URL\nERROR: notify failed\n" \
1050 >> artifacts/jenkins/error-mail-body.txt
1051 echo "ERROR: notify failed"
1052 exit 1
1053 fi
1054
1055 precommit_container_rsync -az --del \
1056 :artifacts/ artifacts/artifacts.precommit/
1057 # Compress big files in artifacts.precommit/ to save disk space
1058 # on ci.linaro.org. We keep all pre-commit builds for a month,
1059 # which can result in many stored builds.
1060 find artifacts/artifacts.precommit -size +1M ! -name "*.xz" \
1061 ! -path "artifacts/artifacts.precommit/notify/*" \
1062 ! -path "artifacts/artifacts.precommit/jenkins/*" -print0 \
1063 | xargs -0 -P0 -i@ xz -T0 @
1064
1065 for f in mail-body.txt mail-subject.txt mail-recipients.txt; do
1066 # copy the file if exists, and not emtpy.
Maxim Kuvyrkov4bdc20b2024-01-10 14:44:19 +00001067 # this is important for mail-recipient.txt, which may be empty.
Maxim Kuvyrkov972075c2024-01-08 09:19:06 +00001068 if [ -s artifacts/artifacts.precommit/jenkins/$f ]; then
1069 cp artifacts/artifacts.precommit/jenkins/$f artifacts/jenkins/$f
1070 fi
1071 done
1072
1073 trap "" EXIT
1074
1075- builder:
1076 name: run-precommit
1077 builders:
1078 - conditional-step:
1079 condition-kind: current-status
1080 steps:
1081 - run-build-init:
Maxim Kuvyrkov02987c12024-01-10 09:43:41 +00001082 precommit: true
Maxim Kuvyrkov972075c2024-01-08 09:19:06 +00001083 - build-name-setter:
1084 name: 'artifacts/jenkins/build-name'
1085 file: true
1086 - conditional-step:
1087 condition-kind: current-status
1088 steps:
1089 - run-build-start-manifest:
1090 ci_project: '{ci_project}'
1091 ci_config: '{ci_config}'
1092 build_script: '{build_script}'
1093 - build-name-setter:
1094 name: 'artifacts/jenkins/build-name'
1095 file: true
1096 - conditional-step:
1097 condition-kind: current-status
1098 steps:
1099 - run-precommit-process-params:
1100 ci_project: '{ci_project}'
1101 ci_config: '{ci_config}'
1102 - build-name-setter:
1103 name: 'artifacts/jenkins/build-name'
1104 file: true
1105 - conditional-step:
1106 condition-kind: current-status
1107 steps:
1108 - run-precommit-main:
1109 build_script: '{build_script}'
1110 - build-name-setter:
1111 name: 'artifacts/jenkins/build-name'
1112 file: true
1113 - conditional-step:
1114 condition-kind: current-status
1115 steps:
1116 - run-precommit-notify:
1117 build_script: '{build_script}'
1118 - build-name-setter:
1119 name: 'artifacts/jenkins/build-name'
1120 file: true
1121 - conditional-step:
1122 condition-kind: current-status
1123 steps:
1124 - run-exit-on-failure:
1125 dummy: dummy
1126 - build-name-setter:
1127 name: 'artifacts/jenkins/build-name'
1128 file: true
1129 - conditional-step:
1130 condition-kind: current-status
1131 steps:
1132 - run-build-fini:
1133 dummy: dummy
Maxim Kuvyrkovac7ff472023-06-28 07:35:50 +00001134
Maxim Kuvyrkoveab86202020-06-03 13:16:37 +00001135- publisher:
1136 name: build-publishers
1137 publishers:
Maxim Kuvyrkov7f3f8452022-09-01 08:28:57 +00001138 - archive:
1139 artifacts: 'artifacts/**'
Laurent Alfonsiaa30fa72024-04-26 10:53:34 +02001140 latest-only: false
Laurent Alfonsicbf9a992023-11-23 16:09:27 +01001141 - html-publisher:
1142 name: 'HTML Report'
1143 dir: 'artifacts/jenkins'
1144 files: 'status.html'
1145 keep-all: true
Maxim Kuvyrkov8429b632022-08-29 15:59:34 +00001146 - email-ext:
Maxim Kuvyrkov8429b632022-08-29 15:59:34 +00001147 recipients: |
Maxim Kuvyrkovf2ea7b72023-08-16 07:59:14 +00001148 ${{FILE,path="artifacts/jenkins/mail-recipients.txt"}}
1149 reply-to: linaro-toolchain@lists.linaro.org
Maxim Kuvyrkov8429b632022-08-29 15:59:34 +00001150 subject: |
Maxim Kuvyrkovf2ea7b72023-08-16 07:59:14 +00001151 ${{FILE,path="artifacts/jenkins/mail-subject.txt"}}
Maxim Kuvyrkov8429b632022-08-29 15:59:34 +00001152 content-type: text
1153 body: |
Maxim Kuvyrkovf2ea7b72023-08-16 07:59:14 +00001154 ${{FILE,path="artifacts/jenkins/mail-body.txt"}}
1155 failure: {email_on_failure}
1156 success: {email_on_success}
Maxim Kuvyrkov8429b632022-08-29 15:59:34 +00001157 aborted: false
1158 send-to:
1159 - recipients
Maxim Kuvyrkov7e9dd642022-09-01 13:05:40 +00001160 - email-ext:
1161 recipients: |
Maxim Kuvyrkovf2ea7b72023-08-16 07:59:14 +00001162 ${{FILE,path="artifacts/jenkins/error-mail-recipients.txt"}}
Maxim Kuvyrkov7e9dd642022-09-01 13:05:40 +00001163 body: |
Maxim Kuvyrkovf2ea7b72023-08-16 07:59:14 +00001164 ${{FILE,path="artifacts/jenkins/error-mail-body.txt"}}
Maxim Kuvyrkov7e9dd642022-09-01 13:05:40 +00001165 failure: true
1166 success: true
1167 aborted: true
1168 send-to:
1169 - recipients
Christophe Lyon2b15f592023-11-27 17:32:12 +00001170 - email-ext:
1171 recipients: |
Christophe Lyond44d5322023-12-05 15:06:19 +00001172 ${{FILE,path="artifacts/jenkins/testresults-mail-recipients.txt"}}
Christophe Lyon2b15f592023-11-27 17:32:12 +00001173 reply-to: linaro-toolchain@lists.linaro.org
1174 subject: |
Christophe Lyond44d5322023-12-05 15:06:19 +00001175 ${{FILE,path="artifacts/jenkins/testresults-mail-subject.txt"}}
Christophe Lyon2b15f592023-11-27 17:32:12 +00001176 content-type: text
1177 body: |
Christophe Lyond44d5322023-12-05 15:06:19 +00001178 ${{FILE,path="artifacts/jenkins/testresults-mail-body.txt"}}
Christophe Lyon2b15f592023-11-27 17:32:12 +00001179 failure: false
Christophe Lyond44d5322023-12-05 15:06:19 +00001180 success: true
Christophe Lyon2b15f592023-11-27 17:32:12 +00001181 aborted: false
1182 send-to:
1183 - recipients
Maxim Kuvyrkoveab86202020-06-03 13:16:37 +00001184
1185- parameter:
1186 name: bisect-parameters
1187 parameters:
1188 - string:
1189 name: current_project
1190 default: ""
1191 description: "Project to bisect"
1192 - string:
Maxim Kuvyrkovaa2b43e2021-07-20 18:03:06 +00001193 name: bad_git
Maxim Kuvyrkoveab86202020-06-03 13:16:37 +00001194 default: ""
Maxim Kuvyrkovaa2b43e2021-07-20 18:03:06 +00001195 description: "Bad git_url#branch/SHA1"
Maxim Kuvyrkoveab86202020-06-03 13:16:37 +00001196 - file:
1197 name: jenkins-scripts/replay_log
1198 description: "Replay part of bisect using provided bisect log"
1199 - default-parameters:
Maxim Kuvyrkovf2023b72021-01-20 13:49:47 +00001200 distro: '{distro}'
Maxim Kuvyrkoveab86202020-06-03 13:16:37 +00001201
1202- wrapper:
1203 name: bisect-wrappers
1204 wrappers:
1205 - build-wrappers:
1206 timeout: '{timeout}'
Maxim Kuvyrkoveab86202020-06-03 13:16:37 +00001207
1208- builder:
1209 name: run-bisect
1210 builders:
1211 - shell:
1212 command: |
1213 #!/bin/bash
1214 set -ex
1215 # Delete artifacts now to avoid re-using stale artifacts if
1216 # below docker-run.sh fails to start up a container.
1217 rm -rf artifacts/
1218 mkdir -p artifacts/jenkins
1219 build_name="#$BUILD_NUMBER-$current_project"
1220 echo "$build_name" > artifacts/jenkins/build-name
Maxim Kuvyrkoveab86202020-06-03 13:16:37 +00001221
Maxim Kuvyrkov1fbec982023-07-01 18:39:54 +00001222 cat >> artifacts/jenkins/run-build.env <<EOF
1223 build_name="$build_name"
1224 EOF
1225
Maxim Kuvyrkoveab86202020-06-03 13:16:37 +00001226 ./jenkins-scripts/docker-run.sh \
1227 --distro $distro \
Maxim Kuvyrkov843ba812024-09-30 06:24:27 +00001228 --node_labels "$NODE_LABELS" \
Maxim Kuvyrkoveab86202020-06-03 13:16:37 +00001229 -- \
Maxim Kuvyrkovd2207ec2024-06-28 14:10:30 +00001230 ./jenkins-scripts/rr/round-robin-bisect.sh \
Maxim Kuvyrkov0e9e49d2022-08-08 11:02:44 +00001231 %%rel_artifacts artifacts \
Maxim Kuvyrkoveab86202020-06-03 13:16:37 +00001232 --BUILD_URL "$BUILD_URL" \
1233 --current_project "$current_project" \
Maxim Kuvyrkovaa2b43e2021-07-20 18:03:06 +00001234 --bad_git "$bad_git" \
Maxim Kuvyrkoveab86202020-06-03 13:16:37 +00001235 --replay_log "$(pwd)/jenkins-scripts/replay_log" \
1236 --build_script "./jenkins-scripts/{build_script}" \
Maxim Kuvyrkoveab86202020-06-03 13:16:37 +00001237 -- \
Maxim Kuvyrkov67698ea2024-01-05 15:26:07 +00001238 ==rr[ci_project] '{ci_project}' \
1239 ==rr[ci_config] '{ci_config}' \
Maxim Kuvyrkov18916ec2021-01-17 18:46:51 +00001240 $extra_build_params \
Maxim Kuvyrkovd35247b2021-07-12 18:01:00 +00001241 --scripts_branch "$scripts_branch" &
1242 res=0 && wait $! || res=$?
1243
1244 if [ $res != 0 ]; then
1245 echo $res > artifacts/failed
1246 fi
Maxim Kuvyrkovd35247b2021-07-12 18:01:00 +00001247 unstable-return: 125
Maxim Kuvyrkov7b799fb2023-06-28 16:01:34 +00001248 - build-name-setter:
1249 name: 'artifacts/jenkins/build-name'
1250 file: true
Maxim Kuvyrkovb9fe6a92023-05-29 15:15:14 +00001251 - conditional-step:
Maxim Kuvyrkovb9fe6a92023-05-29 15:15:14 +00001252 condition-kind: current-status
1253 steps:
Maxim Kuvyrkovc4245672023-06-30 17:22:57 +00001254 - trigger-followup-builds-1:
Maxim Kuvyrkov52c3cc22024-01-05 15:40:26 +00001255 dummy: dummy
Maxim Kuvyrkovc4245672023-06-30 17:22:57 +00001256 - trigger-followup-builds-2:
Maxim Kuvyrkov52c3cc22024-01-05 15:40:26 +00001257 ci_project: '{ci_project}'
1258 ci_config: '{ci_config}'
Maxim Kuvyrkov7b799fb2023-06-28 16:01:34 +00001259 - conditional-step:
1260 condition-kind: current-status
1261 steps:
1262 - shell: |
1263 #!/bin/bash
1264 set -ex
Maxim Kuvyrkovb9fe6a92023-05-29 15:15:14 +00001265
Maxim Kuvyrkov7b799fb2023-06-28 16:01:34 +00001266 if [ -f artifacts/failed ]; then
1267 # Mark failed build as FAILURE; no further steps will run.
1268 exit $(cat artifacts/failed)
1269 fi
Maxim Kuvyrkoveab86202020-06-03 13:16:37 +00001270
1271- publisher:
1272 name: bisect-publishers
1273 publishers:
Maxim Kuvyrkov8429b632022-08-29 15:59:34 +00001274 - archive:
1275 artifacts: 'artifacts/**'
1276 latest-only: false
1277 - email-ext:
1278 recipients: |
1279 maxim.kuvyrkov@linaro.org, laurent.alfonsi@linaro.org
1280 failure: true
1281 success: false
1282 aborted: true
1283 send-to:
1284 - recipients
Maxim Kuvyrkoveab86202020-06-03 13:16:37 +00001285#END: tcwg/round-robin.yaml.inc
1286
1287- job-template:
Laurent Alfonsi00931492023-02-21 11:10:45 +01001288 name: '{ci_project}--{toolchain_ver}-{target}{type_of_test}-build'
Maxim Kuvyrkoveab86202020-06-03 13:16:37 +00001289 project-type: freestyle
1290 defaults: global
1291 properties:
Laurent Alfonsi2ac30aa2023-08-23 16:13:37 +02001292 - build-properties:
1293 ci_project: '{ci_project}'
1294 ci_config: '{ci_config}'
Maxim Kuvyrkoveab86202020-06-03 13:16:37 +00001295 parameters:
1296 - build-parameters:
Maxim Kuvyrkov479d5e12021-09-07 09:54:06 +00001297 default_git: 'default'
Maxim Kuvyrkovf2023b72021-01-20 13:49:47 +00001298 distro: '{distro}'
Maxim Kuvyrkov7f882ce2024-01-04 18:39:24 +00001299 disabled: false
Maxim Kuvyrkov7adc4cb2023-03-17 15:50:16 +00001300 node: '{node}'
Maxim Kuvyrkoveab86202020-06-03 13:16:37 +00001301 concurrent: false
Laurent Alfonsib5d5a082023-02-23 12:08:35 +01001302 display-name: 'TCWG Build {ci_project}/{ci_config}'
Maxim Kuvyrkoveab86202020-06-03 13:16:37 +00001303 workspace: workspace/tcwg_gnu_$EXECUTOR_NUMBER
1304 scm:
Laurent Alfonsiaa15d362025-05-15 12:56:49 +00001305 - build-scms:
1306 binutils_url: '{binutils_url}'
1307 binutils_branch: '{binutils_branch}'
1308 gcc_url: '{gcc_url}'
1309 gcc_branch: '{gcc_branch}'
1310 linux_url: '{linux_url}'
1311 linux_branch: '{linux_branch}'
1312 glibc_url: '{glibc_url}'
1313 glibc_branch: '{glibc_branch}'
1314 gdb_url: '{gdb_url}'
1315 gdb_branch: '{gdb_branch}'
1316 qemu_url: '{qemu_url}'
1317 qemu_branch: '{qemu_branch}'
Maxim Kuvyrkoveab86202020-06-03 13:16:37 +00001318 triggers:
1319 - pollscm:
Maxim Kuvyrkov1e2e0392021-07-08 09:57:23 +00001320 cron: '{cron}'
Maxim Kuvyrkoveab86202020-06-03 13:16:37 +00001321 wrappers:
1322 - build-wrappers:
Maxim Kuvyrkov3f7dec32023-08-27 17:03:38 +00001323 timeout: '{timeout_build}'
Maxim Kuvyrkoveab86202020-06-03 13:16:37 +00001324 builders:
1325 - run-build:
Maxim Kuvyrkov67698ea2024-01-05 15:26:07 +00001326 ci_project: '{ci_project}'
1327 ci_config: '{ci_config}'
Maxim Kuvyrkoveab86202020-06-03 13:16:37 +00001328 build_script: 'tcwg_gnu-build.sh'
Maxim Kuvyrkovc43e60b2023-11-06 13:18:27 +00001329 docker_security: '{docker_security}'
Maxim Kuvyrkoveab86202020-06-03 13:16:37 +00001330 publishers:
Maxim Kuvyrkovf2ea7b72023-08-16 07:59:14 +00001331 - build-publishers:
1332 email_on_failure: false
1333 email_on_success: true
Maxim Kuvyrkoveab86202020-06-03 13:16:37 +00001334
Maxim Kuvyrkov972075c2024-01-08 09:19:06 +00001335- job-template:
1336 name: '{ci_project}--{toolchain_ver}-{target}{type_of_test}-precommit'
1337 project-type: freestyle
1338 defaults: global
1339 properties:
1340 - precommit-properties:
1341 ci_project: '{ci_project}'
1342 ci_config: '{ci_config}'
1343 parameters:
1344 - precommit-parameters:
1345 default_git: 'baseline'
1346 distro: '{distro}'
1347 disabled: false
1348 node: '{node}'
1349 concurrent: true
1350 display-name: 'TCWG Precommit {ci_project}/{ci_config}'
1351 workspace: workspace/tcwg_gnu_$EXECUTOR_NUMBER
1352 scm:
1353 - jenkins-scripts
1354 wrappers:
1355 - build-wrappers:
1356 timeout: 300
1357 builders:
1358 - run-precommit:
1359 ci_project: '{ci_project}'
1360 ci_config: '{ci_config}'
1361 build_script: 'tcwg_gnu-build.sh'
1362 docker_security: '{docker_security}'
1363 publishers:
1364 - build-publishers:
1365 email_on_failure: true
1366 email_on_success: false
Maxim Kuvyrkovac7ff472023-06-28 07:35:50 +00001367
Maxim Kuvyrkoveab86202020-06-03 13:16:37 +00001368- job-template:
Laurent Alfonsi00931492023-02-21 11:10:45 +01001369 name: '{ci_project}--{toolchain_ver}-{target}{type_of_test}-bisect'
Maxim Kuvyrkoveab86202020-06-03 13:16:37 +00001370 project-type: freestyle
1371 defaults: global
1372 properties:
Laurent Alfonsi2ac30aa2023-08-23 16:13:37 +02001373 - bisect-properties:
1374 ci_project: '{ci_project}'
1375 ci_config: '{ci_config}'
Maxim Kuvyrkoveab86202020-06-03 13:16:37 +00001376 parameters:
1377 - bisect-parameters:
Maxim Kuvyrkovf2023b72021-01-20 13:49:47 +00001378 distro: '{distro}'
Maxim Kuvyrkov27f48c92021-08-06 13:52:40 +00001379 disabled: false
Maxim Kuvyrkov7adc4cb2023-03-17 15:50:16 +00001380 node: '{node}'
Maxim Kuvyrkoveab86202020-06-03 13:16:37 +00001381 concurrent: false
Laurent Alfonsib5d5a082023-02-23 12:08:35 +01001382 display-name: 'TCWG Bisect {ci_project}/{ci_config}'
Maxim Kuvyrkoveab86202020-06-03 13:16:37 +00001383 workspace: workspace/tcwg_gnu_$EXECUTOR_NUMBER
1384 scm:
1385 - jenkins-scripts
1386 wrappers:
1387 - bisect-wrappers:
1388 timeout: 6000
1389 builders:
1390 - run-bisect:
Maxim Kuvyrkov67698ea2024-01-05 15:26:07 +00001391 ci_project: '{ci_project}'
1392 ci_config: '{ci_config}'
Maxim Kuvyrkoveab86202020-06-03 13:16:37 +00001393 build_script: 'tcwg_gnu-build.sh'
Maxim Kuvyrkovc43e60b2023-11-06 13:18:27 +00001394 docker_security: '{docker_security}'
Maxim Kuvyrkoveab86202020-06-03 13:16:37 +00001395 publishers:
1396 - bisect-publishers
Laurent Alfonsiaa15d362025-05-15 12:56:49 +00001397# checksum: a91685819264fa584a8e32f7bb631f04