blob: 534e61c8d085c0be70e7a05fd2e65bd05e7d50c1 [file] [log] [blame]
Fatih Degirmenci03be82a2018-10-18 12:16:14 +02001---
2# these parameters are used for infra related variables
3- parameter:
Fatih Degirmenci5addd512018-10-19 14:06:03 +02004 name: infra-parameters
Fatih Degirmenci03be82a2018-10-18 12:16:14 +02005 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 Degirmenci43187b22019-02-25 15:57:17 +010012 default: 2.9.1
Fatih Degirmenci03be82a2018-10-18 12:16:14 +020013 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 Degirmenci5addd512018-10-19 14:06:03 +020017 name: project-parameters
Fatih Degirmenci03be82a2018-10-18 12:16:14 +020018 parameters:
19 - string:
20 name: PROJECT
21 default: '{project}'
22 description: JJB configured PROJECT parameter to identify a Nordix Gerrit project
Fatih Degirmenci2c4038b2018-10-18 15:25:24 +020023 - string:
24 name: BRANCH
25 default: '{branch}'
26 description: "JJB configured BRANCH parameter (e.g. master, nordix-dev)"
Fatih Degirmenci03be82a2018-10-18 12:16:14 +020027
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 Degirmenci9a746ac2018-10-23 00:20:43 +020038 default: https://gerrit.nordix.org
Fatih Degirmenci03be82a2018-10-18 12:16:14 +020039 description: HTTPS URL of Project Repo on Nordix Gerrit to clone repo
40 - string:
41 name: GIT_BASE_SSH
Fatih Degirmenci9a746ac2018-10-23 00:20:43 +020042 default: ssh://$GERRIT_USER@gerrit.nordix.org:29418
Fatih Degirmenci03be82a2018-10-18 12:16:14 +020043 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 Degirmenci9a746ac2018-10-23 00:20:43 +020054 default: https://gerrit.onap.org/r/p
Fatih Degirmenci03be82a2018-10-18 12:16:14 +020055 description: HTTPS URL to Project Repo on ONAP Gerrit to clone repo
56 - string:
57 name: GIT_BASE_SSH
Fatih Degirmenci9a746ac2018-10-23 00:20:43 +020058 default: ssh://$GERRIT_USER@gerrit.onap.org:29418
Fatih Degirmenci03be82a2018-10-18 12:16:14 +020059 description: SSH URL to Project Repo on ONAP Gerrit to clone repo
60
Fatih Degirmenci1e7b3372019-03-14 15:11:15 -070061- 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 Degirmenci9a9f0842019-05-21 12:14:29 +020077- 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.tomczyk29c6ced2019-05-28 11:43:02 +010093- 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 Degirmenci03be82a2018-10-18 12:16:14 +0200109# 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 Degirmenci352a9b12018-10-19 15:36:09 +0200123 - git:
Fatih Degirmenci9a746ac2018-10-23 00:20:43 +0200124 url: '$GIT_BASE_SSH/$PROJECT'
Fatih Degirmenci627036b2018-10-23 00:37:19 +0200125 credentials-id: '{ssh-credentials-id}'
Fatih Degirmenci03be82a2018-10-18 12:16:14 +0200126 branches:
Fatih Degirmenci352a9b12018-10-19 15:36:09 +0200127 - 'refs/heads/{branch}'
128 refspec: '{refspec}'
Fatih Degirmenci03be82a2018-10-18 12:16:14 +0200129 timeout: 15
130 per-build-tag: false
131 skip-tag: true
132 shallow-clone: false
133 use-author: false
134 ignore-notify: false
robert.tomczyk7e507872019-06-18 17:20:26 +0100135 wipe-workspace: '{wipe_workspace}'
Fatih Degirmenci03be82a2018-10-18 12:16:14 +0200136 prune: false
robert.tomczyk7e507872019-06-18 17:20:26 +0100137 clean:
138 after: false
139 before: '{clean_before}'
Fatih Degirmenci352a9b12018-10-19 15:36:09 +0200140 choosing-strategy: 'default'
Fatih Degirmenci03be82a2018-10-18 12:16:14 +0200141
142- scm:
143 name: git-scm-gerrit
144 scm:
145 - git:
Fatih Degirmenci9a746ac2018-10-23 00:20:43 +0200146 url: '$GIT_BASE_SSH/$PROJECT'
Fatih Degirmenci627036b2018-10-23 00:37:19 +0200147 credentials-id: '{ssh-credentials-id}'
Fatih Degirmenci352a9b12018-10-19 15:36:09 +0200148 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.tomczyk7e507872019-06-18 17:20:26 +0100157 wipe-workspace: '{wipe_workspace}'
Fatih Degirmenci352a9b12018-10-19 15:36:09 +0200158 prune: false
robert.tomczyk7e507872019-06-18 17:20:26 +0100159 clean:
160 after: false
161 before: '{clean_before}'
Fatih Degirmenci03be82a2018-10-18 12:16:14 +0200162 choosing-strategy: 'gerrit'
Fatih Degirmenci1fab66d2018-10-18 15:14:30 +0200163
Fatih Degirmencia2beeb22018-12-10 10:57:50 -0800164# triggers for Nordix Gerrit
Fatih Degirmenci1fab66d2018-10-18 15:14:30 +0200165- 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 Degirmenci1f3f9142019-02-08 12:07:36 +0100181 - project-compare-type: 'REG_EXP'
Fatih Degirmenci1fab66d2018-10-18 15:14:30 +0200182 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 Degirmencid888b0b2019-05-22 11:04:34 +0200189 skip-vote:
190 successful: false
191 failed: false
192 unstable: false
193 notbuilt: false
Fatih Degirmenci1fab66d2018-10-18 15:14:30 +0200194
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 Degirmencif1d96102018-10-19 15:10:56 +0200213
Conor Wardd48d8352019-01-02 15:54:28 +0000214- 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.tomczykc712a602019-06-14 10:42:22 +0100232- 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 Degirmencia2beeb22018-12-10 10:57:50 -0800252# 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 Degirmencie0611a12018-12-18 09:24:53 +0100271 silent: true
272 silent-start: true
Fatih Degirmencia2beeb22018-12-10 10:57:50 -0800273
Fatih Degirmenci1e7b3372019-03-14 15:11:15 -0700274# 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 Degirmenci3df9f092019-05-21 12:18:01 +0200296# 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 Degirmenci1e7b3372019-03-14 15:11:15 -0700317
robert.tomczyk29c6ced2019-05-28 11:43:02 +0100318# 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 Degirmencif1d96102018-10-19 15:10:56 +0200340# 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 Degirmenci2804ff92019-01-29 10:43:13 +0100349
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 Degirmenci243f4242019-01-31 18:48:58 +0100358
Fatih Degirmenci46f97c72019-02-07 10:58:44 +0100359# 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 Degirmenci243f4242019-01-31 18:48:58 +0100370- publisher:
371 name: notify-slack
372 publishers:
373 - slack:
374 room: '{slack-channel}'
robert.tomczyk1880fba2019-07-10 18:22:49 +0100375 notify-failure: true
376 notify-back-to-normal: true
Fatih Degirmencifbd236f2019-02-07 10:08:35 +0100377
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