blob: b96a205b0fbbf082b06da1588095161cda20b28a [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 Degirmenci03be82a2018-10-18 12:16:14 +020077# defaults for job build history
78- property:
79 name: logrotate-default
80 properties:
81 - build-discarder:
82 days-to-keep: 60
83 num-to-keep: 200
84 artifact-days-to-keep: 60
85 artifact-num-to-keep: 200
86
87# defaults for SCM and Gerrit
88- scm:
89 name: git-scm
90 scm:
Fatih Degirmenci352a9b12018-10-19 15:36:09 +020091 - git:
Fatih Degirmenci9a746ac2018-10-23 00:20:43 +020092 url: '$GIT_BASE_SSH/$PROJECT'
Fatih Degirmenci627036b2018-10-23 00:37:19 +020093 credentials-id: '{ssh-credentials-id}'
Fatih Degirmenci03be82a2018-10-18 12:16:14 +020094 branches:
Fatih Degirmenci352a9b12018-10-19 15:36:09 +020095 - 'refs/heads/{branch}'
96 refspec: '{refspec}'
Fatih Degirmenci03be82a2018-10-18 12:16:14 +020097 timeout: 15
98 per-build-tag: false
99 skip-tag: true
100 shallow-clone: false
101 use-author: false
102 ignore-notify: false
103 wipe-workspace: true
104 prune: false
Fatih Degirmenci352a9b12018-10-19 15:36:09 +0200105 choosing-strategy: 'default'
Fatih Degirmenci03be82a2018-10-18 12:16:14 +0200106
107- scm:
108 name: git-scm-gerrit
109 scm:
110 - git:
Fatih Degirmenci9a746ac2018-10-23 00:20:43 +0200111 url: '$GIT_BASE_SSH/$PROJECT'
Fatih Degirmenci627036b2018-10-23 00:37:19 +0200112 credentials-id: '{ssh-credentials-id}'
Fatih Degirmenci352a9b12018-10-19 15:36:09 +0200113 branches:
114 - 'refs/heads/{branch}'
115 refspec: '{refspec}'
116 timeout: 15
117 per-build-tag: false
118 skip-tag: true
119 shallow-clone: false
120 use-author: false
121 ignore-notify: false
122 wipe-workspace: true
123 prune: false
Fatih Degirmenci03be82a2018-10-18 12:16:14 +0200124 choosing-strategy: 'gerrit'
Fatih Degirmenci1fab66d2018-10-18 15:14:30 +0200125
Fatih Degirmencia2beeb22018-12-10 10:57:50 -0800126# triggers for Nordix Gerrit
Fatih Degirmenci1fab66d2018-10-18 15:14:30 +0200127- trigger:
128 name: nordix-gerrit-trigger-patchset-created
129 triggers:
130 - gerrit:
131 server-name: 'Nordix Gerrit'
132 trigger-on:
133 - patchset-created-event:
134 exclude-drafts: 'false'
135 exclude-trivial-rebase: 'false'
136 exclude-no-code-change: 'false'
137 - draft-published-event
138 - comment-added-contains-event:
139 comment-contains-value: 'recheck'
140 - comment-added-contains-event:
141 comment-contains-value: 'reverify'
142 projects:
Fatih Degirmenci1f3f9142019-02-08 12:07:36 +0100143 - project-compare-type: 'REG_EXP'
Fatih Degirmenci1fab66d2018-10-18 15:14:30 +0200144 project-pattern: '{project}'
145 branches:
146 - branch-compare-type: 'ANT'
147 branch-pattern: '**/{branch}'
148 file-paths:
149 - compare-type: 'ANT'
150 pattern: '{files}'
151 skip-vote:
152 successful: false
153 failed: false
154 unstable: false
155 notbuilt: false
156
157- trigger:
158 name: nordix-gerrit-trigger-change-merged
159 triggers:
160 - gerrit:
161 server-name: 'Nordix Gerrit'
162 trigger-on:
163 - change-merged-event
164 - comment-added-contains-event:
165 comment-contains-value: 'remerge'
166 projects:
167 - project-compare-type: 'ANT'
168 project-pattern: '{project}'
169 branches:
170 - branch-compare-type: 'ANT'
171 branch-pattern: '**/{branch}'
172 file-paths:
173 - compare-type: 'ANT'
174 pattern: '{files}'
Fatih Degirmencif1d96102018-10-19 15:10:56 +0200175
Conor Wardd48d8352019-01-02 15:54:28 +0000176- trigger:
177 name: nordix-gerrit-push-upstream
178 triggers:
179 - gerrit:
180 server-name: 'Nordix Gerrit'
181 trigger-on:
182 - comment-added-contains-event:
183 comment-contains-value: 'push-upstream'
184 projects:
185 - project-compare-type: 'ANT'
186 project-pattern: '{project}'
187 branches:
188 - branch-compare-type: 'ANT'
189 branch-pattern: '**/{branch}'
190 file-paths:
191 - compare-type: 'ANT'
192 pattern: '{files}'
193
Fatih Degirmencia2beeb22018-12-10 10:57:50 -0800194# triggers for ONAP Gerrit
195- trigger:
196 name: onap-gerrit-trigger-change-merged
197 triggers:
198 - gerrit:
199 server-name: 'ONAP 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 Degirmencie0611a12018-12-18 09:24:53 +0100213 silent: true
214 silent-start: true
Fatih Degirmencia2beeb22018-12-10 10:57:50 -0800215
Fatih Degirmenci1e7b3372019-03-14 15:11:15 -0700216# triggers for Acumos Gerrit
217- trigger:
218 name: acumos-gerrit-trigger-change-merged
219 triggers:
220 - gerrit:
221 server-name: 'Acumos Gerrit'
222 trigger-on:
223 - change-merged-event
224 - comment-added-contains-event:
225 comment-contains-value: 'remerge'
226 projects:
227 - project-compare-type: 'ANT'
228 project-pattern: '{project}'
229 branches:
230 - branch-compare-type: 'ANT'
231 branch-pattern: '**/{branch}'
232 file-paths:
233 - compare-type: 'ANT'
234 pattern: '{files}'
235 silent: true
236 silent-start: true
237
238
Fatih Degirmencif1d96102018-10-19 15:10:56 +0200239# wrappers to use for jobs
240- wrapper:
241 name: nordixinfra-jjb-creds-wrapper
242 wrappers:
243 - credentials-binding:
244 - username-password-separated:
245 credential-id: nordixinfra-jjb-creds
246 username: JJB_USERNAME
247 password: JJB_USERTOKEN
Fatih Degirmenci2804ff92019-01-29 10:43:13 +0100248
249# timeout wrapper to use for jobs
250- wrapper:
251 name: build-timeout
252 wrappers:
253 - timeout:
254 timeout: '{timeout}'
255 timeout-var: 'BUILD_TIMEOUT'
256 fail: true
Fatih Degirmenci243f4242019-01-31 18:48:58 +0100257
Fatih Degirmenci46f97c72019-02-07 10:58:44 +0100258# wrapper to fix jenkins build workspace permissions
259- wrapper:
260 name: fix-workspace-permissions
261 wrappers:
262 - pre-scm-buildstep:
263 failOnError: true
264 buildsteps:
265 - shell: |
266 #!/bin/bash
267 sudo chown -R $USER:$USER $WORKSPACE || exit 1
268
Fatih Degirmenci243f4242019-01-31 18:48:58 +0100269- publisher:
270 name: notify-slack
271 publishers:
272 - slack:
273 room: '{slack-channel}'
274 notify-failure: True
Fatih Degirmencifbd236f2019-02-07 10:08:35 +0100275
276# property to discard old builds
277- property:
278 name: logrotate
279 properties:
280 - build-discarder:
281 days-to-keep: 30
282 num-to-keep: 100
283 artifact-days-to-keep: 30
284 artifact-num-to-keep: 100