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