Make jobs karaf-version specific, some duplicities
[releng/builder.git] / jjb / integration / distribution / distribution-jobs.yaml
1 ---
2 - project:
3     name: distribution-jobs
4
5 - job-template:
6     name: 'distribution-verify-{stream}'
7
8     project-type: maven
9     node: centos7-java-builder-2c-8g
10     concurrent: true
11     jdk: '{jre}'
12
13     properties:
14       - opendaylight-infra-properties:
15           build-days-to-keep: '{build-days-to-keep}'
16
17     parameters:
18       - opendaylight-infra-parameters:
19           os-cloud: '{os-cloud}'
20           project: '{project}'
21           branch: '{branch}'
22           refspec: 'refs/heads/{branch}'
23           artifacts: '{archive-artifacts} **/dependency_tree.txt **/*.hprof'
24       - integration-patch-refspec:
25           branch: '$GERRIT_REFSPEC'
26
27     scm:
28       - gerrit-trigger-scm:
29           refspec: '$PATCHREFSPEC'
30           choosing-strategy: 'gerrit'
31
32     wrappers:
33       - opendaylight-infra-wrappers:
34           build-timeout: '{build-timeout}'
35
36     triggers:
37       - gerrit-trigger-patch-submitted:
38           server: '{server-name}'
39           project: '{project}'
40           branch: '{branch}'
41           files: '**'
42
43     prebuilders:
44       - wipe-org-opendaylight-repo
45       - provide-maven-settings:
46           global-settings-file: 'odl-global-settings'
47           settings-file: 'integration-settings'
48
49     maven:
50       maven-name: 'mvn33'
51       root-pom: 'pom.xml'
52       goals: >
53           clean install dependency:tree -DoutputFile=dependency_tree.txt -V -B
54           -Dmaven.repo.local=/tmp/r -Dorg.ops4j.pax.url.mvn.localRepository=/tmp/r
55           -Djenkins -Dstream={stream}
56       maven-opts: '-Xmx1024m -XX:MaxPermSize=256m'
57       settings: 'integration-settings'
58       settings-type: cfp
59       global-settings: 'odl-global-settings'
60       global-settings-type: cfp
61       ignore-upstream-changes: true
62       post-step-run-condition: 'SUCCESS'
63
64     reporters:
65       - findbugs
66
67     publishers:
68       - jacoco-report
69       - opendaylight-infra-shiplogs:
70           maven-version: 'mvn33'
71       - email-notification:
72           email-recipients: '{email-recipients}'
73           email-prefix: '[int/dist]'
74
75 - job-template:
76     name: 'distribution-merge-{stream}'
77
78     # Need to keep jobs that deploy to Nexus at end of build as Maven
79     # projects. Maybe reconsider this once upstream moves deploy to a
80     # separate lifecycle:
81     #     https://issues.apache.org/jira/browse/MNG-5666
82
83     project-type: maven
84     node: '{build-node}'
85     jdk: '{jre}'
86
87     properties:
88       - opendaylight-infra-properties:
89           build-days-to-keep: '{build-days-to-keep}'
90
91     parameters:
92       - opendaylight-infra-parameters:
93           os-cloud: '{os-cloud}'
94           project: '{project}'
95           branch: '{branch}'
96           refspec: 'refs/heads/{branch}'
97           artifacts: '{archive-artifacts} **/dependency_tree.txt **/*.hprof **/target/surefire-reports/*-output.txt'
98       - distribution-karaf-version:
99           karaf-version: '{karaf-version}'
100
101     scm:
102       - gerrit-trigger-scm:
103           refspec: ''
104           choosing-strategy: 'default'
105
106     wrappers:
107       - opendaylight-infra-wrappers:
108           build-timeout: '{build-timeout}'
109
110     triggers:
111       - gerrit-trigger-patch-merged:
112           server-name: '{server-name}'
113           name: 'integration/distribution'
114           branch: '{branch}'
115
116     prebuilders:
117       - wipe-org-opendaylight-repo
118       - jacoco-nojava-workaround
119       - provide-maven-settings:
120           global-settings-file: 'odl-global-settings'
121           settings-file: 'integration-settings'
122       - integration-set-variables
123       - distribute-build-url:
124           path: '$KARAF_ARTIFACT/src/main/assembly'
125
126     maven:
127       maven-name: 'mvn33'
128       root-pom: 'pom.xml'
129       goals: >
130           clean install dependency:tree -DoutputFile=dependency_tree.txt -V -B
131           -Dmaven.repo.local=/tmp/r -Dorg.ops4j.pax.url.mvn.localRepository=/tmp/r
132           -Djenkins -Dmerge -Dstream={stream}
133       maven-opts: '-Xmx1024m -XX:MaxPermSize=256m'
134       settings: 'integration-settings'
135       settings-type: cfp
136       global-settings: 'odl-global-settings'
137       global-settings-type: cfp
138
139     postbuilders:
140       - conditional-step:
141           condition-kind: file-exists
142           condition-filename: deploy-site.xml
143           condition-basedir: workspace
144
145           # The strategy here is intentional to run Maven site:deploy twice
146           # once using regular pom.xml to produce a staged-site which is
147           # then used by deploy-site.xml to push to Nexus. This is a
148           # workaround to Maven Site's default linking code which creates
149           # incorrect URLs for sites due to auto-detection assuming your
150           # project is configured in a certain way which ODL is not.
151           steps:
152             - maven-target:
153                 maven-version: 'mvn33'
154                 pom: pom.xml
155                 goals: 'site:deploy -V -B -Dstream={stream}'
156                 java-opts:
157                   - '-Xmx2g'
158                 settings: 'integration-settings'
159                 settings-type: cfp
160                 global-settings: 'odl-global-settings'
161                 global-settings-type: cfp
162             - maven-target:
163                 maven-version: 'mvn33'
164                 pom: deploy-site.xml
165                 goals: 'site:deploy -V -B -Dstream={stream}'
166                 java-opts:
167                   - '-Xmx2g'
168                 settings: 'integration-settings'
169                 settings-type: cfp
170                 global-settings: 'odl-global-settings'
171                 global-settings-type: cfp
172       - integration-compare-distributions
173     # TODO: the output of the above command is not *friendly* for the reader because the most important info
174     # is listed last. This is fine/best for command line output, but for keeping in a file it would be better
175     # to put the summary at the beginning of the file. Some bash magic can be done here to make that happen.
176
177     reporters:
178       - findbugs
179
180     publishers:
181       - maven-deploy:
182           id: ''
183           unique-version: true
184           deploy-unstable: false
185       - jacoco-report
186       - opendaylight-infra-shiplogs:
187           maven-version: 'mvn33'
188       - email-notification:
189           email-recipients: '{email-recipients}'
190           email-prefix: '[int/dist]'
191
192 - job-template:
193     name: 'distribution-check-{stream}'
194     # Like a {project}-distribution-check, but one step less as there is no upstream project involved.
195     disabled: false
196
197     project-type: freestyle
198     node: '{build-node}'
199     concurrent: true
200     jdk: '{jdk}'
201
202     properties:
203       - opendaylight-infra-properties:
204           build-days-to-keep: '{build-days-to-keep}'
205
206     parameters:
207       - opendaylight-infra-parameters:
208           os-cloud: '{os-cloud}'
209           project: '{project}'
210           branch: '{branch}'
211           refspec: 'refs/heads/{branch}'
212           artifacts: '{archive-artifacts} **/dependency_tree.txt **/target/surefire-reports/*-output.txt'
213       - distribution-karaf-version:
214           karaf-version: '{karaf-version}'
215       - maven-exec:
216           maven-version: mvn33
217
218     scm:
219       - integration-gerrit-scm:
220           basedir: 'distribution'
221           refspec: '$GERRIT_REFSPEC'
222           branch: '{branch}'
223
224     wrappers:
225       - opendaylight-infra-wrappers:
226           # Distro-check jobs typically run within 10 - 30 minutes
227           # with 45 minutes being the occassional edge case.
228           # enforce a 60 minute limit to ensure stuck jobs get
229           # cleared up sooner.
230           # Double that as Karaf 3+4 may take longer.
231           build-timeout: '120'
232
233     triggers:
234       - gerrit-trigger-patch-submitted:
235           server: '{server-name}'
236           project: '{project}'
237           branch: '{branch}'
238           files: '**'
239
240     builders:
241       - distribution-check-wipe
242       - distribution-check-build-project:
243           pom: 'distribution/pom.xml'
244           mvn-opts: '{opendaylight-infra-mvn-opts}'
245       - distribution-check-verify-groupid:
246           gerrit-project: 'integration'
247       - distribution-check-delete-snapshots
248       - distribution-check-configure-remotes
249       - distribution-check-repeat-build:
250           dist-pom: 'distribution/pom.xml'
251           mvn-opts: '{opendaylight-infra-mvn-opts}'
252       - integration-upload-distribution:
253           dist-pom: distribution/pom.xml
254       - integration-distribution-check
255
256     publishers:
257       - email-notification:
258           email-recipients: '{email-recipients}'
259           email-prefix: '[{project-name}]'
260       - postbuildscript:
261           builders:
262             - shell: |
263                 #!/bin/bash
264                 mkdir -p $WORKSPACE/archives
265                 cp karaf*.log $WORKSPACE/archives
266           script-only-if-succeeded: false
267           script-only-if-failed: false
268           mark-unstable-if-failed: true
269       - opendaylight-infra-shiplogs:
270           maven-version: 'mvn33'
271
272 - job-template:
273     name: 'distribution-deploy-{stream}'
274     # Goal: Verify distribution starts with no issues when all features are loaded.
275     # Operation: This job deploys the controller installing odl-integration-all.
276     # FIXME: List required variables.
277
278     project-type: freestyle
279     node: centos7-java-builder-2c-8g
280     concurrent: false
281
282     properties:
283       - opendaylight-infra-properties:
284           build-days-to-keep: '{build-days-to-keep}'
285
286     parameters:
287       - opendaylight-infra-parameters:
288           os-cloud: '{os-cloud}'
289           project: '{project}'
290           branch: '{branch}'
291           refspec: 'refs/heads/{branch}'
292           artifacts: '{archive-artifacts} **/*.hprof'
293       - integration-distribution-branch:
294           branch: '{branch}'
295       - integration-bundle-url:
296           bundle-url: '{bundle-url}'
297       - integration-jdk-version:
298           jdkversion: '{jre}'
299       - distribution-karaf-version:
300           karaf-version: '{karaf-version}'
301
302     wrappers:
303       - opendaylight-infra-wrappers:
304           build-timeout: '{build-timeout}'
305
306     # TODO: Trigger from sanity (instead of weekly) when this job is stable for {stream}.
307
308     builders:
309       - distribution-deploy-verify
310
311     publishers:
312       - email-notification:
313           email-recipients: '{email-recipients}'
314           email-prefix: '[int/dist]'
315       - integration-csit-archive-build
316       - opendaylight-infra-shiplogs:
317           maven-version: 'mvn33'
318
319 - job-template:
320     name: 'distribution-offline-{stream}'
321     # Goal: Verify distribution can start with no internet connection.
322     # Operation: This job deploys the controller removing any external repository definition.
323     # FIXME: List required variables.
324
325     project-type: freestyle
326     node: centos7-java-builder-2c-8g
327     concurrent: false
328
329     properties:
330       - opendaylight-infra-properties:
331           build-days-to-keep: '{build-days-to-keep}'
332
333     parameters:
334       - opendaylight-infra-parameters:
335           os-cloud: '{os-cloud}'
336           project: '{project}'
337           branch: '{branch}'
338           refspec: 'refs/heads/{branch}'
339           artifacts: '{archive-artifacts} **/*.hprof'
340       - integration-distribution-branch:
341           branch: '{branch}'
342       - integration-bundle-url:
343           bundle-url: '{bundle-url}'
344       - integration-jdk-version:
345           jdkversion: '{jre}'
346       - distribution-karaf-version:
347           karaf-version: '{karaf-version}'
348
349     wrappers:
350       - opendaylight-infra-wrappers:
351           build-timeout: '{build-timeout}'
352
353     # TODO: Trigger from sanity (instead of weekly) when this job is stable for {stream}.
354
355     builders:
356       - distribution-deploy-offline
357
358     publishers:
359       - email-notification:
360           email-recipients: '{email-recipients}'
361           email-prefix: '[int/dist]'
362       - integration-csit-archive-build
363       - opendaylight-infra-shiplogs:
364           maven-version: 'mvn33'
365
366 # Delete these when Karaf 4 becomes Carbon default.
367
368 # TODO: Is there a way to de-duplicate with generic template parts?
369
370 - job-template:
371     name: 'distribution4-check-carbon'
372     disabled: false
373
374     project-type: freestyle
375     node: '{build-node}'
376     concurrent: true
377     jdk: '{jdk}'
378
379     properties:
380       - opendaylight-infra-properties:
381           build-days-to-keep: '{build-days-to-keep}'
382
383     parameters:
384       - opendaylight-infra-parameters:
385           os-cloud: '{os-cloud}'
386           project: '{project}'
387           branch: stable/carbon
388           refspec: refs/heads/stable/carbon
389           artifacts: '{archive-artifacts} **/dependency_tree.txt **/target/surefire-reports/*-output.txt'
390       - distribution-karaf-version:
391           karaf-version: karaf4
392       - maven-exec:
393           maven-version: mvn33
394
395     scm:
396       - integration-gerrit-scm:
397           basedir: distribution
398           refspec: '$GERRIT_REFSPEC'
399           branch: stable/carbon
400
401     wrappers:
402       - opendaylight-infra-wrappers:
403           # Distro-check jobs typically run within 10 - 30 minutes
404           # with 45 minutes being the occassional edge case.
405           # enforce a 60 minute limit to ensure stuck jobs get
406           # cleared up sooner.
407           # Double that as Karaf 3+4 may take longer.
408           build-timeout: '120'
409
410     triggers:
411       - gerrit-trigger-patch-submitted:
412           server: '{server-name}'
413           project: '{project}'
414           branch: 'stable/carbon'
415           files: '**'
416
417     builders:
418       - distribution-check-wipe
419       - distribution-check-build-project:
420           pom: 'distribution/pom.xml'
421           mvn-opts: '{opendaylight-infra-mvn-opts}'
422       - distribution-check-verify-groupid:
423           gerrit-project: 'integration'
424       - distribution-check-delete-snapshots
425       - distribution-check-configure-remotes
426       - distribution-check-repeat-build:
427           dist-pom: 'distribution/pom.xml'
428           mvn-opts: '{opendaylight-infra-mvn-opts}'
429       - integration-upload-distribution:
430           dist-pom: distribution/pom.xml
431       - integration-distribution-check
432
433     publishers:
434       - email-notification:
435           email-recipients: '{email-recipients}'
436           email-prefix: '[{project-name}]'
437       - postbuildscript:
438           builders:
439             - shell: |
440                 #!/bin/bash
441                 mkdir -p $WORKSPACE/archives
442                 cp karaf*.log $WORKSPACE/archives
443           script-only-if-succeeded: false
444           script-only-if-failed: false
445           mark-unstable-if-failed: true
446       - opendaylight-infra-shiplogs:
447           maven-version: 'mvn33'
448
449 - job-template:
450     name: 'distribution4-deploy-carbon'
451     disabled: false
452
453     project-type: freestyle
454     node: centos7-java-builder-2c-8g
455     concurrent: false
456
457     properties:
458       - opendaylight-infra-properties:
459           build-days-to-keep: '{build-days-to-keep}'
460
461     parameters:
462       - opendaylight-infra-parameters:
463           os-cloud: '{os-cloud}'
464           project: '{project}'
465           branch: 'stable/carbon'
466           refspec: 'refs/heads/stable/carbon'
467           artifacts: '{archive-artifacts} **/*.hprof'
468       - integration-distribution-branch:
469           branch: 'stable/carbon'
470       - integration-bundle-url:
471           bundle-url: '{bundle-url}'
472       - integration-jdk-version:
473           jdkversion: '{jre}'
474       - distribution-karaf-version:
475           karaf-version: karaf4
476
477     wrappers:
478       - opendaylight-infra-wrappers:
479           build-timeout: '{build-timeout}'
480
481     # TODO: Trigger from sanity (instead of weekly) when this job is stable for {stream}.
482
483     builders:
484       - distribution-deploy-verify
485
486     publishers:
487       - email-notification:
488           email-recipients: '{email-recipients}'
489           email-prefix: '[int/dist]'
490       - integration-csit-archive-build
491       - opendaylight-infra-shiplogs:
492           maven-version: 'mvn33'
493
494 - job-template:
495     name: 'distribution4-offline-carbon'
496     disabled: false
497
498     project-type: freestyle
499     node: centos7-java-builder-2c-8g
500     concurrent: false
501
502     properties:
503       - opendaylight-infra-properties:
504           build-days-to-keep: '{build-days-to-keep}'
505
506     parameters:
507       - opendaylight-infra-parameters:
508           os-cloud: '{os-cloud}'
509           project: '{project}'
510           branch: 'stable/carbon'
511           refspec: 'refs/heads/stable/carbon'
512           artifacts: '{archive-artifacts} **/*.hprof'
513       - integration-distribution-branch:
514           branch: 'stable/carbon'
515       - integration-bundle-url:
516           bundle-url: '{bundle-url}'
517       - integration-jdk-version:
518           jdkversion: '{jre}'
519       - distribution-karaf-version:
520           karaf-version: karaf4
521
522     wrappers:
523       - opendaylight-infra-wrappers:
524           build-timeout: '{build-timeout}'
525
526     # TODO: Trigger from sanity (instead of weekly) when this job is stable for {stream}.
527
528     builders:
529       - distribution-deploy-offline
530
531     publishers:
532       - email-notification:
533           email-recipients: '{email-recipients}'
534           email-prefix: '[int/dist]'
535       - integration-csit-archive-build
536       - opendaylight-infra-shiplogs:
537           maven-version: 'mvn33'