blob: 834b60fd145ee7ad0aac51dbd4b206d2536fa355 [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
135 wipe-workspace: true
136 prune: false
Fatih Degirmenci352a9b12018-10-19 15:36:09 +0200137 choosing-strategy: 'default'
Fatih Degirmenci03be82a2018-10-18 12:16:14 +0200138
139- scm:
140 name: git-scm-gerrit
141 scm:
142 - git:
Fatih Degirmenci9a746ac2018-10-23 00:20:43 +0200143 url: '$GIT_BASE_SSH/$PROJECT'
Fatih Degirmenci627036b2018-10-23 00:37:19 +0200144 credentials-id: '{ssh-credentials-id}'
Fatih Degirmenci352a9b12018-10-19 15:36:09 +0200145 branches:
146 - 'refs/heads/{branch}'
147 refspec: '{refspec}'
148 timeout: 15
149 per-build-tag: false
150 skip-tag: true
151 shallow-clone: false
152 use-author: false
153 ignore-notify: false
154 wipe-workspace: true
155 prune: false
Fatih Degirmenci03be82a2018-10-18 12:16:14 +0200156 choosing-strategy: 'gerrit'
Fatih Degirmenci1fab66d2018-10-18 15:14:30 +0200157
Fatih Degirmencia2beeb22018-12-10 10:57:50 -0800158# triggers for Nordix Gerrit
Fatih Degirmenci1fab66d2018-10-18 15:14:30 +0200159- trigger:
160 name: nordix-gerrit-trigger-patchset-created
161 triggers:
162 - gerrit:
163 server-name: 'Nordix Gerrit'
164 trigger-on:
165 - patchset-created-event:
166 exclude-drafts: 'false'
167 exclude-trivial-rebase: 'false'
168 exclude-no-code-change: 'false'
169 - draft-published-event
170 - comment-added-contains-event:
171 comment-contains-value: 'recheck'
172 - comment-added-contains-event:
173 comment-contains-value: 'reverify'
174 projects:
Fatih Degirmenci1f3f9142019-02-08 12:07:36 +0100175 - project-compare-type: 'REG_EXP'
Fatih Degirmenci1fab66d2018-10-18 15:14:30 +0200176 project-pattern: '{project}'
177 branches:
178 - branch-compare-type: 'ANT'
179 branch-pattern: '**/{branch}'
180 file-paths:
181 - compare-type: 'ANT'
182 pattern: '{files}'
Fatih Degirmencid888b0b2019-05-22 11:04:34 +0200183 skip-vote:
184 successful: false
185 failed: false
186 unstable: false
187 notbuilt: false
Fatih Degirmenci1fab66d2018-10-18 15:14:30 +0200188
189- trigger:
190 name: nordix-gerrit-trigger-change-merged
191 triggers:
192 - gerrit:
193 server-name: 'Nordix Gerrit'
194 trigger-on:
195 - change-merged-event
196 - comment-added-contains-event:
197 comment-contains-value: 'remerge'
198 projects:
199 - project-compare-type: 'ANT'
200 project-pattern: '{project}'
201 branches:
202 - branch-compare-type: 'ANT'
203 branch-pattern: '**/{branch}'
204 file-paths:
205 - compare-type: 'ANT'
206 pattern: '{files}'
Fatih Degirmencif1d96102018-10-19 15:10:56 +0200207
Conor Wardd48d8352019-01-02 15:54:28 +0000208- trigger:
209 name: nordix-gerrit-push-upstream
210 triggers:
211 - gerrit:
212 server-name: 'Nordix Gerrit'
213 trigger-on:
214 - comment-added-contains-event:
215 comment-contains-value: 'push-upstream'
216 projects:
217 - project-compare-type: 'ANT'
218 project-pattern: '{project}'
219 branches:
220 - branch-compare-type: 'ANT'
221 branch-pattern: '**/{branch}'
222 file-paths:
223 - compare-type: 'ANT'
224 pattern: '{files}'
225
robert.tomczykc712a602019-06-14 10:42:22 +0100226- trigger:
227 name: nordix-gerrit-patchset-created-or-push-upstream
228 triggers:
229 - gerrit:
230 server-name: 'Nordix Gerrit'
231 trigger-on:
232 - comment-added-contains-event:
233 comment-contains-value: 'push-upstream'
234 - patchset-created-event:
235 exclude-drafts: true
236 projects:
237 - project-compare-type: 'ANT'
238 project-pattern: '{project}'
239 branches:
240 - branch-compare-type: 'ANT'
241 branch-pattern: '**/{branch}'
242 file-paths:
243 - compare-type: 'ANT'
244 pattern: '{files}'
245
Fatih Degirmencia2beeb22018-12-10 10:57:50 -0800246# triggers for ONAP Gerrit
247- trigger:
248 name: onap-gerrit-trigger-change-merged
249 triggers:
250 - gerrit:
251 server-name: 'ONAP Gerrit'
252 trigger-on:
253 - change-merged-event
254 - comment-added-contains-event:
255 comment-contains-value: 'remerge'
256 projects:
257 - project-compare-type: 'ANT'
258 project-pattern: '{project}'
259 branches:
260 - branch-compare-type: 'ANT'
261 branch-pattern: '**/{branch}'
262 file-paths:
263 - compare-type: 'ANT'
264 pattern: '{files}'
Fatih Degirmencie0611a12018-12-18 09:24:53 +0100265 silent: true
266 silent-start: true
Fatih Degirmencia2beeb22018-12-10 10:57:50 -0800267
Fatih Degirmenci1e7b3372019-03-14 15:11:15 -0700268# triggers for Acumos Gerrit
269- trigger:
270 name: acumos-gerrit-trigger-change-merged
271 triggers:
272 - gerrit:
273 server-name: 'Acumos Gerrit'
274 trigger-on:
275 - change-merged-event
276 - comment-added-contains-event:
277 comment-contains-value: 'remerge'
278 projects:
279 - project-compare-type: 'ANT'
280 project-pattern: '{project}'
281 branches:
282 - branch-compare-type: 'ANT'
283 branch-pattern: '**/{branch}'
284 file-paths:
285 - compare-type: 'ANT'
286 pattern: '{files}'
287 silent: true
288 silent-start: true
289
Fatih Degirmenci3df9f092019-05-21 12:18:01 +0200290# triggers for ODL Gerrit
291- trigger:
292 name: odl-gerrit-trigger-change-merged
293 triggers:
294 - gerrit:
295 server-name: 'ODL Gerrit'
296 trigger-on:
297 - change-merged-event
298 - comment-added-contains-event:
299 comment-contains-value: 'remerge'
300 projects:
301 - project-compare-type: 'ANT'
302 project-pattern: '{project}'
303 branches:
304 - branch-compare-type: 'ANT'
305 branch-pattern: '**/{branch}'
306 file-paths:
307 - compare-type: 'ANT'
308 pattern: '{files}'
309 silent: true
310 silent-start: true
Fatih Degirmenci1e7b3372019-03-14 15:11:15 -0700311
robert.tomczyk29c6ced2019-05-28 11:43:02 +0100312# triggers for OpenDev Gerrit
313- trigger:
314 name: opendev-gerrit-trigger-change-merged
315 triggers:
316 - gerrit:
317 server-name: 'OpenDev Gerrit'
318 trigger-on:
319 - change-merged-event
320 - comment-added-contains-event:
321 comment-contains-value: 'remerge'
322 projects:
323 - project-compare-type: 'ANT'
324 project-pattern: '{project}'
325 branches:
326 - branch-compare-type: 'ANT'
327 branch-pattern: '**/{branch}'
328 file-paths:
329 - compare-type: 'ANT'
330 pattern: '{files}'
331 silent: true
332 silent-start: true
333
Fatih Degirmencif1d96102018-10-19 15:10:56 +0200334# wrappers to use for jobs
335- wrapper:
336 name: nordixinfra-jjb-creds-wrapper
337 wrappers:
338 - credentials-binding:
339 - username-password-separated:
340 credential-id: nordixinfra-jjb-creds
341 username: JJB_USERNAME
342 password: JJB_USERTOKEN
Fatih Degirmenci2804ff92019-01-29 10:43:13 +0100343
344# timeout wrapper to use for jobs
345- wrapper:
346 name: build-timeout
347 wrappers:
348 - timeout:
349 timeout: '{timeout}'
350 timeout-var: 'BUILD_TIMEOUT'
351 fail: true
Fatih Degirmenci243f4242019-01-31 18:48:58 +0100352
Fatih Degirmenci46f97c72019-02-07 10:58:44 +0100353# wrapper to fix jenkins build workspace permissions
354- wrapper:
355 name: fix-workspace-permissions
356 wrappers:
357 - pre-scm-buildstep:
358 failOnError: true
359 buildsteps:
360 - shell: |
361 #!/bin/bash
362 sudo chown -R $USER:$USER $WORKSPACE || exit 1
363
Fatih Degirmenci243f4242019-01-31 18:48:58 +0100364- publisher:
365 name: notify-slack
366 publishers:
367 - slack:
368 room: '{slack-channel}'
369 notify-failure: True
Fatih Degirmencifbd236f2019-02-07 10:08:35 +0100370
371# property to discard old builds
372- property:
373 name: logrotate
374 properties:
375 - build-discarder:
376 days-to-keep: 30
377 num-to-keep: 100
378 artifact-days-to-keep: 30
379 artifact-num-to-keep: 100