Fix SC2059 for ShellCheck 0.4.4, printf formatting
[releng/builder.git] / jjb / integration / distribution / distribution-templates.yaml
1 ---
2 - project:
3     name: distribution-templates
4
5 - job-template:
6     name: '{project-name}-distribution-check-{stream}'
7
8     ######################
9     # Default parameters #
10     ######################
11
12     java-version: openjdk8
13     mvn-version: mvn35
14     csit-gate-list: ''
15     block_on_csit: false
16     # Unless block_on_csit is true, the failure-threshold will be ignored. For project jobs that
17     # want to fail distribution check on csit jobs, they will only need a list of jobs to run
18     # plus the change of block_on_csit to true, and this failure-threshold: 'UNSTABLE' will take
19     # effect
20     failure-threshold: 'UNSTABLE'
21
22     #####################
23     # Job Configuration #
24     #####################
25
26     # Operation: This job template builds a patch, creates a distribution containing
27     #            the patch (making sure dependencies are specified),
28     #            and performs the distribution deploy test.
29     disabled: false
30
31     project-type: freestyle
32     node: 'centos7-builder-8c-8g'
33     concurrent: true
34     jdk: '{java-version}'
35
36     properties:
37       - opendaylight-infra-properties:
38           build-days-to-keep: '{build-days-to-keep}'
39
40     parameters:
41       - opendaylight-infra-parameters:
42           os-cloud: '{os-cloud}'
43           project: '{project}'
44           branch: '{branch}'
45           refspec: 'refs/heads/{branch}'
46           artifacts: '{archive-artifacts}'
47       - integration-distribution-stream:
48           stream: '{stream}'
49       - integration-distribution-git-url:
50           git-url: '{git-url}'
51       - distribution-karaf-version:
52           karaf-version: '{karaf-version}'
53       - maven-exec:
54           maven-version: '{mvn-version}'
55
56     scm:
57       - integration-gerrit-scm:
58           basedir: '$GERRIT_PROJECT'
59           refspec: '$GERRIT_REFSPEC'
60           branch: '{branch}'
61       - integration-distribution-scm:
62           branch: '{distribution_branch}'
63
64     wrappers:
65       - opendaylight-infra-wrappers:
66           # Distro-check jobs typically run within 10 - 30 minutes
67           # with 45 minutes being the occassional edge case.
68           # enforce a 60 minute limit to ensure stuck jobs get
69           # cleared up sooner.
70           # Double that as Karaf 3+4 may take longer.
71           build-timeout: '120'
72
73     triggers:
74       - gerrit-trigger-patch-submitted:
75           gerrit-server-name: '{gerrit-server-name}'
76           project: '{project}'
77           branch: '{branch}'
78           files: '**'
79           forbidden-files: ''
80
81     builders:
82       - distribution-check-wipe
83       - inject:
84           properties-file: 'allowed_projects.txt'
85       - distribution-check-build-project:
86           pom: '$GERRIT_PROJECT/pom.xml'
87           mvn-opts: '{opendaylight-infra-mvn-opts}'
88           mvn-version: '{mvn-version}'
89           # {opendaylight-infra-parallel-mvn-opts} is bad when there are multiple big features in SFT.
90       - distribution-check-verify-groupid:
91           gerrit-project: '$GERRIT_PROJECT'
92       - distribution-check-download-deps:
93           dist-pom: 'distribution/pom.xml'
94           mvn-opts: '{opendaylight-infra-mvn-opts}'
95           mvn-version: '{mvn-version}'
96           # {opendaylight-infra-parallel-mvn-opts} is bad when there are multiple big features in SFT.
97       - distribution-check-delete-snapshots
98       - distribution-check-configure-remotes
99       - distribution-check-repeat-project-build:
100           pom: '$GERRIT_PROJECT/pom.xml'
101           mvn-opts: '{opendaylight-infra-mvn-opts}'
102           mvn-version: '{mvn-version}'
103           # {opendaylight-infra-parallel-mvn-opts} is bad when there are multiple big features in SFT.
104       - distribution-check-repeat-distro-build:
105           dist-pom: 'distribution/pom.xml'
106           mvn-opts: '{opendaylight-infra-mvn-opts}'
107           mvn-version: '{mvn-version}'
108           # {opendaylight-infra-parallel-mvn-opts} is bad when there are multiple big features in SFT.
109       - integration-set-variables
110       - distribution-check-warn-9191
111       - distribution-check-warn-9192
112       - integration-upload-distribution:
113           dist-pom: distribution/pom.xml
114       - distribution-check-bootup
115
116       - trigger-builds:
117           - project: '{csit-gate-list}'
118             block: '{obj:block_on_csit}'
119             block-thresholds:
120               failure-threshold: '{failure-threshold}'
121             predefined-parameters: |
122               BUNDLE_URL=$BUNDLE_URL
123               KARAF_VERSION=$KARAF_VERSION
124
125     publishers:
126       - email-notification:
127           email-recipients: '{email-recipients}'
128           email-prefix: '[{project-name}]'
129       - integration-csit-archive-build
130       - lf-infra-publish
131
132 - job-template:
133     name: 'distribution-verify-{type}-{stream}'
134
135     project-type: freestyle
136     node: centos7-builder-8c-8g
137     concurrent: true
138     jdk: '{java-version}'
139
140     properties:
141       - opendaylight-infra-properties:
142           build-days-to-keep: '{build-days-to-keep}'
143
144     parameters:
145       - opendaylight-infra-parameters:
146           os-cloud: '{os-cloud}'
147           project: '{project}'
148           branch: '{branch}'
149           refspec: 'refs/heads/{branch}'
150           artifacts: '{archive-artifacts}'
151
152     scm:
153       - gerrit-trigger-scm:
154           refspec: '$GERRIT_REFSPEC'
155           choosing-strategy: 'gerrit'
156
157     wrappers:
158       - opendaylight-infra-wrappers:
159           build-timeout: '{build-timeout}'
160
161     triggers:
162       - gerrit-trigger-patch-submitted:
163           gerrit-server-name: '{gerrit-server-name}'
164           project: '{project}'
165           branch: '{branch}'
166           files: '{files}'
167           forbidden-files: '{forbidden-files}'
168
169     builders:
170       - wipe-org-opendaylight-repo
171       - provide-maven-settings:
172           global-settings-file: 'global-settings'
173           settings-file: 'integration-settings'
174       - maven-target:
175           maven-version: mvn35
176           pom: pom.xml
177           goals: |
178               clean install dependency:tree -DoutputFile=dependency_tree.txt
179               -Dstream={stream}
180               -Dsft.heap.max=4g
181               {opendaylight-infra-mvn-opts}
182               {profile}
183           # {opendaylight-infra-parallel-mvn-opts} is bad when there are multiple big features in SFT.
184           java-opts:
185             - '-Xmx1024m -XX:MaxPermSize=256m'
186           settings: integration-settings
187           settings-type: cfp
188           global-settings: global-settings
189           global-settings-type: cfp
190
191     publishers:
192       - findbugs
193       - lf-jacoco-report
194       - lf-infra-publish
195       - email-notification:
196           email-recipients: '{email-recipients}'
197           email-prefix: '[{project-name}]'
198
199 - job-template:
200     name: 'distribution-merge-{type}-{stream}'
201
202     # Need to keep jobs that deploy to Nexus at end of build as Maven
203     # projects. Maybe reconsider this once upstream moves deploy to a
204     # separate lifecycle:
205     #     https://issues.apache.org/jira/browse/MNG-5666
206
207     project-type: maven
208     node: 'centos7-builder-8c-8g'
209     jdk: '{java-version}'
210
211     properties:
212       - opendaylight-infra-properties:
213           build-days-to-keep: '{build-days-to-keep}'
214
215     parameters:
216       - opendaylight-infra-parameters:
217           os-cloud: '{os-cloud}'
218           project: '{project}'
219           branch: '{branch}'
220           refspec: 'refs/heads/{branch}'
221           artifacts: '{archive-artifacts}'
222       - distribution-karaf-version:
223           karaf-version: '{karaf-version}'
224
225     scm:
226       - gerrit-trigger-scm:
227           refspec: ''
228           choosing-strategy: 'default'
229
230     wrappers:
231       - opendaylight-infra-wrappers:
232           build-timeout: '{build-timeout}'
233
234     triggers:
235       - gerrit-trigger-patch-merged:
236           gerrit-server-name: '{gerrit-server-name}'
237           name: '{project}'
238           branch: '{branch}'
239           files: '{files}'
240           forbidden-files: '{forbidden-files}'
241       - reverse:
242           jobs: '{dependencies}'
243
244     prebuilders:
245       - wipe-org-opendaylight-repo
246       - jacoco-nojava-workaround
247       - provide-maven-settings:
248           global-settings-file: 'global-settings'
249           settings-file: 'integration-settings'
250       - integration-set-variables
251       - distribute-build-url:
252           path: '$KARAF_ARTIFACT/src/main/assembly'
253
254     maven:
255       maven-name: 'mvn35'
256       root-pom: 'pom.xml'
257       goals: >
258           clean install dependency:tree -DoutputFile=dependency_tree.txt -V -B
259           -Dmaven.repo.local=/tmp/r -Dorg.ops4j.pax.url.mvn.localRepository=/tmp/r
260           -Dsft.heap.max=4g
261           -Djenkins -Dmerge -Dstream={stream}
262           {profile}
263       maven-opts: '-Xmx1024m -XX:MaxPermSize=256m'
264       settings: integration-settings
265       settings-type: cfp
266       global-settings: global-settings
267       global-settings-type: cfp
268
269     postbuilders:
270       - integration-compare-distributions
271     # TODO: the output of the above command is not *friendly* for the reader because the most important info
272     # is listed last. This is fine/best for command line output, but for keeping in a file it would be better
273     # to put the summary at the beginning of the file. Some bash magic can be done here to make that happen.
274
275     reporters:
276       - findbugs
277
278     publishers:
279       - maven-deploy:
280           id: ''
281           unique-version: true
282           deploy-unstable: false
283       - lf-jacoco-report
284       - lf-infra-publish
285       - email-notification:
286           email-recipients: '{email-recipients}'
287           email-prefix: '[{project-name}]'
288
289 - job-template:
290     name: 'distribution-check-{type}-{stream}'
291
292     ######################
293     # Default parameters #
294     ######################
295
296     mvn-version: mvn35
297
298     #####################
299     # Job Configuration #
300     #####################
301
302     # Like a {project}-distribution-check, but few steps less as there is no upstream project involved.
303     disabled: false
304
305     project-type: freestyle
306     node: 'centos7-builder-8c-8g'
307     concurrent: true
308     jdk: '{java-version}'
309
310     properties:
311       - opendaylight-infra-properties:
312           build-days-to-keep: '{build-days-to-keep}'
313
314     parameters:
315       - opendaylight-infra-parameters:
316           os-cloud: '{os-cloud}'
317           project: '{project}'
318           branch: '{branch}'
319           refspec: 'refs/heads/{branch}'
320           artifacts: '{archive-artifacts}'
321       - integration-distribution-stream:
322           stream: '{stream}'
323       - distribution-karaf-version:
324           karaf-version: '{karaf-version}'
325       - maven-exec:
326           maven-version: mvn35
327
328     scm:
329       - integration-gerrit-scm:
330           basedir: 'distribution'
331           refspec: '$GERRIT_REFSPEC'
332           branch: '{branch}'
333
334     wrappers:
335       - opendaylight-infra-wrappers:
336           # Distro-check jobs typically run within 10 - 30 minutes
337           # with 45 minutes being the occassional edge case.
338           # enforce a 60 minute limit to ensure stuck jobs get
339           # cleared up sooner.
340           # Double that as Karaf 3+4 may take longer.
341           build-timeout: '120'
342
343     triggers:
344       - gerrit-trigger-patch-submitted:
345           gerrit-server-name: '{gerrit-server-name}'
346           project: '{project}'
347           branch: '{branch}'
348           files: '{files}'
349           forbidden-files: '{forbidden-files}'
350
351     builders:
352       - distribution-check-wipe
353       - inject:
354           properties-file: 'allowed_projects.txt'
355       - distribution-check-build-project:
356           pom: 'distribution/pom.xml'
357           mvn-opts: |
358               {opendaylight-infra-mvn-opts}
359               {profile}
360           mvn-version: '{mvn-version}'
361           # '{opendaylight-infra-parallel-mvn-opts}' is bad when there are multiple big features in SFT.
362       - distribution-check-verify-groupid:
363           gerrit-project: 'integration'
364       - distribution-check-delete-snapshots
365       - distribution-check-configure-remotes
366       - distribution-check-repeat-project-build:
367           pom: 'distribution/pom.xml'
368           mvn-opts: |
369               {opendaylight-infra-mvn-opts}
370               {profile}
371           mvn-version: '{mvn-version}'
372           # '{opendaylight-infra-parallel-mvn-opts}' is bad when there are multiple big features in SFT.
373       - integration-set-variables
374       - distribution-check-warn-9191
375       - distribution-check-warn-9192
376       - integration-upload-distribution:
377           dist-pom: '{dist-pom}'
378       - distribution-check-bootup
379
380     publishers:
381       - email-notification:
382           email-recipients: '{email-recipients}'
383           email-prefix: '[{project-name}]'
384       - integration-csit-archive-build
385       - lf-infra-publish
386
387 - job-template:
388     name: 'distribution-sanity-{stream}'
389     # Goal: Verify distribution starts with no issues when all features are loaded.
390     # Operation: This job deploys odl-integration-all + list of UM features.
391     # This job works for both managed & self-managed distro.
392
393     project-type: freestyle
394     node: centos7-builder-4c-4g
395     concurrent: false
396
397     properties:
398       - opendaylight-infra-properties:
399           build-days-to-keep: '{build-days-to-keep}'
400
401     parameters:
402       - opendaylight-infra-parameters:
403           os-cloud: '{os-cloud}'
404           project: '{project}'
405           branch: '{branch}'
406           refspec: 'refs/heads/{branch}'
407           artifacts: '{archive-artifacts}'
408       - integration-distribution-stream:
409           stream: '{stream}'
410       - integration-distribution-branch:
411           branch: '{branch}'
412       - integration-bundle-url:
413           bundle-url: '{bundle-url}'
414       - integration-repo-url:
415           repo-url: '{sm-repos}'
416       - integration-controller-features:
417           controller-features: '{sm-features}'
418       - integration-jdk-version:
419           jdkversion: '{jre}'
420       - distribution-karaf-version:
421           karaf-version: '{karaf-version}'
422
423     wrappers:
424       - opendaylight-infra-wrappers:
425           build-timeout: '{build-timeout}'
426
427     builders:
428       - integration-detect-variables
429       - distribution-check-bootup
430
431     publishers:
432       - email-notification:
433           email-recipients: '{email-recipients}'
434           email-prefix: '[{project-name}]'
435       - integration-csit-archive-build
436       - lf-infra-publish
437
438 - job-template:
439     name: 'distribution-csit-managed-{stream}'
440     # Goal: Verify distribution starts with no issues when all features are loaded.
441     # Operation: This job deploys odl-integration-all.
442     # This job works for just managed distro.
443
444     project-type: freestyle
445     node: centos7-builder-4c-4g
446     concurrent: false
447
448     properties:
449       - opendaylight-infra-properties:
450           build-days-to-keep: '{build-days-to-keep}'
451
452     parameters:
453       - opendaylight-infra-parameters:
454           os-cloud: '{os-cloud}'
455           project: '{project}'
456           branch: '{branch}'
457           refspec: 'refs/heads/{branch}'
458           artifacts: '{archive-artifacts}'
459       - integration-distribution-stream:
460           stream: '{stream}'
461       - integration-distribution-branch:
462           branch: '{branch}'
463       - integration-bundle-url:
464           bundle-url: '{bundle-url}'
465       - integration-jdk-version:
466           jdkversion: '{jre}'
467       - distribution-karaf-version:
468           karaf-version: 'karaf4'
469
470     wrappers:
471       - opendaylight-infra-wrappers:
472           build-timeout: '{build-timeout}'
473
474     builders:
475       - integration-detect-variables
476       - distribution-check-bootup
477
478     publishers:
479       - email-notification:
480           email-recipients: '{email-recipients}'
481           email-prefix: '[{project-name}]'
482       - integration-csit-archive-build
483       - lf-infra-publish
484