Fatih Degirmenci | 03be82a | 2018-10-18 12:16:14 +0200 | [diff] [blame] | 1 | --- |
| 2 | # these parameters are used for infra related variables |
| 3 | - parameter: |
Fatih Degirmenci | 5addd51 | 2018-10-19 14:06:03 +0200 | [diff] [blame] | 4 | name: infra-parameters |
Fatih Degirmenci | 03be82a | 2018-10-18 12:16:14 +0200 | [diff] [blame] | 5 | parameters: |
| 6 | - string: |
| 7 | name: JJB_GIT_REPO |
| 8 | default: https://git.openstack.org/openstack-infra/jenkins-job-builder |
| 9 | description: OpenStack JJB repo |
| 10 | - string: |
| 11 | name: JJB_VERSION |
Fatih Degirmenci | 43187b2 | 2019-02-25 15:57:17 +0100 | [diff] [blame] | 12 | default: 2.9.1 |
Fatih Degirmenci | 03be82a | 2018-10-18 12:16:14 +0200 | [diff] [blame] | 13 | description: OpenStack JJB version to install - matches to LFN JJB version |
| 14 | |
| 15 | # these parameters are used for setting the Gerrit Project on Nordix |
| 16 | - parameter: |
Fatih Degirmenci | 5addd51 | 2018-10-19 14:06:03 +0200 | [diff] [blame] | 17 | name: project-parameters |
Fatih Degirmenci | 03be82a | 2018-10-18 12:16:14 +0200 | [diff] [blame] | 18 | parameters: |
| 19 | - string: |
| 20 | name: PROJECT |
| 21 | default: '{project}' |
| 22 | description: JJB configured PROJECT parameter to identify a Nordix Gerrit project |
Fatih Degirmenci | 2c4038b | 2018-10-18 15:25:24 +0200 | [diff] [blame] | 23 | - string: |
| 24 | name: BRANCH |
| 25 | default: '{branch}' |
| 26 | description: "JJB configured BRANCH parameter (e.g. master, nordix-dev)" |
Fatih Degirmenci | 03be82a | 2018-10-18 12:16:14 +0200 | [diff] [blame] | 27 | |
| 28 | # these parameters are used for streaming changes from various Gerrit Systems |
| 29 | - parameter: |
| 30 | name: nordix-gerrit-parameters |
| 31 | parameters: |
| 32 | - string: |
| 33 | name: GERRIT_USER |
| 34 | default: infra |
| 35 | description: Non-interactive user to stream Gerrit Events on Nordix Gerrit |
| 36 | - string: |
| 37 | name: GIT_BASE_HTTPS |
Fatih Degirmenci | 9a746ac | 2018-10-23 00:20:43 +0200 | [diff] [blame] | 38 | default: https://gerrit.nordix.org |
Fatih Degirmenci | 03be82a | 2018-10-18 12:16:14 +0200 | [diff] [blame] | 39 | description: HTTPS URL of Project Repo on Nordix Gerrit to clone repo |
| 40 | - string: |
| 41 | name: GIT_BASE_SSH |
Fatih Degirmenci | 9a746ac | 2018-10-23 00:20:43 +0200 | [diff] [blame] | 42 | default: ssh://$GERRIT_USER@gerrit.nordix.org:29418 |
Fatih Degirmenci | 03be82a | 2018-10-18 12:16:14 +0200 | [diff] [blame] | 43 | description: HTTPS URL of Project Repo on Nordix Gerrit to clone repo |
| 44 | |
| 45 | - parameter: |
| 46 | name: onap-gerrit-parameters |
| 47 | parameters: |
| 48 | - string: |
| 49 | name: GERRIT_USER |
| 50 | default: nordix |
| 51 | description: Non-interactive user to stream Gerrit Events on ONAP Gerrit |
| 52 | - string: |
| 53 | name: GIT_BASE_HTTPS |
Fatih Degirmenci | 9a746ac | 2018-10-23 00:20:43 +0200 | [diff] [blame] | 54 | default: https://gerrit.onap.org/r/p |
Fatih Degirmenci | 03be82a | 2018-10-18 12:16:14 +0200 | [diff] [blame] | 55 | description: HTTPS URL to Project Repo on ONAP Gerrit to clone repo |
| 56 | - string: |
| 57 | name: GIT_BASE_SSH |
Fatih Degirmenci | 9a746ac | 2018-10-23 00:20:43 +0200 | [diff] [blame] | 58 | default: ssh://$GERRIT_USER@gerrit.onap.org:29418 |
Fatih Degirmenci | 03be82a | 2018-10-18 12:16:14 +0200 | [diff] [blame] | 59 | description: SSH URL to Project Repo on ONAP Gerrit to clone repo |
| 60 | |
Fatih Degirmenci | 1e7b337 | 2019-03-14 15:11:15 -0700 | [diff] [blame] | 61 | - parameter: |
| 62 | name: acumos-gerrit-parameters |
| 63 | parameters: |
| 64 | - string: |
| 65 | name: GERRIT_USER |
| 66 | default: nordix |
| 67 | description: Non-interactive user to stream Gerrit Events on Acumos Gerrit |
| 68 | - string: |
| 69 | name: GIT_BASE_HTTPS |
| 70 | default: https://gerrit.acumos.org/r/p |
| 71 | description: HTTPS URL to Project Repo on Acumos Gerrit to clone repo |
| 72 | - string: |
| 73 | name: GIT_BASE_SSH |
| 74 | default: ssh://$GERRIT_USER@gerrit.acumos.org:29418 |
| 75 | description: SSH URL to Project Repo on Acumos Gerrit to clone repo |
| 76 | |
Fatih Degirmenci | 9a9f084 | 2019-05-21 12:14:29 +0200 | [diff] [blame] | 77 | - parameter: |
| 78 | name: odl-gerrit-parameters |
| 79 | parameters: |
| 80 | - string: |
| 81 | name: GERRIT_USER |
| 82 | default: nordix |
| 83 | description: Non-interactive user to stream Gerrit Events on ODL Gerrit |
| 84 | - string: |
| 85 | name: GIT_BASE_HTTPS |
| 86 | default: https://git.opendaylight.org/gerrit |
| 87 | description: HTTPS URL to Project Repo on OODL Gerrit to clone repo |
| 88 | - string: |
| 89 | name: GIT_BASE_SSH |
| 90 | default: ssh://$GERRIT_USER@git.opendaylight.org:29418 |
| 91 | description: SSH URL to Project Repo on ODL Gerrit to clone repo |
| 92 | |
robert.tomczyk | 29c6ced | 2019-05-28 11:43:02 +0100 | [diff] [blame] | 93 | - parameter: |
| 94 | name: opendev-gerrit-parameters |
| 95 | parameters: |
| 96 | - string: |
| 97 | name: GERRIT_USER |
| 98 | default: nordix |
| 99 | description: Non-interactive user to stream Gerrit Events on OpenDev Gerrit |
| 100 | - string: |
| 101 | name: GIT_BASE_HTTPS |
| 102 | default: https://review.opendev.org |
| 103 | description: HTTPS URL to Project Repo on OpenDev Gerrit to clone repo |
| 104 | - string: |
| 105 | name: GIT_BASE_SSH |
| 106 | default: ssh://$GERRIT_USER@review.opendev.org:29418 |
| 107 | description: SSH URL to Project Repo on OpenDev Gerrit to clone repo |
| 108 | |
Fatih Degirmenci | 03be82a | 2018-10-18 12:16:14 +0200 | [diff] [blame] | 109 | # defaults for job build history |
| 110 | - property: |
| 111 | name: logrotate-default |
| 112 | properties: |
| 113 | - build-discarder: |
| 114 | days-to-keep: 60 |
| 115 | num-to-keep: 200 |
| 116 | artifact-days-to-keep: 60 |
| 117 | artifact-num-to-keep: 200 |
| 118 | |
| 119 | # defaults for SCM and Gerrit |
| 120 | - scm: |
| 121 | name: git-scm |
| 122 | scm: |
Fatih Degirmenci | 352a9b1 | 2018-10-19 15:36:09 +0200 | [diff] [blame] | 123 | - git: |
Fatih Degirmenci | 9a746ac | 2018-10-23 00:20:43 +0200 | [diff] [blame] | 124 | url: '$GIT_BASE_SSH/$PROJECT' |
Fatih Degirmenci | 627036b | 2018-10-23 00:37:19 +0200 | [diff] [blame] | 125 | credentials-id: '{ssh-credentials-id}' |
Fatih Degirmenci | 03be82a | 2018-10-18 12:16:14 +0200 | [diff] [blame] | 126 | branches: |
Fatih Degirmenci | 352a9b1 | 2018-10-19 15:36:09 +0200 | [diff] [blame] | 127 | - 'refs/heads/{branch}' |
| 128 | refspec: '{refspec}' |
Fatih Degirmenci | 03be82a | 2018-10-18 12:16:14 +0200 | [diff] [blame] | 129 | timeout: 15 |
| 130 | per-build-tag: false |
| 131 | skip-tag: true |
| 132 | shallow-clone: false |
| 133 | use-author: false |
| 134 | ignore-notify: false |
robert.tomczyk | 7e50787 | 2019-06-18 17:20:26 +0100 | [diff] [blame] | 135 | wipe-workspace: '{wipe_workspace}' |
Fatih Degirmenci | 03be82a | 2018-10-18 12:16:14 +0200 | [diff] [blame] | 136 | prune: false |
robert.tomczyk | 7e50787 | 2019-06-18 17:20:26 +0100 | [diff] [blame] | 137 | clean: |
| 138 | after: false |
| 139 | before: '{clean_before}' |
Fatih Degirmenci | 352a9b1 | 2018-10-19 15:36:09 +0200 | [diff] [blame] | 140 | choosing-strategy: 'default' |
Fatih Degirmenci | 03be82a | 2018-10-18 12:16:14 +0200 | [diff] [blame] | 141 | |
| 142 | - scm: |
| 143 | name: git-scm-gerrit |
| 144 | scm: |
| 145 | - git: |
Fatih Degirmenci | 9a746ac | 2018-10-23 00:20:43 +0200 | [diff] [blame] | 146 | url: '$GIT_BASE_SSH/$PROJECT' |
Fatih Degirmenci | 627036b | 2018-10-23 00:37:19 +0200 | [diff] [blame] | 147 | credentials-id: '{ssh-credentials-id}' |
Fatih Degirmenci | 352a9b1 | 2018-10-19 15:36:09 +0200 | [diff] [blame] | 148 | branches: |
| 149 | - 'refs/heads/{branch}' |
| 150 | refspec: '{refspec}' |
| 151 | timeout: 15 |
| 152 | per-build-tag: false |
| 153 | skip-tag: true |
| 154 | shallow-clone: false |
| 155 | use-author: false |
| 156 | ignore-notify: false |
robert.tomczyk | 7e50787 | 2019-06-18 17:20:26 +0100 | [diff] [blame] | 157 | wipe-workspace: '{wipe_workspace}' |
Fatih Degirmenci | 352a9b1 | 2018-10-19 15:36:09 +0200 | [diff] [blame] | 158 | prune: false |
robert.tomczyk | 7e50787 | 2019-06-18 17:20:26 +0100 | [diff] [blame] | 159 | clean: |
| 160 | after: false |
| 161 | before: '{clean_before}' |
Fatih Degirmenci | 03be82a | 2018-10-18 12:16:14 +0200 | [diff] [blame] | 162 | choosing-strategy: 'gerrit' |
Fatih Degirmenci | 1fab66d | 2018-10-18 15:14:30 +0200 | [diff] [blame] | 163 | |
Fatih Degirmenci | a2beeb2 | 2018-12-10 10:57:50 -0800 | [diff] [blame] | 164 | # triggers for Nordix Gerrit |
Fatih Degirmenci | 1fab66d | 2018-10-18 15:14:30 +0200 | [diff] [blame] | 165 | - trigger: |
| 166 | name: nordix-gerrit-trigger-patchset-created |
| 167 | triggers: |
| 168 | - gerrit: |
| 169 | server-name: 'Nordix Gerrit' |
| 170 | trigger-on: |
| 171 | - patchset-created-event: |
| 172 | exclude-drafts: 'false' |
| 173 | exclude-trivial-rebase: 'false' |
| 174 | exclude-no-code-change: 'false' |
| 175 | - draft-published-event |
| 176 | - comment-added-contains-event: |
| 177 | comment-contains-value: 'recheck' |
| 178 | - comment-added-contains-event: |
| 179 | comment-contains-value: 'reverify' |
| 180 | projects: |
Fatih Degirmenci | 1f3f914 | 2019-02-08 12:07:36 +0100 | [diff] [blame] | 181 | - project-compare-type: 'REG_EXP' |
Fatih Degirmenci | 1fab66d | 2018-10-18 15:14:30 +0200 | [diff] [blame] | 182 | project-pattern: '{project}' |
| 183 | branches: |
| 184 | - branch-compare-type: 'ANT' |
| 185 | branch-pattern: '**/{branch}' |
| 186 | file-paths: |
| 187 | - compare-type: 'ANT' |
| 188 | pattern: '{files}' |
Fatih Degirmenci | d888b0b | 2019-05-22 11:04:34 +0200 | [diff] [blame] | 189 | skip-vote: |
| 190 | successful: false |
| 191 | failed: false |
| 192 | unstable: false |
| 193 | notbuilt: false |
Fatih Degirmenci | 1fab66d | 2018-10-18 15:14:30 +0200 | [diff] [blame] | 194 | |
| 195 | - trigger: |
| 196 | name: nordix-gerrit-trigger-change-merged |
| 197 | triggers: |
| 198 | - gerrit: |
| 199 | server-name: 'Nordix Gerrit' |
| 200 | trigger-on: |
| 201 | - change-merged-event |
| 202 | - comment-added-contains-event: |
| 203 | comment-contains-value: 'remerge' |
| 204 | projects: |
| 205 | - project-compare-type: 'ANT' |
| 206 | project-pattern: '{project}' |
| 207 | branches: |
| 208 | - branch-compare-type: 'ANT' |
| 209 | branch-pattern: '**/{branch}' |
| 210 | file-paths: |
| 211 | - compare-type: 'ANT' |
| 212 | pattern: '{files}' |
Fatih Degirmenci | f1d9610 | 2018-10-19 15:10:56 +0200 | [diff] [blame] | 213 | |
Conor Ward | d48d835 | 2019-01-02 15:54:28 +0000 | [diff] [blame] | 214 | - trigger: |
| 215 | name: nordix-gerrit-push-upstream |
| 216 | triggers: |
| 217 | - gerrit: |
| 218 | server-name: 'Nordix Gerrit' |
| 219 | trigger-on: |
| 220 | - comment-added-contains-event: |
| 221 | comment-contains-value: 'push-upstream' |
| 222 | projects: |
| 223 | - project-compare-type: 'ANT' |
| 224 | project-pattern: '{project}' |
| 225 | branches: |
| 226 | - branch-compare-type: 'ANT' |
| 227 | branch-pattern: '**/{branch}' |
| 228 | file-paths: |
| 229 | - compare-type: 'ANT' |
| 230 | pattern: '{files}' |
| 231 | |
robert.tomczyk | c712a60 | 2019-06-14 10:42:22 +0100 | [diff] [blame] | 232 | - trigger: |
| 233 | name: nordix-gerrit-patchset-created-or-push-upstream |
| 234 | triggers: |
| 235 | - gerrit: |
| 236 | server-name: 'Nordix Gerrit' |
| 237 | trigger-on: |
| 238 | - comment-added-contains-event: |
| 239 | comment-contains-value: 'push-upstream' |
| 240 | - patchset-created-event: |
| 241 | exclude-drafts: true |
| 242 | projects: |
| 243 | - project-compare-type: 'ANT' |
| 244 | project-pattern: '{project}' |
| 245 | branches: |
| 246 | - branch-compare-type: 'ANT' |
| 247 | branch-pattern: '**/{branch}' |
| 248 | file-paths: |
| 249 | - compare-type: 'ANT' |
| 250 | pattern: '{files}' |
| 251 | |
Fatih Degirmenci | a2beeb2 | 2018-12-10 10:57:50 -0800 | [diff] [blame] | 252 | # triggers for ONAP Gerrit |
| 253 | - trigger: |
| 254 | name: onap-gerrit-trigger-change-merged |
| 255 | triggers: |
| 256 | - gerrit: |
| 257 | server-name: 'ONAP Gerrit' |
| 258 | trigger-on: |
| 259 | - change-merged-event |
| 260 | - comment-added-contains-event: |
| 261 | comment-contains-value: 'remerge' |
| 262 | projects: |
| 263 | - project-compare-type: 'ANT' |
| 264 | project-pattern: '{project}' |
| 265 | branches: |
| 266 | - branch-compare-type: 'ANT' |
| 267 | branch-pattern: '**/{branch}' |
| 268 | file-paths: |
| 269 | - compare-type: 'ANT' |
| 270 | pattern: '{files}' |
Fatih Degirmenci | e0611a1 | 2018-12-18 09:24:53 +0100 | [diff] [blame] | 271 | silent: true |
| 272 | silent-start: true |
Fatih Degirmenci | a2beeb2 | 2018-12-10 10:57:50 -0800 | [diff] [blame] | 273 | |
Fatih Degirmenci | 1e7b337 | 2019-03-14 15:11:15 -0700 | [diff] [blame] | 274 | # triggers for Acumos Gerrit |
| 275 | - trigger: |
| 276 | name: acumos-gerrit-trigger-change-merged |
| 277 | triggers: |
| 278 | - gerrit: |
| 279 | server-name: 'Acumos Gerrit' |
| 280 | trigger-on: |
| 281 | - change-merged-event |
| 282 | - comment-added-contains-event: |
| 283 | comment-contains-value: 'remerge' |
| 284 | projects: |
| 285 | - project-compare-type: 'ANT' |
| 286 | project-pattern: '{project}' |
| 287 | branches: |
| 288 | - branch-compare-type: 'ANT' |
| 289 | branch-pattern: '**/{branch}' |
| 290 | file-paths: |
| 291 | - compare-type: 'ANT' |
| 292 | pattern: '{files}' |
| 293 | silent: true |
| 294 | silent-start: true |
| 295 | |
Fatih Degirmenci | 3df9f09 | 2019-05-21 12:18:01 +0200 | [diff] [blame] | 296 | # triggers for ODL Gerrit |
| 297 | - trigger: |
| 298 | name: odl-gerrit-trigger-change-merged |
| 299 | triggers: |
| 300 | - gerrit: |
| 301 | server-name: 'ODL Gerrit' |
| 302 | trigger-on: |
| 303 | - change-merged-event |
| 304 | - comment-added-contains-event: |
| 305 | comment-contains-value: 'remerge' |
| 306 | projects: |
| 307 | - project-compare-type: 'ANT' |
| 308 | project-pattern: '{project}' |
| 309 | branches: |
| 310 | - branch-compare-type: 'ANT' |
| 311 | branch-pattern: '**/{branch}' |
| 312 | file-paths: |
| 313 | - compare-type: 'ANT' |
| 314 | pattern: '{files}' |
| 315 | silent: true |
| 316 | silent-start: true |
Fatih Degirmenci | 1e7b337 | 2019-03-14 15:11:15 -0700 | [diff] [blame] | 317 | |
robert.tomczyk | 29c6ced | 2019-05-28 11:43:02 +0100 | [diff] [blame] | 318 | # triggers for OpenDev Gerrit |
| 319 | - trigger: |
| 320 | name: opendev-gerrit-trigger-change-merged |
| 321 | triggers: |
| 322 | - gerrit: |
| 323 | server-name: 'OpenDev Gerrit' |
| 324 | trigger-on: |
| 325 | - change-merged-event |
| 326 | - comment-added-contains-event: |
| 327 | comment-contains-value: 'remerge' |
| 328 | projects: |
| 329 | - project-compare-type: 'ANT' |
| 330 | project-pattern: '{project}' |
| 331 | branches: |
| 332 | - branch-compare-type: 'ANT' |
| 333 | branch-pattern: '**/{branch}' |
| 334 | file-paths: |
| 335 | - compare-type: 'ANT' |
| 336 | pattern: '{files}' |
| 337 | silent: true |
| 338 | silent-start: true |
| 339 | |
Fatih Degirmenci | f1d9610 | 2018-10-19 15:10:56 +0200 | [diff] [blame] | 340 | # wrappers to use for jobs |
| 341 | - wrapper: |
| 342 | name: nordixinfra-jjb-creds-wrapper |
| 343 | wrappers: |
| 344 | - credentials-binding: |
| 345 | - username-password-separated: |
| 346 | credential-id: nordixinfra-jjb-creds |
| 347 | username: JJB_USERNAME |
| 348 | password: JJB_USERTOKEN |
Fatih Degirmenci | 2804ff9 | 2019-01-29 10:43:13 +0100 | [diff] [blame] | 349 | |
| 350 | # timeout wrapper to use for jobs |
| 351 | - wrapper: |
| 352 | name: build-timeout |
| 353 | wrappers: |
| 354 | - timeout: |
| 355 | timeout: '{timeout}' |
| 356 | timeout-var: 'BUILD_TIMEOUT' |
| 357 | fail: true |
Fatih Degirmenci | 243f424 | 2019-01-31 18:48:58 +0100 | [diff] [blame] | 358 | |
Fatih Degirmenci | 46f97c7 | 2019-02-07 10:58:44 +0100 | [diff] [blame] | 359 | # wrapper to fix jenkins build workspace permissions |
| 360 | - wrapper: |
| 361 | name: fix-workspace-permissions |
| 362 | wrappers: |
| 363 | - pre-scm-buildstep: |
| 364 | failOnError: true |
| 365 | buildsteps: |
| 366 | - shell: | |
| 367 | #!/bin/bash |
| 368 | sudo chown -R $USER:$USER $WORKSPACE || exit 1 |
| 369 | |
Fatih Degirmenci | 243f424 | 2019-01-31 18:48:58 +0100 | [diff] [blame] | 370 | - publisher: |
| 371 | name: notify-slack |
| 372 | publishers: |
| 373 | - slack: |
| 374 | room: '{slack-channel}' |
robert.tomczyk | 1880fba | 2019-07-10 18:22:49 +0100 | [diff] [blame] | 375 | notify-failure: true |
| 376 | notify-back-to-normal: true |
Fatih Degirmenci | fbd236f | 2019-02-07 10:08:35 +0100 | [diff] [blame] | 377 | |
| 378 | # property to discard old builds |
| 379 | - property: |
| 380 | name: logrotate |
| 381 | properties: |
| 382 | - build-discarder: |
| 383 | days-to-keep: 30 |
| 384 | num-to-keep: 100 |
| 385 | artifact-days-to-keep: 30 |
| 386 | artifact-num-to-keep: 100 |