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