Maxim Kuvyrkov | 27f48c9 | 2021-08-06 13:52:40 +0000 | [diff] [blame] | 1 | # Auto generated by ./tcwg/generate-yamlfiles.sh from tcwg_gnu.yaml.in and tcwg_gnu/tcwg_gnu_cross.def. Do not edit. |
Christophe Lyon | 4791645 | 2021-04-07 12:04:51 +0000 | [diff] [blame] | 2 | # Beware: git branch names need the 'refs/heads/' prefix, while tags need 'refs/tags/' |
Maxim Kuvyrkov | eab8620 | 2020-06-03 13:16:37 +0000 | [diff] [blame] | 3 | - project: |
Maxim Kuvyrkov | 27f48c9 | 2021-08-06 13:52:40 +0000 | [diff] [blame] | 4 | name: tcwg_gnu_cross |
| 5 | type_of_test: "" |
Thiago Jung Bauermann | f924a92 | 2023-08-23 16:24:29 -0300 | [diff] [blame] | 6 | timeout_build: 1000 |
Maxim Kuvyrkov | 708b9e6 | 2023-08-18 13:07:46 +0000 | [diff] [blame] | 7 | # By default, run each CI loop daily. |
| 8 | cron_master: 'H H * * *' |
Adhemerval Zanella | 1f05dc7 | 2023-07-18 14:34:02 -0300 | [diff] [blame] | 9 | docker_security: '' |
Maxim Kuvyrkov | 27f48c9 | 2021-08-06 13:52:40 +0000 | [diff] [blame] | 10 | ci_project: |
Maxim Kuvyrkov | ad929ab | 2023-02-25 12:30:16 +0000 | [diff] [blame] | 11 | - tcwg_gnu_cross_build |
Maxim Kuvyrkov | 76197c5 | 2023-03-24 14:19:01 +0000 | [diff] [blame] | 12 | - tcwg_gnu_cross_check_binutils |
Maxim Kuvyrkov | ad929ab | 2023-02-25 12:30:16 +0000 | [diff] [blame] | 13 | - tcwg_gnu_cross_check_gcc |
Maxim Kuvyrkov | eab8620 | 2020-06-03 13:16:37 +0000 | [diff] [blame] | 14 | binutils_url: git://sourceware.org/git/binutils-gdb.git |
Christophe Lyon | 60f2244 | 2025-04-30 17:06:47 +0000 | [diff] [blame] | 15 | gcc_url: git+ssh://linaroci@gcc.gnu.org/git/gcc.git |
Maxim Kuvyrkov | eab8620 | 2020-06-03 13:16:37 +0000 | [diff] [blame] | 16 | glibc_url: git://sourceware.org/git/glibc.git |
Maxim Kuvyrkov | 09a576e | 2021-08-07 12:14:50 +0000 | [diff] [blame] | 17 | gdb_url: git://sourceware.org/git/binutils-gdb.git |
Maxim Kuvyrkov | 78bc272 | 2021-08-18 12:19:18 +0000 | [diff] [blame] | 18 | qemu_url: https://gitlab.com/qemu-project/qemu.git |
Maxim Kuvyrkov | eab8620 | 2020-06-03 13:16:37 +0000 | [diff] [blame] | 19 | target: |
| 20 | - aarch64 |
| 21 | - arm |
Maxim Kuvyrkov | 7adc4cb | 2023-03-17 15:50:16 +0000 | [diff] [blame] | 22 | node: tcwg-build && tcwg-x86_64 |
Maxim Kuvyrkov | eab8620 | 2020-06-03 13:16:37 +0000 | [diff] [blame] | 23 | jobs: |
Maxim Kuvyrkov | 27f48c9 | 2021-08-06 13:52:40 +0000 | [diff] [blame] | 24 | - tcwg_gnu_cross-master |
Maxim Kuvyrkov | 9e17add | 2021-07-16 07:50:51 +0000 | [diff] [blame] | 25 | |
| 26 | - job-group: |
Maxim Kuvyrkov | 27f48c9 | 2021-08-06 13:52:40 +0000 | [diff] [blame] | 27 | name: tcwg_gnu_cross-master |
Maxim Kuvyrkov | 9e17add | 2021-07-16 07:50:51 +0000 | [diff] [blame] | 28 | toolchain_ver: master |
Maxim Kuvyrkov | 27f48c9 | 2021-08-06 13:52:40 +0000 | [diff] [blame] | 29 | cron: '{cron_master}' |
Laurent Alfonsi | 0cacf30 | 2024-06-13 14:32:10 +0200 | [diff] [blame] | 30 | binutils_branch: master |
| 31 | gcc_branch: master |
Laurent Alfonsi | f12931b | 2024-07-01 18:26:03 +0200 | [diff] [blame] | 32 | linux_url: https://gitlab.com/Linaro/lkft/mirrors/torvalds/linux-mainline.git |
Laurent Alfonsi | 0cacf30 | 2024-06-13 14:32:10 +0200 | [diff] [blame] | 33 | linux_branch: master |
| 34 | glibc_branch: master |
| 35 | gdb_branch: master |
| 36 | qemu_branch: master |
Maxim Kuvyrkov | 08ef64c | 2023-02-15 07:54:00 +0000 | [diff] [blame] | 37 | distro: default |
Maxim Kuvyrkov | 9e17add | 2021-07-16 07:50:51 +0000 | [diff] [blame] | 38 | jobs: |
Laurent Alfonsi | 0093149 | 2023-02-21 11:10:45 +0100 | [diff] [blame] | 39 | - '{ci_project}--{toolchain_ver}-{target}{type_of_test}-build' |
Maxim Kuvyrkov | 972075c | 2024-01-08 09:19:06 +0000 | [diff] [blame] | 40 | - '{ci_project}--{toolchain_ver}-{target}{type_of_test}-precommit' |
Laurent Alfonsi | 0093149 | 2023-02-21 11:10:45 +0100 | [diff] [blame] | 41 | - '{ci_project}--{toolchain_ver}-{target}{type_of_test}-bisect' |
Laurent Alfonsi | b5d5a08 | 2023-02-23 12:08:35 +0100 | [diff] [blame] | 42 | ci_config: '{toolchain_ver}-{target}{type_of_test}' |
Maxim Kuvyrkov | 9e17add | 2021-07-16 07:50:51 +0000 | [diff] [blame] | 43 | |
Maxim Kuvyrkov | eab8620 | 2020-06-03 13:16:37 +0000 | [diff] [blame] | 44 | #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 Copeland | 9dc2eb8 | 2022-10-11 12:40:33 +0100 | [diff] [blame] | 57 | everyone-flat: |
Maxim Kuvyrkov | eab8620 | 2020-06-03 13:16:37 +0000 | [diff] [blame] | 58 | - job-build |
| 59 | - job-cancel |
| 60 | - build-discarder: |
Maxim Kuvyrkov | 5e1f666 | 2025-02-20 05:32:41 +0000 | [diff] [blame] | 61 | days-to-keep: 20 |
Maxim Kuvyrkov | 470ea17 | 2021-01-15 13:45:09 +0000 | [diff] [blame] | 62 | |
| 63 | - scm: |
| 64 | name: jenkins-scripts |
| 65 | scm: |
| 66 | - git: |
Laurent Alfonsi | 3c7c10a | 2025-04-17 17:04:51 +0200 | [diff] [blame] | 67 | url: https://gitlab.com/Linaro/tcwg/jenkins-scripts.git |
Maxim Kuvyrkov | 470ea17 | 2021-01-15 13:45:09 +0000 | [diff] [blame] | 68 | 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 Kuvyrkov | 83939c1 | 2021-03-23 08:53:54 +0000 | [diff] [blame] | 78 | |
Maxim Kuvyrkov | eab8620 | 2020-06-03 13:16:37 +0000 | [diff] [blame] | 79 | #END: tcwg/default.yaml.inc |
| 80 | |
| 81 | - parameter: |
| 82 | name: default-parameters |
| 83 | parameters: |
| 84 | - string: |
Maxim Kuvyrkov | eab8620 | 2020-06-03 13:16:37 +0000 | [diff] [blame] | 85 | name: extra_build_params |
| 86 | default: "" |
Maxim Kuvyrkov | 5eed305 | 2021-06-24 15:55:59 +0000 | [diff] [blame] | 87 | description: "Extra parameters to pass to the build script; can be used to override settings extracted from ci_project/ci_config" |
Maxim Kuvyrkov | eab8620 | 2020-06-03 13:16:37 +0000 | [diff] [blame] | 88 | - string: |
Maxim Kuvyrkov | eab8620 | 2020-06-03 13:16:37 +0000 | [diff] [blame] | 89 | name: distro |
Maxim Kuvyrkov | f2023b7 | 2021-01-20 13:49:47 +0000 | [diff] [blame] | 90 | default: '{distro}' |
Maxim Kuvyrkov | eab8620 | 2020-06-03 13:16:37 +0000 | [diff] [blame] | 91 | description: 'Distro image to use' |
| 92 | - string: |
| 93 | name: scripts_branch |
| 94 | default: master |
| 95 | description: 'Scripts revision to use' |
| 96 | |
Maxim Kuvyrkov | eab8620 | 2020-06-03 13:16:37 +0000 | [diff] [blame] | 97 | - parameter: |
| 98 | name: component-parameters |
| 99 | parameters: |
| 100 | - string: |
Maxim Kuvyrkov | aa2b43e | 2021-07-20 18:03:06 +0000 | [diff] [blame] | 101 | name: '{component}_git' |
| 102 | default: '{default_git}' |
Christophe Lyon | 1290bab | 2024-02-13 22:23:45 +0000 | [diff] [blame] | 103 | 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 Kuvyrkov | eab8620 | 2020-06-03 13:16:37 +0000 | [diff] [blame] | 104 | |
| 105 | - parameter: |
Maxim Kuvyrkov | c81e472 | 2023-11-22 18:11:33 +0000 | [diff] [blame] | 106 | name: all-component-parameters |
Maxim Kuvyrkov | eab8620 | 2020-06-03 13:16:37 +0000 | [diff] [blame] | 107 | parameters: |
| 108 | - component-parameters: |
| 109 | component: binutils |
Maxim Kuvyrkov | aa2b43e | 2021-07-20 18:03:06 +0000 | [diff] [blame] | 110 | default_git: '{default_git}' |
Maxim Kuvyrkov | eab8620 | 2020-06-03 13:16:37 +0000 | [diff] [blame] | 111 | - component-parameters: |
| 112 | component: gcc |
Maxim Kuvyrkov | aa2b43e | 2021-07-20 18:03:06 +0000 | [diff] [blame] | 113 | default_git: '{default_git}' |
Maxim Kuvyrkov | eab8620 | 2020-06-03 13:16:37 +0000 | [diff] [blame] | 114 | - component-parameters: |
Maxim Kuvyrkov | 09a576e | 2021-08-07 12:14:50 +0000 | [diff] [blame] | 115 | component: gdb |
| 116 | default_git: '{default_git}' |
| 117 | - component-parameters: |
Maxim Kuvyrkov | eab8620 | 2020-06-03 13:16:37 +0000 | [diff] [blame] | 118 | component: glibc |
Maxim Kuvyrkov | aa2b43e | 2021-07-20 18:03:06 +0000 | [diff] [blame] | 119 | default_git: '{default_git}' |
Maxim Kuvyrkov | 4a6a0cf | 2020-06-19 15:18:18 +0000 | [diff] [blame] | 120 | - component-parameters: |
Maxim Kuvyrkov | f8e3c4f | 2021-08-08 08:58:56 +0000 | [diff] [blame] | 121 | component: linux |
| 122 | default_git: '{default_git}' |
| 123 | - component-parameters: |
Maxim Kuvyrkov | 4a6a0cf | 2020-06-19 15:18:18 +0000 | [diff] [blame] | 124 | component: qemu |
Maxim Kuvyrkov | aa2b43e | 2021-07-20 18:03:06 +0000 | [diff] [blame] | 125 | default_git: '{default_git}' |
Maxim Kuvyrkov | c81e472 | 2023-11-22 18:11:33 +0000 | [diff] [blame] | 126 | |
| 127 | - parameter: |
| 128 | name: build-parameters |
| 129 | parameters: |
| 130 | - all-component-parameters: |
| 131 | default_git: '{default_git}' |
Maxim Kuvyrkov | eab8620 | 2020-06-03 13:16:37 +0000 | [diff] [blame] | 132 | - choice: |
| 133 | name: update_baseline |
| 134 | choices: |
Maxim Kuvyrkov | af6009c | 2022-08-05 15:52:12 +0000 | [diff] [blame] | 135 | - onsuccess |
| 136 | - force |
Maxim Kuvyrkov | eab8620 | 2020-06-03 13:16:37 +0000 | [diff] [blame] | 137 | - init |
Prathamesh Kulkarni | 77452f0 | 2022-06-30 18:26:44 +0530 | [diff] [blame] | 138 | - ignore |
Maxim Kuvyrkov | eab8620 | 2020-06-03 13:16:37 +0000 | [diff] [blame] | 139 | description: "What to do with baseline in this build" |
Maxim Kuvyrkov | 069813f | 2023-05-06 19:17:00 +0000 | [diff] [blame] | 140 | - choice: |
| 141 | name: notify |
| 142 | choices: |
| 143 | - ignore |
| 144 | - onregression |
Maxim Kuvyrkov | 333b296 | 2023-08-14 08:55:46 +0000 | [diff] [blame] | 145 | - precommit |
Maxim Kuvyrkov | 069813f | 2023-05-06 19:17:00 +0000 | [diff] [blame] | 146 | description: "Whether to notify developers about the result of this build" |
Laurent Alfonsi | 464db22 | 2024-05-28 14:09:45 +0200 | [diff] [blame] | 147 | - string: |
Laurent Alfonsi | 8527d66 | 2024-05-24 16:27:08 +0200 | [diff] [blame] | 148 | name: rr_stage |
| 149 | default: build |
| 150 | description: "Describe the current round-robin stage for this run (informative only)" |
Maxim Kuvyrkov | eab8620 | 2020-06-03 13:16:37 +0000 | [diff] [blame] | 151 | - default-parameters: |
Maxim Kuvyrkov | f2023b7 | 2021-01-20 13:49:47 +0000 | [diff] [blame] | 152 | distro: '{distro}' |
Laurent Alfonsi | 87ab4de | 2024-04-25 07:34:20 +0200 | [diff] [blame] | 153 | |
Maxim Kuvyrkov | 972075c | 2024-01-08 09:19:06 +0000 | [diff] [blame] | 154 | # 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 Kuvyrkov | 972075c | 2024-01-08 09:19:06 +0000 | [diff] [blame] | 162 | - string: |
| 163 | name: notify |
| 164 | default: 'precommit' |
| 165 | description: "Email to send failure notifications to" |
| 166 | - default-parameters: |
| 167 | distro: '{distro}' |
Maxim Kuvyrkov | eab8620 | 2020-06-03 13:16:37 +0000 | [diff] [blame] | 168 | |
Laurent Alfonsi | 2ac30aa | 2023-08-23 16:13:37 +0200 | [diff] [blame] | 169 | - 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 Kuvyrkov | 972075c | 2024-01-08 09:19:06 +0000 | [diff] [blame] | 178 | - property: |
| 179 | name: precommit-properties |
| 180 | properties: |
| 181 | - default-properties |
| 182 | - build-blocker: |
| 183 | blocking-jobs: |
| 184 | - '{ci_project}--{ci_config}-build' |
Maxim Kuvyrkov | 4f69094 | 2024-01-11 17:50:15 +0000 | [diff] [blame] | 185 | queue-scanning: 'BUILDABLE' |
Maxim Kuvyrkov | ab90c43 | 2024-01-08 08:51:26 +0000 | [diff] [blame] | 186 | |
Laurent Alfonsi | 2ac30aa | 2023-08-23 16:13:37 +0200 | [diff] [blame] | 187 | - 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 Lyon | 4791645 | 2021-04-07 12:04:51 +0000 | [diff] [blame] | 201 | # Beware: git branch names need the 'refs/heads/' prefix while tags |
| 202 | # need 'refs/tags/'. |
Maxim Kuvyrkov | eab8620 | 2020-06-03 13:16:37 +0000 | [diff] [blame] | 203 | - scm: |
| 204 | name: component-scm |
| 205 | scm: |
| 206 | - git: |
| 207 | url: '{url}' |
| 208 | branches: |
Laurent Alfonsi | 0cacf30 | 2024-06-13 14:32:10 +0200 | [diff] [blame] | 209 | - 'refs/heads/{branch}' |
Maxim Kuvyrkov | eab8620 | 2020-06-03 13:16:37 +0000 | [diff] [blame] | 210 | basedir: '{component}' |
Laurent Alfonsi | cdf084e | 2024-06-28 14:50:37 +0200 | [diff] [blame] | 211 | do-not-fetch-tags: true |
Maxim Kuvyrkov | e421fb7 | 2020-06-19 11:26:02 +0000 | [diff] [blame] | 212 | reference-repo: '/home/tcwg-buildslave/snapshots-ref/{reference}' |
Laurent Alfonsi | 1ed7e3f | 2024-06-25 14:52:06 +0200 | [diff] [blame] | 213 | refspec: '+refs/heads/{branch}:refs/remotes/origin/{branch}' |
Laurent Alfonsi | 0cde275 | 2024-06-13 14:32:10 +0200 | [diff] [blame] | 214 | shallow-clone: true |
Maxim Kuvyrkov | eab8620 | 2020-06-03 13:16:37 +0000 | [diff] [blame] | 215 | wipe-workspace: false |
| 216 | clean: |
| 217 | before: true |
| 218 | prune: true |
| 219 | |
Maxim Kuvyrkov | 54c2131 | 2020-06-03 13:55:17 +0000 | [diff] [blame] | 220 | # 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 Kuvyrkov | eab8620 | 2020-06-03 13:16:37 +0000 | [diff] [blame] | 225 | - scm: |
| 226 | name: build-scms |
| 227 | scm: |
| 228 | - jenkins-scripts |
Laurent Alfonsi | aa15d36 | 2025-05-15 12:56:49 +0000 | [diff] [blame^] | 229 | - 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 Kuvyrkov | eab8620 | 2020-06-03 13:16:37 +0000 | [diff] [blame] | 259 | |
| 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 Lyon | ee8d3e8 | 2025-04-29 13:50:15 +0000 | [diff] [blame] | 270 | - 'tcwg-buildslave-20220725' |
Maxim Kuvyrkov | 972075c | 2024-01-08 09:19:06 +0000 | [diff] [blame] | 271 | # - 'tcwg-build-20220725' |
Maxim Kuvyrkov | 7f0f180 | 2022-09-01 08:30:58 +0000 | [diff] [blame] | 272 | - credentials-binding: |
| 273 | - text: |
| 274 | credential-id: TCWG_JIRA_TOKEN |
| 275 | variable: TCWG_JIRA_TOKEN |
Maxim Kuvyrkov | eab8620 | 2020-06-03 13:16:37 +0000 | [diff] [blame] | 276 | |
| 277 | - builder: |
Maxim Kuvyrkov | ccd89ea | 2023-06-30 17:16:10 +0000 | [diff] [blame] | 278 | name: trigger-followup-builds-1 |
Maxim Kuvyrkov | eab8620 | 2020-06-03 13:16:37 +0000 | [diff] [blame] | 279 | builders: |
Maxim Kuvyrkov | 7b799fb | 2023-06-28 16:01:34 +0000 | [diff] [blame] | 280 | - shell: | |
| 281 | #!/bin/bash |
Maxim Kuvyrkov | 8adf09b | 2023-07-01 15:47:55 +0000 | [diff] [blame] | 282 | source artifacts/jenkins/run-build.env |
Maxim Kuvyrkov | 8c8e4aa | 2023-11-22 18:56:53 +0000 | [diff] [blame] | 283 | set -ex |
Maxim Kuvyrkov | 8adf09b | 2023-07-01 15:47:55 +0000 | [diff] [blame] | 284 | |
Maxim Kuvyrkov | 7b799fb | 2023-06-28 16:01:34 +0000 | [diff] [blame] | 285 | for i in artifacts/trigger-build-* artifacts/trigger-bisect; do |
| 286 | if [ -f $i ]; then |
Maxim Kuvyrkov | 7b799fb | 2023-06-28 16:01:34 +0000 | [diff] [blame] | 287 | echo "distro=$distro" >> $i |
| 288 | echo "scripts_branch=$scripts_branch" >> $i |
| 289 | fi |
| 290 | done |
Maxim Kuvyrkov | ccd89ea | 2023-06-30 17:16:10 +0000 | [diff] [blame] | 291 | |
Maxim Kuvyrkov | 3ab321b | 2023-08-14 08:28:29 +0000 | [diff] [blame] | 292 | trap "" EXIT |
| 293 | |
Maxim Kuvyrkov | ccd89ea | 2023-06-30 17:16:10 +0000 | [diff] [blame] | 294 | - builder: |
| 295 | name: trigger-followup-builds-2 |
| 296 | builders: |
Maxim Kuvyrkov | 7b799fb | 2023-06-28 16:01:34 +0000 | [diff] [blame] | 297 | - trigger-builds: |
Maxim Kuvyrkov | 52c3cc2 | 2024-01-05 15:40:26 +0000 | [diff] [blame] | 298 | - project: '{ci_project}--{ci_config}-build' |
Maxim Kuvyrkov | 7b799fb | 2023-06-28 16:01:34 +0000 | [diff] [blame] | 299 | parameter-factories: |
| 300 | - factory: filebuild |
| 301 | file-pattern: artifacts/trigger-build-* |
Maxim Kuvyrkov | 52c3cc2 | 2024-01-05 15:40:26 +0000 | [diff] [blame] | 302 | - project: '{ci_project}--{ci_config}-bisect' |
Maxim Kuvyrkov | 7b799fb | 2023-06-28 16:01:34 +0000 | [diff] [blame] | 303 | property-file: artifacts/trigger-bisect |
Maxim Kuvyrkov | 12858ec | 2023-05-03 18:38:05 +0000 | [diff] [blame] | 304 | |
| 305 | - builder: |
Maxim Kuvyrkov | 333b296 | 2023-08-14 08:55:46 +0000 | [diff] [blame] | 306 | name: run-build-notify |
Maxim Kuvyrkov | 12858ec | 2023-05-03 18:38:05 +0000 | [diff] [blame] | 307 | builders: |
Maxim Kuvyrkov | 7b799fb | 2023-06-28 16:01:34 +0000 | [diff] [blame] | 308 | - shell: | |
| 309 | #!/bin/bash |
Maxim Kuvyrkov | 8adf09b | 2023-07-01 15:47:55 +0000 | [diff] [blame] | 310 | source artifacts/jenkins/run-build.env |
Maxim Kuvyrkov | 8c8e4aa | 2023-11-22 18:56:53 +0000 | [diff] [blame] | 311 | set -ex |
Maxim Kuvyrkov | 7e9dd64 | 2022-09-01 13:05:40 +0000 | [diff] [blame] | 312 | |
Maxim Kuvyrkov | 7b799fb | 2023-06-28 16:01:34 +0000 | [diff] [blame] | 313 | if [ -f artifacts/failed ]; then |
Maxim Kuvyrkov | ab01ec0 | 2023-08-14 08:52:38 +0000 | [diff] [blame] | 314 | # Only send notifications for forced successful |
| 315 | # (aka "onregression") builds; never for failed builds. |
Laurent Alfonsi | a723e00 | 2023-10-02 15:25:05 +0200 | [diff] [blame] | 316 | echo "Build failed. Using option notify=ignore." |
Maxim Kuvyrkov | ab01ec0 | 2023-08-14 08:52:38 +0000 | [diff] [blame] | 317 | notify=ignore |
Maxim Kuvyrkov | 7b799fb | 2023-06-28 16:01:34 +0000 | [diff] [blame] | 318 | fi |
Maxim Kuvyrkov | b1f9999 | 2023-05-25 15:16:53 +0000 | [diff] [blame] | 319 | |
Maxim Kuvyrkov | 7b799fb | 2023-06-28 16:01:34 +0000 | [diff] [blame] | 320 | # Basic notification -- create entry in interesting-commits. |
Maxim Kuvyrkov | 835cfc2 | 2023-07-04 15:40:32 +0000 | [diff] [blame] | 321 | # 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 Kuvyrkov | 3ab321b | 2023-08-14 08:28:29 +0000 | [diff] [blame] | 324 | build_container_exec \ |
Maxim Kuvyrkov | d2207ec | 2024-06-28 14:10:30 +0000 | [diff] [blame] | 325 | ./jenkins-scripts/rr/round-robin-notify.sh \ |
Maxim Kuvyrkov | 835cfc2 | 2023-07-04 15:40:32 +0000 | [diff] [blame] | 326 | @@rr[top_artifacts] artifacts --notify "$notify" \ |
| 327 | __stage init __verbose true \ |
Thiago Jung Bauermann | 676c14a | 2023-09-12 12:37:40 -0300 | [diff] [blame] | 328 | __build_script {build_script} \ |
Maxim Kuvyrkov | 333b296 | 2023-08-14 08:55:46 +0000 | [diff] [blame] | 329 | &> ./artifacts/jenkins/notify-init.log & |
Maxim Kuvyrkov | 3966f7e | 2023-06-16 13:36:25 +0000 | [diff] [blame] | 330 | |
Maxim Kuvyrkov | 7b799fb | 2023-06-28 16:01:34 +0000 | [diff] [blame] | 331 | 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 Alfonsi | 5344691 | 2023-09-10 15:14:16 +0200 | [diff] [blame] | 336 | echo "ERROR: notify-init failed" |
Maxim Kuvyrkov | 7b799fb | 2023-06-28 16:01:34 +0000 | [diff] [blame] | 337 | exit 1 |
| 338 | fi |
Maxim Kuvyrkov | 3966f7e | 2023-06-16 13:36:25 +0000 | [diff] [blame] | 339 | |
Maxim Kuvyrkov | 7b799fb | 2023-06-28 16:01:34 +0000 | [diff] [blame] | 340 | # Full notification |
| 341 | echo "NOTE: Notify developers about this build" |
Maxim Kuvyrkov | e8a1954 | 2023-12-26 10:12:55 +0000 | [diff] [blame] | 342 | |
Maxim Kuvyrkov | 3ab321b | 2023-08-14 08:28:29 +0000 | [diff] [blame] | 343 | build_container_exec \ |
Maxim Kuvyrkov | d2207ec | 2024-06-28 14:10:30 +0000 | [diff] [blame] | 344 | ./jenkins-scripts/rr/round-robin-notify.sh \ |
Maxim Kuvyrkov | e8a1954 | 2023-12-26 10:12:55 +0000 | [diff] [blame] | 345 | @@rr[top_artifacts] artifacts __stage full __verbose true \ |
Thiago Jung Bauermann | 676c14a | 2023-09-12 12:37:40 -0300 | [diff] [blame] | 346 | __build_script {build_script} \ |
Maxim Kuvyrkov | 333b296 | 2023-08-14 08:55:46 +0000 | [diff] [blame] | 347 | &> ./artifacts/jenkins/notify-full.log & |
Maxim Kuvyrkov | 7e9dd64 | 2022-09-01 13:05:40 +0000 | [diff] [blame] | 348 | |
Maxim Kuvyrkov | 7b799fb | 2023-06-28 16:01:34 +0000 | [diff] [blame] | 349 | 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 Alfonsi | 5344691 | 2023-09-10 15:14:16 +0200 | [diff] [blame] | 354 | echo "ERROR: notify-full failed" |
Maxim Kuvyrkov | 7b799fb | 2023-06-28 16:01:34 +0000 | [diff] [blame] | 355 | fi |
Maxim Kuvyrkov | 7b8d88c | 2022-08-30 11:04:35 +0000 | [diff] [blame] | 356 | |
Maxim Kuvyrkov | 7b799fb | 2023-06-28 16:01:34 +0000 | [diff] [blame] | 357 | # 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 Kuvyrkov | dc5adc1 | 2023-07-01 08:02:24 +0000 | [diff] [blame] | 367 | |
Maxim Kuvyrkov | 3ab321b | 2023-08-14 08:28:29 +0000 | [diff] [blame] | 368 | trap "" EXIT |
| 369 | |
Maxim Kuvyrkov | dc5adc1 | 2023-07-01 08:02:24 +0000 | [diff] [blame] | 370 | - builder: |
| 371 | name: run-exit-on-failure |
| 372 | builders: |
Maxim Kuvyrkov | 7b799fb | 2023-06-28 16:01:34 +0000 | [diff] [blame] | 373 | - shell: | |
| 374 | #!/bin/bash |
Maxim Kuvyrkov | 8adf09b | 2023-07-01 15:47:55 +0000 | [diff] [blame] | 375 | source artifacts/jenkins/run-build.env |
Maxim Kuvyrkov | 8c8e4aa | 2023-11-22 18:56:53 +0000 | [diff] [blame] | 376 | set -ex |
Maxim Kuvyrkov | 5a41522 | 2023-05-25 15:43:31 +0000 | [diff] [blame] | 377 | |
Maxim Kuvyrkov | 7b799fb | 2023-06-28 16:01:34 +0000 | [diff] [blame] | 378 | 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 Kuvyrkov | 909dfbe | 2023-05-06 19:56:28 +0000 | [diff] [blame] | 383 | |
Maxim Kuvyrkov | 3ab321b | 2023-08-14 08:28:29 +0000 | [diff] [blame] | 384 | trap "" EXIT |
| 385 | |
Maxim Kuvyrkov | b1f9999 | 2023-05-25 15:16:53 +0000 | [diff] [blame] | 386 | - builder: |
| 387 | name: run-push-baseline |
| 388 | builders: |
Maxim Kuvyrkov | 7b799fb | 2023-06-28 16:01:34 +0000 | [diff] [blame] | 389 | - shell: | |
| 390 | #!/bin/bash |
Maxim Kuvyrkov | 8adf09b | 2023-07-01 15:47:55 +0000 | [diff] [blame] | 391 | source artifacts/jenkins/run-build.env |
Maxim Kuvyrkov | 8c8e4aa | 2023-11-22 18:56:53 +0000 | [diff] [blame] | 392 | set -ex |
Maxim Kuvyrkov | b1f9999 | 2023-05-25 15:16:53 +0000 | [diff] [blame] | 393 | |
Maxim Kuvyrkov | 7b799fb | 2023-06-28 16:01:34 +0000 | [diff] [blame] | 394 | # 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 Kuvyrkov | a5f21f4 | 2023-08-18 16:07:57 +0000 | [diff] [blame] | 398 | trap "" EXIT |
Maxim Kuvyrkov | 7b799fb | 2023-06-28 16:01:34 +0000 | [diff] [blame] | 399 | exit 0 |
| 400 | fi |
Maxim Kuvyrkov | 7e9dd64 | 2022-09-01 13:05:40 +0000 | [diff] [blame] | 401 | |
Laurent Alfonsi | e6cb4ea | 2024-04-26 15:15:08 +0200 | [diff] [blame] | 402 | # We may need jira token while rewriting history. |
Laurent Alfonsi | c7a4095 | 2024-04-26 19:44:08 +0200 | [diff] [blame] | 403 | if [ -f $HOME/.jipdate.yml ]; then |
Laurent Alfonsi | e6cb4ea | 2024-04-26 15:15:08 +0200 | [diff] [blame] | 404 | ( |
| 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 Kuvyrkov | 3ab321b | 2023-08-14 08:28:29 +0000 | [diff] [blame] | 413 | build_container_exec \ |
Maxim Kuvyrkov | d2207ec | 2024-06-28 14:10:30 +0000 | [diff] [blame] | 414 | ./jenkins-scripts/rr/round-robin-baseline.sh \ |
Maxim Kuvyrkov | 7b799fb | 2023-06-28 16:01:34 +0000 | [diff] [blame] | 415 | @@rr[top_artifacts] artifacts \ |
Maxim Kuvyrkov | 570e5ea | 2023-07-01 19:43:07 +0000 | [diff] [blame] | 416 | __build_script {build_script} \ |
Maxim Kuvyrkov | e5b3c06 | 2023-07-01 12:45:48 +0000 | [diff] [blame] | 417 | __push_base_artifacts true \ |
Maxim Kuvyrkov | 5e3db0f | 2023-07-01 12:46:59 +0000 | [diff] [blame] | 418 | __rewrite_base_artifacts true \ |
Laurent Alfonsi | 87ab4de | 2024-04-25 07:34:20 +0200 | [diff] [blame] | 419 | __commit_artifacts {commit_artifacts} \ |
Maxim Kuvyrkov | c92618b | 2023-08-16 07:22:39 +0000 | [diff] [blame] | 420 | __rewrite_num 100 \ |
Laurent Alfonsi | e2a36ca | 2024-11-04 13:04:24 +0100 | [diff] [blame] | 421 | &> ./artifacts/jenkins/rewrite-{commit_artifacts}.log & |
Maxim Kuvyrkov | dbee952 | 2023-05-06 19:39:52 +0000 | [diff] [blame] | 422 | |
Maxim Kuvyrkov | bdf8f06 | 2025-02-20 05:53:02 +0000 | [diff] [blame] | 423 | 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 Kuvyrkov | 2fc30f9 | 2025-02-20 23:33:00 +0000 | [diff] [blame] | 429 | | xargs -0 -i@ xz -T0 @ |
Maxim Kuvyrkov | bdf8f06 | 2025-02-20 05:53:02 +0000 | [diff] [blame] | 430 | |
| 431 | if [ $res != 0 ]; then |
Maxim Kuvyrkov | 7b799fb | 2023-06-28 16:01:34 +0000 | [diff] [blame] | 432 | echo "maxim.kuvyrkov@linaro.org, laurent.alfonsi@linaro.org" \ |
| 433 | > artifacts/jenkins/error-mail-recipients.txt |
Maxim Kuvyrkov | 25379cc | 2024-03-28 07:30:27 +0000 | [diff] [blame] | 434 | echo -e "$BUILD_URL\nERROR: round-robin-baseline.sh failed" \ |
Maxim Kuvyrkov | 7b799fb | 2023-06-28 16:01:34 +0000 | [diff] [blame] | 435 | >> artifacts/jenkins/error-mail-body.txt |
Laurent Alfonsi | 5344691 | 2023-09-10 15:14:16 +0200 | [diff] [blame] | 436 | echo "ERROR: round-robin-baseline.sh failed" |
Maxim Kuvyrkov | 7b799fb | 2023-06-28 16:01:34 +0000 | [diff] [blame] | 437 | # We have failed to update the baseline, so let's fail and |
| 438 | # not notify developers. |
| 439 | exit 1 |
| 440 | fi |
Maxim Kuvyrkov | 7b8d88c | 2022-08-30 11:04:35 +0000 | [diff] [blame] | 441 | |
Maxim Kuvyrkov | 3ab321b | 2023-08-14 08:28:29 +0000 | [diff] [blame] | 442 | trap "" EXIT |
| 443 | |
Laurent Alfonsi | a8284ec | 2023-11-16 10:05:38 +0100 | [diff] [blame] | 444 | - builder: |
| 445 | name: run-push-lnt-results |
| 446 | builders: |
| 447 | - trigger-builds: |
Laurent Alfonsi | 1678ed7 | 2023-11-20 22:06:39 +0100 | [diff] [blame] | 448 | - project: tcwg-update-lnt-results |
Laurent Alfonsi | a8284ec | 2023-11-16 10:05:38 +0100 | [diff] [blame] | 449 | predefined-parameters: | |
Maxim Kuvyrkov | 67698ea | 2024-01-05 15:26:07 +0000 | [diff] [blame] | 450 | ci_project={ci_project} |
| 451 | ci_config={ci_config} |
Laurent Alfonsi | a8284ec | 2023-11-16 10:05:38 +0100 | [diff] [blame] | 452 | |
Maxim Kuvyrkov | c771960 | 2024-01-10 09:35:19 +0000 | [diff] [blame] | 453 | # 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 Kuvyrkov | eab8620 | 2020-06-03 13:16:37 +0000 | [diff] [blame] | 464 | |
| 465 | - builder: |
Maxim Kuvyrkov | 9969509 | 2023-06-28 09:52:05 +0000 | [diff] [blame] | 466 | name: run-build-init |
Maxim Kuvyrkov | eab8620 | 2020-06-03 13:16:37 +0000 | [diff] [blame] | 467 | 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 Kuvyrkov | bc309d5 | 2023-05-25 16:08:50 +0000 | [diff] [blame] | 477 | build_name="#$BUILD_NUMBER" |
Maxim Kuvyrkov | d3bf827 | 2023-06-28 17:51:53 +0000 | [diff] [blame] | 478 | echo "$build_name" > artifacts/jenkins/build-name |
| 479 | |
Laurent Alfonsi | a957279 | 2024-10-24 12:00:20 +0200 | [diff] [blame] | 480 | git -C jenkins-scripts submodule update --init --remote |
Maxim Kuvyrkov | d2207ec | 2024-06-28 14:10:30 +0000 | [diff] [blame] | 481 | |
Maxim Kuvyrkov | 5d4ddd8 | 2024-01-17 15:12:28 +0000 | [diff] [blame] | 482 | if [ "{precommit}" = "True" ]; then |
Maxim Kuvyrkov | 02987c1 | 2024-01-10 09:43:41 +0000 | [diff] [blame] | 483 | cat >> artifacts/jenkins/run-build.env <<EOF |
| 484 | update_baseline=ignore |
| 485 | EOF |
| 486 | fi |
| 487 | |
Maxim Kuvyrkov | d3bf827 | 2023-06-28 17:51:53 +0000 | [diff] [blame] | 488 | 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 Kuvyrkov | d3bf827 | 2023-06-28 17:51:53 +0000 | [diff] [blame] | 499 | source artifacts/jenkins/run-build.env |
Maxim Kuvyrkov | 8c8e4aa | 2023-11-22 18:56:53 +0000 | [diff] [blame] | 500 | set -ex |
Maxim Kuvyrkov | bc309d5 | 2023-05-25 16:08:50 +0000 | [diff] [blame] | 501 | |
Maxim Kuvyrkov | 3962f6e | 2021-07-15 11:08:13 +0000 | [diff] [blame] | 502 | # 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 Kuvyrkov | b487211 | 2023-07-01 18:33:31 +0000 | [diff] [blame] | 505 | # Re. skipping post-commit build if pre-commit queue is |
| 506 | # not empty -- it's just a favor to pre-commit builds. |
Maxim Kuvyrkov | eb378e4 | 2024-01-08 06:50:57 +0000 | [diff] [blame] | 507 | if [ x"${{BUILD_CAUSE_SCMTRIGGER-false}}" = x"true" ] \ |
| 508 | || [ x"${{BUILD_CAUSE_TIMERTRIGGER-false}}" = x"true" ]; then |
Maxim Kuvyrkov | 972075c | 2024-01-08 09:19:06 +0000 | [diff] [blame] | 509 | for job_type in build precommit; do |
Maxim Kuvyrkov | e8e49eb | 2023-07-01 18:52:20 +0000 | [diff] [blame] | 510 | url="${{JOB_URL%-build/}}-$job_type" |
Laurent Alfonsi | b81499a | 2025-01-06 15:32:36 +0100 | [diff] [blame] | 511 | inQueue=$(curl --retry 5 --max-time 5 -s "$url/api/xml?tree=inQueue" \ |
Maxim Kuvyrkov | b487211 | 2023-07-01 18:33:31 +0000 | [diff] [blame] | 512 | | 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 Kuvyrkov | 3782aea | 2023-05-25 15:24:41 +0000 | [diff] [blame] | 518 | |
Maxim Kuvyrkov | b487211 | 2023-07-01 18:33:31 +0000 | [diff] [blame] | 519 | # Mark build unstable aka a skipped build |
| 520 | exit 125 |
| 521 | fi |
| 522 | done |
Maxim Kuvyrkov | 3962f6e | 2021-07-15 11:08:13 +0000 | [diff] [blame] | 523 | fi |
Maxim Kuvyrkov | 3ab321b | 2023-08-14 08:28:29 +0000 | [diff] [blame] | 524 | |
| 525 | trap "" EXIT |
Maxim Kuvyrkov | d3bf827 | 2023-06-28 17:51:53 +0000 | [diff] [blame] | 526 | unstable-return: 125 |
Maxim Kuvyrkov | 3962f6e | 2021-07-15 11:08:13 +0000 | [diff] [blame] | 527 | |
Maxim Kuvyrkov | d3bf827 | 2023-06-28 17:51:53 +0000 | [diff] [blame] | 528 | - builder: |
| 529 | name: run-build-start-manifest |
| 530 | builders: |
| 531 | - shell: |
| 532 | command: | |
| 533 | #!/bin/bash |
Maxim Kuvyrkov | d3bf827 | 2023-06-28 17:51:53 +0000 | [diff] [blame] | 534 | source artifacts/jenkins/run-build.env |
Maxim Kuvyrkov | 8c8e4aa | 2023-11-22 18:56:53 +0000 | [diff] [blame] | 535 | set -ex |
Maxim Kuvyrkov | 8adf09b | 2023-07-01 15:47:55 +0000 | [diff] [blame] | 536 | |
Maxim Kuvyrkov | 3ab321b | 2023-08-14 08:28:29 +0000 | [diff] [blame] | 537 | docker_opts=( |
Maxim Kuvyrkov | bc309d5 | 2023-05-25 16:08:50 +0000 | [diff] [blame] | 538 | --distro $distro |
Maxim Kuvyrkov | 843ba81 | 2024-09-30 06:24:27 +0000 | [diff] [blame] | 539 | --node_labels "$NODE_LABELS" |
Maxim Kuvyrkov | bc309d5 | 2023-05-25 16:08:50 +0000 | [diff] [blame] | 540 | ) |
| 541 | |
Maxim Kuvyrkov | 3ab321b | 2023-08-14 08:28:29 +0000 | [diff] [blame] | 542 | ./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 Kuvyrkov | 8da7e85 | 2023-05-25 16:26:30 +0000 | [diff] [blame] | 547 | # 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 Kuvyrkov | 3ab321b | 2023-08-14 08:28:29 +0000 | [diff] [blame] | 556 | build_container_exec \ |
Maxim Kuvyrkov | 8da7e85 | 2023-05-25 16:26:30 +0000 | [diff] [blame] | 557 | ./jenkins-scripts/{build_script} \ |
| 558 | %%rr[top_artifacts] artifacts \ |
Maxim Kuvyrkov | 67698ea | 2024-01-05 15:26:07 +0000 | [diff] [blame] | 559 | ==rr[ci_project] '{ci_project}' \ |
| 560 | ==rr[ci_config] '{ci_config}' \ |
Maxim Kuvyrkov | 8da7e85 | 2023-05-25 16:26:30 +0000 | [diff] [blame] | 561 | $extra_build_params \ |
| 562 | --scripts_branch "$scripts_branch" \ |
| 563 | ==rr[mode] "build" \ |
| 564 | ==rr[update_baseline] "$update_baseline" \ |
| 565 | --BUILD_URL "$BUILD_URL" \ |
Maxim Kuvyrkov | 8da7e85 | 2023-05-25 16:26:30 +0000 | [diff] [blame] | 566 | __finish_at reset_artifacts |
| 567 | |
Laurent Alfonsi | af2d985 | 2024-07-02 14:09:46 +0200 | [diff] [blame] | 568 | echo "$rr_stage" > artifacts/rr_stage.txt |
| 569 | |
Maxim Kuvyrkov | 9969509 | 2023-06-28 09:52:05 +0000 | [diff] [blame] | 570 | cat >> artifacts/jenkins/run-build.env <<EOF |
Maxim Kuvyrkov | 3ab321b | 2023-08-14 08:28:29 +0000 | [diff] [blame] | 571 | docker_opts=(${{docker_opts[@]+$(printf "%q$IFS" "${{docker_opts[@]}}")}}) |
| 572 | source build_container.sh |
| 573 | trap "cleanup_all_containers" EXIT |
Maxim Kuvyrkov | 9969509 | 2023-06-28 09:52:05 +0000 | [diff] [blame] | 574 | EOF |
Maxim Kuvyrkov | 3ab321b | 2023-08-14 08:28:29 +0000 | [diff] [blame] | 575 | |
| 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 Kuvyrkov | 9969509 | 2023-06-28 09:52:05 +0000 | [diff] [blame] | 580 | unstable-return: 125 |
| 581 | |
| 582 | - builder: |
Maxim Kuvyrkov | d3bf827 | 2023-06-28 17:51:53 +0000 | [diff] [blame] | 583 | name: run-build-process-params |
Maxim Kuvyrkov | 9969509 | 2023-06-28 09:52:05 +0000 | [diff] [blame] | 584 | builders: |
| 585 | - shell: |
| 586 | command: | |
| 587 | #!/bin/bash |
Maxim Kuvyrkov | 9969509 | 2023-06-28 09:52:05 +0000 | [diff] [blame] | 588 | source artifacts/jenkins/run-build.env |
Maxim Kuvyrkov | 8c8e4aa | 2023-11-22 18:56:53 +0000 | [diff] [blame] | 589 | set -ex |
Maxim Kuvyrkov | 9969509 | 2023-06-28 09:52:05 +0000 | [diff] [blame] | 590 | |
| 591 | branch_opt=() |
Maxim Kuvyrkov | eab8620 | 2020-06-03 13:16:37 +0000 | [diff] [blame] | 592 | # 1 to skip jenkins-scripts |
| 593 | i=1 |
Maxim Kuvyrkov | 5529076 | 2024-01-05 15:47:34 +0000 | [diff] [blame] | 594 | for c in binutils gcc gdb glibc linux qemu; do |
Maxim Kuvyrkov | aa2b43e | 2021-07-20 18:03:06 +0000 | [diff] [blame] | 595 | eval "g=\$$$${{c}}_git" |
Maxim Kuvyrkov | 479d5e1 | 2021-09-07 09:54:06 +0000 | [diff] [blame] | 596 | if [ x"$g" = x"default" ]; then |
Maxim Kuvyrkov | eb378e4 | 2024-01-08 06:50:57 +0000 | [diff] [blame] | 597 | if [ x"${{BUILD_CAUSE_SCMTRIGGER-false}}" = x"true" ] \ |
| 598 | || [ x"${{BUILD_CAUSE_TIMERTRIGGER-false}}" = x"true" ]; then |
Maxim Kuvyrkov | 479d5e1 | 2021-09-07 09:54:06 +0000 | [diff] [blame] | 599 | g="jenkins-scm" |
| 600 | else |
| 601 | g="baseline" |
| 602 | fi |
| 603 | fi |
Maxim Kuvyrkov | aa2b43e | 2021-07-20 18:03:06 +0000 | [diff] [blame] | 604 | if [ x"$g" = x"jenkins-scm" ]; then |
Laurent Alfonsi | aa15d36 | 2025-05-15 12:56:49 +0000 | [diff] [blame^] | 605 | eval "gb=\$GIT_BRANCH_$i" |
| 606 | gb=$(echo $gb | sed 's+origin/++') |
| 607 | eval "g=\$GIT_URL_$i#$gb" |
Maxim Kuvyrkov | eab8620 | 2020-06-03 13:16:37 +0000 | [diff] [blame] | 608 | fi |
| 609 | i=$(($i+1)) |
Maxim Kuvyrkov | bc309d5 | 2023-05-25 16:08:50 +0000 | [diff] [blame] | 610 | |
Maxim Kuvyrkov | aa2b43e | 2021-07-20 18:03:06 +0000 | [diff] [blame] | 611 | if [ x"$g" != x"baseline" ]; then |
Maxim Kuvyrkov | eab8620 | 2020-06-03 13:16:37 +0000 | [diff] [blame] | 612 | build_name="$build_name-$c" |
Maxim Kuvyrkov | 9969509 | 2023-06-28 09:52:05 +0000 | [diff] [blame] | 613 | branch_opt+=("==rr[${{c}}_git]" "$g") |
Maxim Kuvyrkov | eab8620 | 2020-06-03 13:16:37 +0000 | [diff] [blame] | 614 | fi |
| 615 | done |
| 616 | |
Maxim Kuvyrkov | d3bf827 | 2023-06-28 17:51:53 +0000 | [diff] [blame] | 617 | echo "$build_name" > artifacts/jenkins/build-name |
| 618 | |
Maxim Kuvyrkov | 9969509 | 2023-06-28 09:52:05 +0000 | [diff] [blame] | 619 | cat >> artifacts/jenkins/run-build.env <<EOF |
Maxim Kuvyrkov | 9969509 | 2023-06-28 09:52:05 +0000 | [diff] [blame] | 620 | build_name="$build_name" |
Maxim Kuvyrkov | fcbaf90 | 2023-07-01 19:20:46 +0000 | [diff] [blame] | 621 | branch_opt=(${{branch_opt[@]+$(printf "%q$IFS" "${{branch_opt[@]}}")}}) |
Maxim Kuvyrkov | 9969509 | 2023-06-28 09:52:05 +0000 | [diff] [blame] | 622 | EOF |
Maxim Kuvyrkov | 3ab321b | 2023-08-14 08:28:29 +0000 | [diff] [blame] | 623 | |
| 624 | trap "" EXIT |
Maxim Kuvyrkov | 9969509 | 2023-06-28 09:52:05 +0000 | [diff] [blame] | 625 | unstable-return: 125 |
| 626 | |
| 627 | - builder: |
| 628 | name: run-build-main |
| 629 | builders: |
| 630 | - shell: |
| 631 | command: | |
| 632 | #!/bin/bash |
Maxim Kuvyrkov | 9969509 | 2023-06-28 09:52:05 +0000 | [diff] [blame] | 633 | source artifacts/jenkins/run-build.env |
Maxim Kuvyrkov | 8c8e4aa | 2023-11-22 18:56:53 +0000 | [diff] [blame] | 634 | set -ex |
Maxim Kuvyrkov | 3a78c87 | 2023-05-28 10:25:15 +0000 | [diff] [blame] | 635 | |
Maxim Kuvyrkov | 86efb0b | 2023-05-29 09:58:03 +0000 | [diff] [blame] | 636 | # 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 Kuvyrkov | 3ab321b | 2023-08-14 08:28:29 +0000 | [diff] [blame] | 642 | build_container_exec \ |
Maxim Kuvyrkov | eab8620 | 2020-06-03 13:16:37 +0000 | [diff] [blame] | 643 | ./jenkins-scripts/{build_script} \ |
Maxim Kuvyrkov | 8da7e85 | 2023-05-25 16:26:30 +0000 | [diff] [blame] | 644 | @@rr[top_artifacts] artifacts \ |
Maxim Kuvyrkov | 9969509 | 2023-06-28 09:52:05 +0000 | [diff] [blame] | 645 | "${{branch_opt[@]}}" \ |
Maxim Kuvyrkov | 86efb0b | 2023-05-29 09:58:03 +0000 | [diff] [blame] | 646 | __start_at reset_artifacts+ & |
Maxim Kuvyrkov | eab8620 | 2020-06-03 13:16:37 +0000 | [diff] [blame] | 647 | res=0 && wait $! || res=$? |
| 648 | |
Maxim Kuvyrkov | 5a41522 | 2023-05-25 15:43:31 +0000 | [diff] [blame] | 649 | # Update build_name |
Maxim Kuvyrkov | d3bf827 | 2023-06-28 17:51:53 +0000 | [diff] [blame] | 650 | if [ -f artifacts/results ]; then |
| 651 | build_name="$build_name-R$(tail -n1 artifacts/results)" |
Maxim Kuvyrkov | eab8620 | 2020-06-03 13:16:37 +0000 | [diff] [blame] | 652 | fi |
Maxim Kuvyrkov | d3bf827 | 2023-06-28 17:51:53 +0000 | [diff] [blame] | 653 | if [ "$update_baseline" != "onsuccess" ]; then |
| 654 | build_name="$build_name-$update_baseline" |
| 655 | fi |
| 656 | |
Maxim Kuvyrkov | eab8620 | 2020-06-03 13:16:37 +0000 | [diff] [blame] | 657 | if [ -f artifacts/trigger-bisect ]; then |
Maxim Kuvyrkov | 877e63b | 2020-09-07 15:58:14 +0000 | [diff] [blame] | 658 | build_name="$build_name-trigger-bisect" |
Maxim Kuvyrkov | eab8620 | 2020-06-03 13:16:37 +0000 | [diff] [blame] | 659 | fi |
| 660 | echo "$build_name" > artifacts/jenkins/build-name |
Maxim Kuvyrkov | 5a41522 | 2023-05-25 15:43:31 +0000 | [diff] [blame] | 661 | |
| 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 Kuvyrkov | 8441bde | 2023-06-30 16:07:03 +0000 | [diff] [blame] | 676 | 0) |
| 677 | ;; |
Maxim Kuvyrkov | 5a41522 | 2023-05-25 15:43:31 +0000 | [diff] [blame] | 678 | 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 Kuvyrkov | 307e26e | 2023-08-11 10:41:28 +0000 | [diff] [blame] | 692 | |
| 693 | cat >> artifacts/jenkins/run-build.env <<EOF |
| 694 | build_name="$build_name" |
| 695 | EOF |
Maxim Kuvyrkov | 3ab321b | 2023-08-14 08:28:29 +0000 | [diff] [blame] | 696 | |
| 697 | trap "" EXIT |
Maxim Kuvyrkov | eaa9044 | 2020-07-06 14:11:37 +0000 | [diff] [blame] | 698 | unstable-return: 125 |
Maxim Kuvyrkov | ac7ff47 | 2023-06-28 07:35:50 +0000 | [diff] [blame] | 699 | |
| 700 | - builder: |
Maxim Kuvyrkov | 3ab321b | 2023-08-14 08:28:29 +0000 | [diff] [blame] | 701 | name: run-build-fini |
| 702 | builders: |
| 703 | - shell: |
| 704 | command: | |
| 705 | #!/bin/bash |
Maxim Kuvyrkov | 3ab321b | 2023-08-14 08:28:29 +0000 | [diff] [blame] | 706 | source artifacts/jenkins/run-build.env |
Maxim Kuvyrkov | 8c8e4aa | 2023-11-22 18:56:53 +0000 | [diff] [blame] | 707 | set -ex |
Maxim Kuvyrkov | 3ab321b | 2023-08-14 08:28:29 +0000 | [diff] [blame] | 708 | # 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 Kuvyrkov | ac7ff47 | 2023-06-28 07:35:50 +0000 | [diff] [blame] | 713 | name: run-build |
| 714 | builders: |
Maxim Kuvyrkov | 9969509 | 2023-06-28 09:52:05 +0000 | [diff] [blame] | 715 | - conditional-step: |
| 716 | condition-kind: current-status |
| 717 | steps: |
Maxim Kuvyrkov | 5deb8a8 | 2023-06-30 13:51:06 +0000 | [diff] [blame] | 718 | - run-build-init: |
Maxim Kuvyrkov | 02987c1 | 2024-01-10 09:43:41 +0000 | [diff] [blame] | 719 | precommit: false |
Maxim Kuvyrkov | d3bf827 | 2023-06-28 17:51:53 +0000 | [diff] [blame] | 720 | - build-name-setter: |
| 721 | name: 'artifacts/jenkins/build-name' |
| 722 | file: true |
| 723 | - conditional-step: |
| 724 | condition-kind: current-status |
| 725 | steps: |
Maxim Kuvyrkov | 5deb8a8 | 2023-06-30 13:51:06 +0000 | [diff] [blame] | 726 | - run-build-skip-if-queue: |
| 727 | dummy: dummy |
Maxim Kuvyrkov | d3bf827 | 2023-06-28 17:51:53 +0000 | [diff] [blame] | 728 | - 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 Kuvyrkov | 67698ea | 2024-01-05 15:26:07 +0000 | [diff] [blame] | 735 | ci_project: '{ci_project}' |
| 736 | ci_config: '{ci_config}' |
Maxim Kuvyrkov | 9969509 | 2023-06-28 09:52:05 +0000 | [diff] [blame] | 737 | build_script: '{build_script}' |
Maxim Kuvyrkov | 7b799fb | 2023-06-28 16:01:34 +0000 | [diff] [blame] | 738 | - build-name-setter: |
| 739 | name: 'artifacts/jenkins/build-name' |
| 740 | file: true |
Maxim Kuvyrkov | 9969509 | 2023-06-28 09:52:05 +0000 | [diff] [blame] | 741 | - conditional-step: |
| 742 | condition-kind: current-status |
| 743 | steps: |
Maxim Kuvyrkov | d3bf827 | 2023-06-28 17:51:53 +0000 | [diff] [blame] | 744 | - run-build-process-params: |
Maxim Kuvyrkov | 5529076 | 2024-01-05 15:47:34 +0000 | [diff] [blame] | 745 | dummy: dummy |
Maxim Kuvyrkov | 9969509 | 2023-06-28 09:52:05 +0000 | [diff] [blame] | 746 | - build-name-setter: |
| 747 | name: 'artifacts/jenkins/build-name' |
| 748 | file: true |
| 749 | - conditional-step: |
| 750 | condition-kind: current-status |
| 751 | steps: |
Laurent Alfonsi | 87ab4de | 2024-04-25 07:34:20 +0200 | [diff] [blame] | 752 | - run-push-baseline: |
| 753 | build_script: '{build_script}' |
Laurent Alfonsi | 5a667f7 | 2024-04-25 14:49:44 +0200 | [diff] [blame] | 754 | commit_artifacts: 'false' |
Laurent Alfonsi | 87ab4de | 2024-04-25 07:34:20 +0200 | [diff] [blame] | 755 | - conditional-step: |
| 756 | condition-kind: current-status |
| 757 | steps: |
Maxim Kuvyrkov | 9969509 | 2023-06-28 09:52:05 +0000 | [diff] [blame] | 758 | - 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 Kuvyrkov | ccd89ea | 2023-06-30 17:16:10 +0000 | [diff] [blame] | 766 | - trigger-followup-builds-1: |
Maxim Kuvyrkov | 52c3cc2 | 2024-01-05 15:40:26 +0000 | [diff] [blame] | 767 | dummy: dummy |
Maxim Kuvyrkov | ccd89ea | 2023-06-30 17:16:10 +0000 | [diff] [blame] | 768 | - trigger-followup-builds-2: |
Maxim Kuvyrkov | 52c3cc2 | 2024-01-05 15:40:26 +0000 | [diff] [blame] | 769 | ci_project: '{ci_project}' |
| 770 | ci_config: '{ci_config}' |
Maxim Kuvyrkov | 9969509 | 2023-06-28 09:52:05 +0000 | [diff] [blame] | 771 | - build-name-setter: |
| 772 | name: 'artifacts/jenkins/build-name' |
| 773 | file: true |
| 774 | - conditional-step: |
| 775 | condition-kind: current-status |
| 776 | steps: |
Maxim Kuvyrkov | 333b296 | 2023-08-14 08:55:46 +0000 | [diff] [blame] | 777 | - run-build-notify: |
Thiago Jung Bauermann | 676c14a | 2023-09-12 12:37:40 -0300 | [diff] [blame] | 778 | build_script: '{build_script}' |
Maxim Kuvyrkov | 9969509 | 2023-06-28 09:52:05 +0000 | [diff] [blame] | 779 | - build-name-setter: |
| 780 | name: 'artifacts/jenkins/build-name' |
| 781 | file: true |
| 782 | - conditional-step: |
| 783 | condition-kind: current-status |
| 784 | steps: |
Maxim Kuvyrkov | dc5adc1 | 2023-07-01 08:02:24 +0000 | [diff] [blame] | 785 | - 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 Kuvyrkov | 5deb8a8 | 2023-06-30 13:51:06 +0000 | [diff] [blame] | 793 | - run-push-baseline: |
Maxim Kuvyrkov | 570e5ea | 2023-07-01 19:43:07 +0000 | [diff] [blame] | 794 | build_script: '{build_script}' |
Laurent Alfonsi | aa30fa7 | 2024-04-26 10:53:34 +0200 | [diff] [blame] | 795 | commit_artifacts: 'true' |
Laurent Alfonsi | a8284ec | 2023-11-16 10:05:38 +0100 | [diff] [blame] | 796 | - conditional-step: |
| 797 | condition-kind: current-status |
| 798 | steps: |
| 799 | - run-push-lnt-results: |
Maxim Kuvyrkov | 67698ea | 2024-01-05 15:26:07 +0000 | [diff] [blame] | 800 | ci_project: '{ci_project}' |
| 801 | ci_config: '{ci_config}' |
Maxim Kuvyrkov | 9969509 | 2023-06-28 09:52:05 +0000 | [diff] [blame] | 802 | - build-name-setter: |
| 803 | name: 'artifacts/jenkins/build-name' |
| 804 | file: true |
Maxim Kuvyrkov | 3ab321b | 2023-08-14 08:28:29 +0000 | [diff] [blame] | 805 | - conditional-step: |
| 806 | condition-kind: current-status |
| 807 | steps: |
Maxim Kuvyrkov | c771960 | 2024-01-10 09:35:19 +0000 | [diff] [blame] | 808 | - 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 Kuvyrkov | 3ab321b | 2023-08-14 08:28:29 +0000 | [diff] [blame] | 817 | - run-build-fini: |
| 818 | dummy: dummy |
Maxim Kuvyrkov | eab8620 | 2020-06-03 13:16:37 +0000 | [diff] [blame] | 819 | |
Maxim Kuvyrkov | 972075c | 2024-01-08 09:19:06 +0000 | [diff] [blame] | 820 | - 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 Kuvyrkov | 4bdc20b | 2024-01-10 14:44:19 +0000 | [diff] [blame] | 868 | |
| 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 Kuvyrkov | 972075c | 2024-01-08 09:19:06 +0000 | [diff] [blame] | 888 | # Skip the build |
| 889 | exit 125 |
| 890 | fi |
| 891 | |
Christophe Lyon | 7fde507 | 2024-09-23 14:25:59 +0000 | [diff] [blame] | 892 | # 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 Lyon | 13ab07e | 2024-10-11 18:34:03 +0000 | [diff] [blame] | 914 | &> artifacts/jenkins/pw-report.log |
Christophe Lyon | 7fde507 | 2024-09-23 14:25:59 +0000 | [diff] [blame] | 915 | |
| 916 | # Skip the build |
| 917 | exit 125 |
| 918 | fi |
| 919 | |
Maxim Kuvyrkov | 972075c | 2024-01-08 09:19:06 +0000 | [diff] [blame] | 920 | 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 Kuvyrkov | 9fe0af9 | 2024-04-10 15:51:23 +0000 | [diff] [blame] | 1011 | --check test --result "$pw_result" |
Maxim Kuvyrkov | 972075c | 2024-01-08 09:19:06 +0000 | [diff] [blame] | 1012 | &> 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 Kuvyrkov | d2207ec | 2024-06-28 14:10:30 +0000 | [diff] [blame] | 1040 | ./jenkins-scripts/rr/round-robin-notify.sh \ |
Maxim Kuvyrkov | 972075c | 2024-01-08 09:19:06 +0000 | [diff] [blame] | 1041 | @@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 Kuvyrkov | 4bdc20b | 2024-01-10 14:44:19 +0000 | [diff] [blame] | 1067 | # this is important for mail-recipient.txt, which may be empty. |
Maxim Kuvyrkov | 972075c | 2024-01-08 09:19:06 +0000 | [diff] [blame] | 1068 | 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 Kuvyrkov | 02987c1 | 2024-01-10 09:43:41 +0000 | [diff] [blame] | 1082 | precommit: true |
Maxim Kuvyrkov | 972075c | 2024-01-08 09:19:06 +0000 | [diff] [blame] | 1083 | - 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 Kuvyrkov | ac7ff47 | 2023-06-28 07:35:50 +0000 | [diff] [blame] | 1134 | |
Maxim Kuvyrkov | eab8620 | 2020-06-03 13:16:37 +0000 | [diff] [blame] | 1135 | - publisher: |
| 1136 | name: build-publishers |
| 1137 | publishers: |
Maxim Kuvyrkov | 7f3f845 | 2022-09-01 08:28:57 +0000 | [diff] [blame] | 1138 | - archive: |
| 1139 | artifacts: 'artifacts/**' |
Laurent Alfonsi | aa30fa7 | 2024-04-26 10:53:34 +0200 | [diff] [blame] | 1140 | latest-only: false |
Laurent Alfonsi | cbf9a99 | 2023-11-23 16:09:27 +0100 | [diff] [blame] | 1141 | - html-publisher: |
| 1142 | name: 'HTML Report' |
| 1143 | dir: 'artifacts/jenkins' |
| 1144 | files: 'status.html' |
| 1145 | keep-all: true |
Maxim Kuvyrkov | 8429b63 | 2022-08-29 15:59:34 +0000 | [diff] [blame] | 1146 | - email-ext: |
Maxim Kuvyrkov | 8429b63 | 2022-08-29 15:59:34 +0000 | [diff] [blame] | 1147 | recipients: | |
Maxim Kuvyrkov | f2ea7b7 | 2023-08-16 07:59:14 +0000 | [diff] [blame] | 1148 | ${{FILE,path="artifacts/jenkins/mail-recipients.txt"}} |
| 1149 | reply-to: linaro-toolchain@lists.linaro.org |
Maxim Kuvyrkov | 8429b63 | 2022-08-29 15:59:34 +0000 | [diff] [blame] | 1150 | subject: | |
Maxim Kuvyrkov | f2ea7b7 | 2023-08-16 07:59:14 +0000 | [diff] [blame] | 1151 | ${{FILE,path="artifacts/jenkins/mail-subject.txt"}} |
Maxim Kuvyrkov | 8429b63 | 2022-08-29 15:59:34 +0000 | [diff] [blame] | 1152 | content-type: text |
| 1153 | body: | |
Maxim Kuvyrkov | f2ea7b7 | 2023-08-16 07:59:14 +0000 | [diff] [blame] | 1154 | ${{FILE,path="artifacts/jenkins/mail-body.txt"}} |
| 1155 | failure: {email_on_failure} |
| 1156 | success: {email_on_success} |
Maxim Kuvyrkov | 8429b63 | 2022-08-29 15:59:34 +0000 | [diff] [blame] | 1157 | aborted: false |
| 1158 | send-to: |
| 1159 | - recipients |
Maxim Kuvyrkov | 7e9dd64 | 2022-09-01 13:05:40 +0000 | [diff] [blame] | 1160 | - email-ext: |
| 1161 | recipients: | |
Maxim Kuvyrkov | f2ea7b7 | 2023-08-16 07:59:14 +0000 | [diff] [blame] | 1162 | ${{FILE,path="artifacts/jenkins/error-mail-recipients.txt"}} |
Maxim Kuvyrkov | 7e9dd64 | 2022-09-01 13:05:40 +0000 | [diff] [blame] | 1163 | body: | |
Maxim Kuvyrkov | f2ea7b7 | 2023-08-16 07:59:14 +0000 | [diff] [blame] | 1164 | ${{FILE,path="artifacts/jenkins/error-mail-body.txt"}} |
Maxim Kuvyrkov | 7e9dd64 | 2022-09-01 13:05:40 +0000 | [diff] [blame] | 1165 | failure: true |
| 1166 | success: true |
| 1167 | aborted: true |
| 1168 | send-to: |
| 1169 | - recipients |
Christophe Lyon | 2b15f59 | 2023-11-27 17:32:12 +0000 | [diff] [blame] | 1170 | - email-ext: |
| 1171 | recipients: | |
Christophe Lyon | d44d532 | 2023-12-05 15:06:19 +0000 | [diff] [blame] | 1172 | ${{FILE,path="artifacts/jenkins/testresults-mail-recipients.txt"}} |
Christophe Lyon | 2b15f59 | 2023-11-27 17:32:12 +0000 | [diff] [blame] | 1173 | reply-to: linaro-toolchain@lists.linaro.org |
| 1174 | subject: | |
Christophe Lyon | d44d532 | 2023-12-05 15:06:19 +0000 | [diff] [blame] | 1175 | ${{FILE,path="artifacts/jenkins/testresults-mail-subject.txt"}} |
Christophe Lyon | 2b15f59 | 2023-11-27 17:32:12 +0000 | [diff] [blame] | 1176 | content-type: text |
| 1177 | body: | |
Christophe Lyon | d44d532 | 2023-12-05 15:06:19 +0000 | [diff] [blame] | 1178 | ${{FILE,path="artifacts/jenkins/testresults-mail-body.txt"}} |
Christophe Lyon | 2b15f59 | 2023-11-27 17:32:12 +0000 | [diff] [blame] | 1179 | failure: false |
Christophe Lyon | d44d532 | 2023-12-05 15:06:19 +0000 | [diff] [blame] | 1180 | success: true |
Christophe Lyon | 2b15f59 | 2023-11-27 17:32:12 +0000 | [diff] [blame] | 1181 | aborted: false |
| 1182 | send-to: |
| 1183 | - recipients |
Maxim Kuvyrkov | eab8620 | 2020-06-03 13:16:37 +0000 | [diff] [blame] | 1184 | |
| 1185 | - parameter: |
| 1186 | name: bisect-parameters |
| 1187 | parameters: |
| 1188 | - string: |
| 1189 | name: current_project |
| 1190 | default: "" |
| 1191 | description: "Project to bisect" |
| 1192 | - string: |
Maxim Kuvyrkov | aa2b43e | 2021-07-20 18:03:06 +0000 | [diff] [blame] | 1193 | name: bad_git |
Maxim Kuvyrkov | eab8620 | 2020-06-03 13:16:37 +0000 | [diff] [blame] | 1194 | default: "" |
Maxim Kuvyrkov | aa2b43e | 2021-07-20 18:03:06 +0000 | [diff] [blame] | 1195 | description: "Bad git_url#branch/SHA1" |
Maxim Kuvyrkov | eab8620 | 2020-06-03 13:16:37 +0000 | [diff] [blame] | 1196 | - file: |
| 1197 | name: jenkins-scripts/replay_log |
| 1198 | description: "Replay part of bisect using provided bisect log" |
| 1199 | - default-parameters: |
Maxim Kuvyrkov | f2023b7 | 2021-01-20 13:49:47 +0000 | [diff] [blame] | 1200 | distro: '{distro}' |
Maxim Kuvyrkov | eab8620 | 2020-06-03 13:16:37 +0000 | [diff] [blame] | 1201 | |
| 1202 | - wrapper: |
| 1203 | name: bisect-wrappers |
| 1204 | wrappers: |
| 1205 | - build-wrappers: |
| 1206 | timeout: '{timeout}' |
Maxim Kuvyrkov | eab8620 | 2020-06-03 13:16:37 +0000 | [diff] [blame] | 1207 | |
| 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 Kuvyrkov | eab8620 | 2020-06-03 13:16:37 +0000 | [diff] [blame] | 1221 | |
Maxim Kuvyrkov | 1fbec98 | 2023-07-01 18:39:54 +0000 | [diff] [blame] | 1222 | cat >> artifacts/jenkins/run-build.env <<EOF |
| 1223 | build_name="$build_name" |
| 1224 | EOF |
| 1225 | |
Maxim Kuvyrkov | eab8620 | 2020-06-03 13:16:37 +0000 | [diff] [blame] | 1226 | ./jenkins-scripts/docker-run.sh \ |
| 1227 | --distro $distro \ |
Maxim Kuvyrkov | 843ba81 | 2024-09-30 06:24:27 +0000 | [diff] [blame] | 1228 | --node_labels "$NODE_LABELS" \ |
Maxim Kuvyrkov | eab8620 | 2020-06-03 13:16:37 +0000 | [diff] [blame] | 1229 | -- \ |
Maxim Kuvyrkov | d2207ec | 2024-06-28 14:10:30 +0000 | [diff] [blame] | 1230 | ./jenkins-scripts/rr/round-robin-bisect.sh \ |
Maxim Kuvyrkov | 0e9e49d | 2022-08-08 11:02:44 +0000 | [diff] [blame] | 1231 | %%rel_artifacts artifacts \ |
Maxim Kuvyrkov | eab8620 | 2020-06-03 13:16:37 +0000 | [diff] [blame] | 1232 | --BUILD_URL "$BUILD_URL" \ |
| 1233 | --current_project "$current_project" \ |
Maxim Kuvyrkov | aa2b43e | 2021-07-20 18:03:06 +0000 | [diff] [blame] | 1234 | --bad_git "$bad_git" \ |
Maxim Kuvyrkov | eab8620 | 2020-06-03 13:16:37 +0000 | [diff] [blame] | 1235 | --replay_log "$(pwd)/jenkins-scripts/replay_log" \ |
| 1236 | --build_script "./jenkins-scripts/{build_script}" \ |
Maxim Kuvyrkov | eab8620 | 2020-06-03 13:16:37 +0000 | [diff] [blame] | 1237 | -- \ |
Maxim Kuvyrkov | 67698ea | 2024-01-05 15:26:07 +0000 | [diff] [blame] | 1238 | ==rr[ci_project] '{ci_project}' \ |
| 1239 | ==rr[ci_config] '{ci_config}' \ |
Maxim Kuvyrkov | 18916ec | 2021-01-17 18:46:51 +0000 | [diff] [blame] | 1240 | $extra_build_params \ |
Maxim Kuvyrkov | d35247b | 2021-07-12 18:01:00 +0000 | [diff] [blame] | 1241 | --scripts_branch "$scripts_branch" & |
| 1242 | res=0 && wait $! || res=$? |
| 1243 | |
| 1244 | if [ $res != 0 ]; then |
| 1245 | echo $res > artifacts/failed |
| 1246 | fi |
Maxim Kuvyrkov | d35247b | 2021-07-12 18:01:00 +0000 | [diff] [blame] | 1247 | unstable-return: 125 |
Maxim Kuvyrkov | 7b799fb | 2023-06-28 16:01:34 +0000 | [diff] [blame] | 1248 | - build-name-setter: |
| 1249 | name: 'artifacts/jenkins/build-name' |
| 1250 | file: true |
Maxim Kuvyrkov | b9fe6a9 | 2023-05-29 15:15:14 +0000 | [diff] [blame] | 1251 | - conditional-step: |
Maxim Kuvyrkov | b9fe6a9 | 2023-05-29 15:15:14 +0000 | [diff] [blame] | 1252 | condition-kind: current-status |
| 1253 | steps: |
Maxim Kuvyrkov | c424567 | 2023-06-30 17:22:57 +0000 | [diff] [blame] | 1254 | - trigger-followup-builds-1: |
Maxim Kuvyrkov | 52c3cc2 | 2024-01-05 15:40:26 +0000 | [diff] [blame] | 1255 | dummy: dummy |
Maxim Kuvyrkov | c424567 | 2023-06-30 17:22:57 +0000 | [diff] [blame] | 1256 | - trigger-followup-builds-2: |
Maxim Kuvyrkov | 52c3cc2 | 2024-01-05 15:40:26 +0000 | [diff] [blame] | 1257 | ci_project: '{ci_project}' |
| 1258 | ci_config: '{ci_config}' |
Maxim Kuvyrkov | 7b799fb | 2023-06-28 16:01:34 +0000 | [diff] [blame] | 1259 | - conditional-step: |
| 1260 | condition-kind: current-status |
| 1261 | steps: |
| 1262 | - shell: | |
| 1263 | #!/bin/bash |
| 1264 | set -ex |
Maxim Kuvyrkov | b9fe6a9 | 2023-05-29 15:15:14 +0000 | [diff] [blame] | 1265 | |
Maxim Kuvyrkov | 7b799fb | 2023-06-28 16:01:34 +0000 | [diff] [blame] | 1266 | if [ -f artifacts/failed ]; then |
| 1267 | # Mark failed build as FAILURE; no further steps will run. |
| 1268 | exit $(cat artifacts/failed) |
| 1269 | fi |
Maxim Kuvyrkov | eab8620 | 2020-06-03 13:16:37 +0000 | [diff] [blame] | 1270 | |
| 1271 | - publisher: |
| 1272 | name: bisect-publishers |
| 1273 | publishers: |
Maxim Kuvyrkov | 8429b63 | 2022-08-29 15:59:34 +0000 | [diff] [blame] | 1274 | - 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 Kuvyrkov | eab8620 | 2020-06-03 13:16:37 +0000 | [diff] [blame] | 1285 | #END: tcwg/round-robin.yaml.inc |
| 1286 | |
| 1287 | - job-template: |
Laurent Alfonsi | 0093149 | 2023-02-21 11:10:45 +0100 | [diff] [blame] | 1288 | name: '{ci_project}--{toolchain_ver}-{target}{type_of_test}-build' |
Maxim Kuvyrkov | eab8620 | 2020-06-03 13:16:37 +0000 | [diff] [blame] | 1289 | project-type: freestyle |
| 1290 | defaults: global |
| 1291 | properties: |
Laurent Alfonsi | 2ac30aa | 2023-08-23 16:13:37 +0200 | [diff] [blame] | 1292 | - build-properties: |
| 1293 | ci_project: '{ci_project}' |
| 1294 | ci_config: '{ci_config}' |
Maxim Kuvyrkov | eab8620 | 2020-06-03 13:16:37 +0000 | [diff] [blame] | 1295 | parameters: |
| 1296 | - build-parameters: |
Maxim Kuvyrkov | 479d5e1 | 2021-09-07 09:54:06 +0000 | [diff] [blame] | 1297 | default_git: 'default' |
Maxim Kuvyrkov | f2023b7 | 2021-01-20 13:49:47 +0000 | [diff] [blame] | 1298 | distro: '{distro}' |
Maxim Kuvyrkov | 7f882ce | 2024-01-04 18:39:24 +0000 | [diff] [blame] | 1299 | disabled: false |
Maxim Kuvyrkov | 7adc4cb | 2023-03-17 15:50:16 +0000 | [diff] [blame] | 1300 | node: '{node}' |
Maxim Kuvyrkov | eab8620 | 2020-06-03 13:16:37 +0000 | [diff] [blame] | 1301 | concurrent: false |
Laurent Alfonsi | b5d5a08 | 2023-02-23 12:08:35 +0100 | [diff] [blame] | 1302 | display-name: 'TCWG Build {ci_project}/{ci_config}' |
Maxim Kuvyrkov | eab8620 | 2020-06-03 13:16:37 +0000 | [diff] [blame] | 1303 | workspace: workspace/tcwg_gnu_$EXECUTOR_NUMBER |
| 1304 | scm: |
Laurent Alfonsi | aa15d36 | 2025-05-15 12:56:49 +0000 | [diff] [blame^] | 1305 | - 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 Kuvyrkov | eab8620 | 2020-06-03 13:16:37 +0000 | [diff] [blame] | 1318 | triggers: |
| 1319 | - pollscm: |
Maxim Kuvyrkov | 1e2e039 | 2021-07-08 09:57:23 +0000 | [diff] [blame] | 1320 | cron: '{cron}' |
Maxim Kuvyrkov | eab8620 | 2020-06-03 13:16:37 +0000 | [diff] [blame] | 1321 | wrappers: |
| 1322 | - build-wrappers: |
Maxim Kuvyrkov | 3f7dec3 | 2023-08-27 17:03:38 +0000 | [diff] [blame] | 1323 | timeout: '{timeout_build}' |
Maxim Kuvyrkov | eab8620 | 2020-06-03 13:16:37 +0000 | [diff] [blame] | 1324 | builders: |
| 1325 | - run-build: |
Maxim Kuvyrkov | 67698ea | 2024-01-05 15:26:07 +0000 | [diff] [blame] | 1326 | ci_project: '{ci_project}' |
| 1327 | ci_config: '{ci_config}' |
Maxim Kuvyrkov | eab8620 | 2020-06-03 13:16:37 +0000 | [diff] [blame] | 1328 | build_script: 'tcwg_gnu-build.sh' |
Maxim Kuvyrkov | c43e60b | 2023-11-06 13:18:27 +0000 | [diff] [blame] | 1329 | docker_security: '{docker_security}' |
Maxim Kuvyrkov | eab8620 | 2020-06-03 13:16:37 +0000 | [diff] [blame] | 1330 | publishers: |
Maxim Kuvyrkov | f2ea7b7 | 2023-08-16 07:59:14 +0000 | [diff] [blame] | 1331 | - build-publishers: |
| 1332 | email_on_failure: false |
| 1333 | email_on_success: true |
Maxim Kuvyrkov | eab8620 | 2020-06-03 13:16:37 +0000 | [diff] [blame] | 1334 | |
Maxim Kuvyrkov | 972075c | 2024-01-08 09:19:06 +0000 | [diff] [blame] | 1335 | - 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 Kuvyrkov | ac7ff47 | 2023-06-28 07:35:50 +0000 | [diff] [blame] | 1367 | |
Maxim Kuvyrkov | eab8620 | 2020-06-03 13:16:37 +0000 | [diff] [blame] | 1368 | - job-template: |
Laurent Alfonsi | 0093149 | 2023-02-21 11:10:45 +0100 | [diff] [blame] | 1369 | name: '{ci_project}--{toolchain_ver}-{target}{type_of_test}-bisect' |
Maxim Kuvyrkov | eab8620 | 2020-06-03 13:16:37 +0000 | [diff] [blame] | 1370 | project-type: freestyle |
| 1371 | defaults: global |
| 1372 | properties: |
Laurent Alfonsi | 2ac30aa | 2023-08-23 16:13:37 +0200 | [diff] [blame] | 1373 | - bisect-properties: |
| 1374 | ci_project: '{ci_project}' |
| 1375 | ci_config: '{ci_config}' |
Maxim Kuvyrkov | eab8620 | 2020-06-03 13:16:37 +0000 | [diff] [blame] | 1376 | parameters: |
| 1377 | - bisect-parameters: |
Maxim Kuvyrkov | f2023b7 | 2021-01-20 13:49:47 +0000 | [diff] [blame] | 1378 | distro: '{distro}' |
Maxim Kuvyrkov | 27f48c9 | 2021-08-06 13:52:40 +0000 | [diff] [blame] | 1379 | disabled: false |
Maxim Kuvyrkov | 7adc4cb | 2023-03-17 15:50:16 +0000 | [diff] [blame] | 1380 | node: '{node}' |
Maxim Kuvyrkov | eab8620 | 2020-06-03 13:16:37 +0000 | [diff] [blame] | 1381 | concurrent: false |
Laurent Alfonsi | b5d5a08 | 2023-02-23 12:08:35 +0100 | [diff] [blame] | 1382 | display-name: 'TCWG Bisect {ci_project}/{ci_config}' |
Maxim Kuvyrkov | eab8620 | 2020-06-03 13:16:37 +0000 | [diff] [blame] | 1383 | 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 Kuvyrkov | 67698ea | 2024-01-05 15:26:07 +0000 | [diff] [blame] | 1391 | ci_project: '{ci_project}' |
| 1392 | ci_config: '{ci_config}' |
Maxim Kuvyrkov | eab8620 | 2020-06-03 13:16:37 +0000 | [diff] [blame] | 1393 | build_script: 'tcwg_gnu-build.sh' |
Maxim Kuvyrkov | c43e60b | 2023-11-06 13:18:27 +0000 | [diff] [blame] | 1394 | docker_security: '{docker_security}' |
Maxim Kuvyrkov | eab8620 | 2020-06-03 13:16:37 +0000 | [diff] [blame] | 1395 | publishers: |
| 1396 | - bisect-publishers |
Laurent Alfonsi | aa15d36 | 2025-05-15 12:56:49 +0000 | [diff] [blame^] | 1397 | # checksum: a91685819264fa584a8e32f7bb631f04 |