blob: 6a4d11ef8e8743869a9eeb4431e699d651580dbd [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
robert.tomczyk66df1dd2019-07-25 08:58:18 +01008 default: https://review.opendev.org/jjb/jenkins-job-builder
Fatih Degirmenci03be82a2018-10-18 12:16:14 +02009 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
robert.tomczykf97b3c22019-09-18 15:14:38 +0100109- parameter:
110 name: oransc-gerrit-parameters
111 parameters:
112 - string:
113 name: GERRIT_USER
114 default: nordix
115 description: Non-interactive user to stream Gerrit Events on ORAN-SC Gerrit
116 - string:
117 name: GIT_BASE_HTTPS
118 default: https://gerrit.o-ran-sc.org/r
119 description: HTTPS URL to Project Repo on ORAN-SC Gerrit to clone repo
120 - string:
121 name: GIT_BASE_SSH
122 default: ssh://$GERRIT_USER@gerrit.o-ran-sc.org:29418
123 description: SSH URL to Project Repo on ORAN-SC Gerrit to clone repo
124
robert.tomczyk58a24dd2019-11-14 13:43:46 +0000125# Verify job for Geode git tags to make sure there are in agreed format
126- builder:
127 name: 'verify-geode-tag-macro'
128 builders:
129 - shell:
130 !include-raw: ./verify_geode_tag.sh
131
Fatih Degirmenci03be82a2018-10-18 12:16:14 +0200132# defaults for job build history
133- property:
134 name: logrotate-default
135 properties:
136 - build-discarder:
137 days-to-keep: 60
138 num-to-keep: 200
139 artifact-days-to-keep: 60
140 artifact-num-to-keep: 200
141
robert.tomczyk5fe5de72019-07-22 20:48:58 +0100142# defaults for SCM, Gerrit and GitHub
Fatih Degirmenci03be82a2018-10-18 12:16:14 +0200143- scm:
144 name: git-scm
145 scm:
Fatih Degirmenci352a9b12018-10-19 15:36:09 +0200146 - git:
Fatih Degirmenci9a746ac2018-10-23 00:20:43 +0200147 url: '$GIT_BASE_SSH/$PROJECT'
Fatih Degirmenci627036b2018-10-23 00:37:19 +0200148 credentials-id: '{ssh-credentials-id}'
Fatih Degirmenci03be82a2018-10-18 12:16:14 +0200149 branches:
Fatih Degirmenci352a9b12018-10-19 15:36:09 +0200150 - 'refs/heads/{branch}'
151 refspec: '{refspec}'
Fatih Degirmenci03be82a2018-10-18 12:16:14 +0200152 timeout: 15
153 per-build-tag: false
154 skip-tag: true
155 shallow-clone: false
156 use-author: false
157 ignore-notify: false
robert.tomczyk7e507872019-06-18 17:20:26 +0100158 wipe-workspace: '{wipe_workspace}'
Fatih Degirmenci03be82a2018-10-18 12:16:14 +0200159 prune: false
robert.tomczyk7e507872019-06-18 17:20:26 +0100160 clean:
161 after: false
162 before: '{clean_before}'
Fatih Degirmenci352a9b12018-10-19 15:36:09 +0200163 choosing-strategy: 'default'
Fatih Degirmenci03be82a2018-10-18 12:16:14 +0200164
165- scm:
166 name: git-scm-gerrit
167 scm:
168 - git:
Fatih Degirmenci9a746ac2018-10-23 00:20:43 +0200169 url: '$GIT_BASE_SSH/$PROJECT'
Fatih Degirmenci627036b2018-10-23 00:37:19 +0200170 credentials-id: '{ssh-credentials-id}'
Fatih Degirmenci352a9b12018-10-19 15:36:09 +0200171 branches:
172 - 'refs/heads/{branch}'
173 refspec: '{refspec}'
174 timeout: 15
175 per-build-tag: false
176 skip-tag: true
177 shallow-clone: false
178 use-author: false
179 ignore-notify: false
robert.tomczyk7e507872019-06-18 17:20:26 +0100180 wipe-workspace: '{wipe_workspace}'
Fatih Degirmenci352a9b12018-10-19 15:36:09 +0200181 prune: false
robert.tomczyk7e507872019-06-18 17:20:26 +0100182 clean:
183 after: false
184 before: '{clean_before}'
Fatih Degirmenci03be82a2018-10-18 12:16:14 +0200185 choosing-strategy: 'gerrit'
Fatih Degirmenci1fab66d2018-10-18 15:14:30 +0200186
robert.tomczyk5fe5de72019-07-22 20:48:58 +0100187- scm:
188 name: git-scm-github
189 scm:
190 - git:
191 url: 'https://github.com/$PROJECT.git'
192 branches:
193 - '*/{branch}'
194 refspec: '{refspec}'
195 timeout: 15
196 per-build-tag: false
197 skip-tag: true
198 shallow-clone: false
199 use-author: false
200 ignore-notify: false
201 wipe-workspace: '{wipe_workspace}'
202 prune: false
203 clean:
204 after: false
205 before: '{clean_before}'
206 choosing-strategy: 'default'
207 basedir: '{base_dir}'
208
Fatih Degirmencia2beeb22018-12-10 10:57:50 -0800209# triggers for Nordix Gerrit
Fatih Degirmenci1fab66d2018-10-18 15:14:30 +0200210- trigger:
211 name: nordix-gerrit-trigger-patchset-created
212 triggers:
213 - gerrit:
214 server-name: 'Nordix Gerrit'
215 trigger-on:
216 - patchset-created-event:
217 exclude-drafts: 'false'
218 exclude-trivial-rebase: 'false'
219 exclude-no-code-change: 'false'
220 - draft-published-event
221 - comment-added-contains-event:
222 comment-contains-value: 'recheck'
223 - comment-added-contains-event:
224 comment-contains-value: 'reverify'
225 projects:
Fatih Degirmenci1f3f9142019-02-08 12:07:36 +0100226 - project-compare-type: 'REG_EXP'
Fatih Degirmenci1fab66d2018-10-18 15:14:30 +0200227 project-pattern: '{project}'
228 branches:
229 - branch-compare-type: 'ANT'
230 branch-pattern: '**/{branch}'
231 file-paths:
232 - compare-type: 'ANT'
233 pattern: '{files}'
Fatih Degirmencid888b0b2019-05-22 11:04:34 +0200234 skip-vote:
235 successful: false
236 failed: false
237 unstable: false
238 notbuilt: false
Fatih Degirmenci1fab66d2018-10-18 15:14:30 +0200239
240- trigger:
241 name: nordix-gerrit-trigger-change-merged
242 triggers:
243 - gerrit:
244 server-name: 'Nordix Gerrit'
245 trigger-on:
246 - change-merged-event
247 - comment-added-contains-event:
248 comment-contains-value: 'remerge'
249 projects:
250 - project-compare-type: 'ANT'
251 project-pattern: '{project}'
252 branches:
253 - branch-compare-type: 'ANT'
254 branch-pattern: '**/{branch}'
255 file-paths:
256 - compare-type: 'ANT'
257 pattern: '{files}'
Fatih Degirmencif1d96102018-10-19 15:10:56 +0200258
Conor Wardd48d8352019-01-02 15:54:28 +0000259- trigger:
260 name: nordix-gerrit-push-upstream
261 triggers:
262 - gerrit:
263 server-name: 'Nordix Gerrit'
264 trigger-on:
265 - comment-added-contains-event:
266 comment-contains-value: 'push-upstream'
267 projects:
268 - project-compare-type: 'ANT'
269 project-pattern: '{project}'
270 branches:
271 - branch-compare-type: 'ANT'
272 branch-pattern: '**/{branch}'
273 file-paths:
274 - compare-type: 'ANT'
275 pattern: '{files}'
276
robert.tomczykc712a602019-06-14 10:42:22 +0100277- trigger:
278 name: nordix-gerrit-patchset-created-or-push-upstream
279 triggers:
280 - gerrit:
281 server-name: 'Nordix Gerrit'
282 trigger-on:
283 - comment-added-contains-event:
284 comment-contains-value: 'push-upstream'
285 - patchset-created-event:
286 exclude-drafts: true
287 projects:
288 - project-compare-type: 'ANT'
289 project-pattern: '{project}'
290 branches:
291 - branch-compare-type: 'ANT'
292 branch-pattern: '**/{branch}'
293 file-paths:
294 - compare-type: 'ANT'
295 pattern: '{files}'
296
Fatih Degirmencia2beeb22018-12-10 10:57:50 -0800297# triggers for ONAP Gerrit
298- trigger:
299 name: onap-gerrit-trigger-change-merged
300 triggers:
301 - gerrit:
302 server-name: 'ONAP Gerrit'
303 trigger-on:
304 - change-merged-event
305 - comment-added-contains-event:
306 comment-contains-value: 'remerge'
307 projects:
308 - project-compare-type: 'ANT'
309 project-pattern: '{project}'
310 branches:
311 - branch-compare-type: 'ANT'
312 branch-pattern: '**/{branch}'
313 file-paths:
314 - compare-type: 'ANT'
315 pattern: '{files}'
Fatih Degirmencie0611a12018-12-18 09:24:53 +0100316 silent: true
317 silent-start: true
Fatih Degirmencia2beeb22018-12-10 10:57:50 -0800318
Fatih Degirmenci1e7b3372019-03-14 15:11:15 -0700319# triggers for Acumos Gerrit
320- trigger:
321 name: acumos-gerrit-trigger-change-merged
322 triggers:
323 - gerrit:
324 server-name: 'Acumos Gerrit'
325 trigger-on:
326 - change-merged-event
327 - comment-added-contains-event:
328 comment-contains-value: 'remerge'
329 projects:
330 - project-compare-type: 'ANT'
331 project-pattern: '{project}'
332 branches:
333 - branch-compare-type: 'ANT'
334 branch-pattern: '**/{branch}'
335 file-paths:
336 - compare-type: 'ANT'
337 pattern: '{files}'
338 silent: true
339 silent-start: true
340
Fatih Degirmenci3df9f092019-05-21 12:18:01 +0200341# triggers for ODL Gerrit
342- trigger:
343 name: odl-gerrit-trigger-change-merged
344 triggers:
345 - gerrit:
346 server-name: 'ODL Gerrit'
347 trigger-on:
348 - change-merged-event
349 - comment-added-contains-event:
350 comment-contains-value: 'remerge'
351 projects:
352 - project-compare-type: 'ANT'
353 project-pattern: '{project}'
354 branches:
355 - branch-compare-type: 'ANT'
356 branch-pattern: '**/{branch}'
357 file-paths:
358 - compare-type: 'ANT'
359 pattern: '{files}'
360 silent: true
361 silent-start: true
Fatih Degirmenci1e7b3372019-03-14 15:11:15 -0700362
robert.tomczyk29c6ced2019-05-28 11:43:02 +0100363# triggers for OpenDev Gerrit
364- trigger:
365 name: opendev-gerrit-trigger-change-merged
366 triggers:
367 - gerrit:
368 server-name: 'OpenDev Gerrit'
369 trigger-on:
370 - change-merged-event
371 - comment-added-contains-event:
372 comment-contains-value: 'remerge'
373 projects:
374 - project-compare-type: 'ANT'
375 project-pattern: '{project}'
376 branches:
377 - branch-compare-type: 'ANT'
378 branch-pattern: '**/{branch}'
379 file-paths:
380 - compare-type: 'ANT'
381 pattern: '{files}'
382 silent: true
383 silent-start: true
384
robert.tomczykf97b3c22019-09-18 15:14:38 +0100385# triggers for ORANSC Gerrit
386- trigger:
387 name: oransc-gerrit-trigger-change-merged
388 triggers:
389 - gerrit:
390 server-name: 'ORANSC Gerrit'
391 trigger-on:
392 - change-merged-event
393 - comment-added-contains-event:
394 comment-contains-value: 'remerge'
395 projects:
396 - project-compare-type: 'ANT'
397 project-pattern: '{project}'
398 branches:
399 - branch-compare-type: 'ANT'
400 branch-pattern: '**/{branch}'
401 file-paths:
402 - compare-type: 'ANT'
403 pattern: '{files}'
404 silent: true
405 silent-start: true
406
Fatih Degirmencif1d96102018-10-19 15:10:56 +0200407# wrappers to use for jobs
408- wrapper:
409 name: nordixinfra-jjb-creds-wrapper
410 wrappers:
411 - credentials-binding:
412 - username-password-separated:
413 credential-id: nordixinfra-jjb-creds
414 username: JJB_USERNAME
415 password: JJB_USERTOKEN
Fatih Degirmenci2804ff92019-01-29 10:43:13 +0100416
417# timeout wrapper to use for jobs
418- wrapper:
419 name: build-timeout
420 wrappers:
421 - timeout:
422 timeout: '{timeout}'
423 timeout-var: 'BUILD_TIMEOUT'
424 fail: true
Fatih Degirmenci243f4242019-01-31 18:48:58 +0100425
Fatih Degirmenci46f97c72019-02-07 10:58:44 +0100426# wrapper to fix jenkins build workspace permissions
427- wrapper:
428 name: fix-workspace-permissions
429 wrappers:
430 - pre-scm-buildstep:
431 failOnError: true
432 buildsteps:
433 - shell: |
434 #!/bin/bash
435 sudo chown -R $USER:$USER $WORKSPACE || exit 1
436
Fatih Degirmenci243f4242019-01-31 18:48:58 +0100437- publisher:
438 name: notify-slack
439 publishers:
440 - slack:
441 room: '{slack-channel}'
robert.tomczykc8dcf1c2019-07-25 20:30:29 +0100442 notify-start: '{notify-start}'
443 notify-success: '{notify-success}'
444 notify-failure: '{notify-failure}'
445 notify-back-to-normal: '{notify-back-to-normal}'
Fatih Degirmencifbd236f2019-02-07 10:08:35 +0100446
447# property to discard old builds
448- property:
449 name: logrotate
450 properties:
451 - build-discarder:
452 days-to-keep: 30
453 num-to-keep: 100
454 artifact-days-to-keep: 30
455 artifact-num-to-keep: 100