Disable Lithium jobs
[releng/builder.git] / jjb / releng-templates-java.yaml
1 - job-template:
2     # Template used for running CLM scans
3     # Arguements:
4     #   {name}         - Project Shortname
5     #   {project}      - Fully qualified project name
6     #   {mvn-settings} - Project maven settings file
7     #   {stream}
8     #   {jdk}
9     name: '{project-name}-clm-{stream}'
10     disabled: {disabled}
11     node: '{build-node}'
12
13     project-type: freestyle
14     jdk: '{jdk}'
15
16     logrotate:
17         daysToKeep: '{build-days-to-keep}'
18         numToKeep: '{build-num-to-keep}'
19
20     parameters:
21         - opendaylight-infra-parameters:
22             project: '{project}'
23             branch: '{branch}'
24             refspec: 'refs/heads/{branch}'
25             artifacts: '{archive-artifacts}'
26
27     scm:
28         - git-scm:
29             refspec: ''
30             branch: '{branch}'
31
32     wrappers:
33         - opendaylight-infra-wrappers:
34             build-timeout: '{build-timeout}'
35
36     triggers:
37         - timed: 'H H * * 6'
38
39     builders:
40         - provide-maven-settings:
41             global-settings-file: 'odl-global-settings'
42             settings-file: '{mvn-settings}'
43         - maven-target:
44             maven-version: '{mvn33}'
45             pom: 'pom.xml'
46             goals: 'clean install dependency:tree com.sonatype.clm:clm-maven-plugin:index -V -B -Pq -Djenkins -Dmaven.repo.local=/tmp/r -Dorg.ops4j.pax.url.mvn.localRepository=/tmp/r'
47             java-opts:
48               - '-Xmx4096m -XX:MaxPermSize=512m'
49             settings: '{mvn-settings}'
50             settings-type: cfp
51             global-settings: 'odl-global-settings'
52             global-settings-type: cfp
53         - shell: 'find . -regex ".*karaf/target" | xargs rm -rf'
54         - check-clm:
55             application-name: '{project-name}'
56
57     publishers:
58         - email-notification:
59             email-prefix: '[{project-name}]'
60         - archive-build:
61             maven-version: '{mvn33}'
62
63 - job-template:
64     name: '{project-name}-distribution-{stream}'
65     disabled: {disabled}
66     node: '{build-node}'
67
68     # Required variables:
69     #     stream:    release stream (eg. stable-lithium or beryllium)
70     #     branch:    git branch (eg. stable/lithium or master)
71
72     project-type: maven
73     jdk: '{jdk}'
74
75     logrotate:
76         daysToKeep: '{build-days-to-keep}'
77         numToKeep: '{build-num-to-keep}'
78         artifactDaysToKeep: '{build-artifact-days-to-keep}'
79         artifactNumToKeep: '{build-artifact-num-to-keep}'
80
81     parameters:
82         - opendaylight-infra-parameters:
83             project: 'integration/distribution'
84             branch: '{branch}'
85             refspec: 'refs/heads/{branch}'
86             artifacts: '{archive-artifacts} **/dependency_tree.txt'
87
88     scm:
89         - git-scm:
90             refspec: ''
91             branch: '{branch}'
92
93     wrappers:
94         - opendaylight-infra-wrappers:
95             build-timeout: '{build-timeout}'
96
97     triggers:
98         - reverse:
99             jobs: '{project}-merge-{stream}'
100             result: 'success'
101
102     prebuilders:
103         - provide-maven-settings:
104             global-settings-file: 'odl-global-settings'
105             settings-file: '{mvn-settings}'
106
107     maven:
108         maven-name: '{mvn33}'
109         root-pom: 'pom.xml'
110         goals: 'clean install dependency:tree -DoutputFile=dependency_tree.txt -V -B -Djenkins -Dmaven.repo.local=/tmp/r -Dorg.ops4j.pax.url.mvn.localRepository=/tmp/r'
111         maven-opts: '-Xmx1024m -XX:MaxPermSize=256m -Dmaven.compile.fork=true'
112         settings: 'integration-distribution-settings'
113         settings-type: cfp
114         global-settings: 'odl-global-settings'
115         global-settings-type: cfp
116
117     publishers:
118         - email-notification:
119             email-prefix: '[{project}]'
120         - maven-deploy:
121             id: ''
122             unique-version: true
123             deploy-unstable: false
124         - archive-build:
125             maven-version: '{mvn33}'
126
127 - job-template:
128     # Template: {name}-distribution-check-{stream}
129     # Goal: Build a patch and make sure the distribution can deploy with this change
130     # Operation: This job template builds a patch, creates a distribution containing
131     #            the patch, and triggers the distribution deploy test
132
133     name: '{project-name}-distribution-check-{stream}'
134     disabled: '{obj:disable_distribution_check}'
135     node: '{build-node}'
136
137     project-type: freestyle
138     concurrent: true
139     jdk: '{jdk}'
140
141     logrotate:
142         daysToKeep: '{build-days-to-keep}'
143         numToKeep: '{build-num-to-keep}'
144         artifactDaysToKeep: '{build-artifact-days-to-keep}'
145         artifactNumToKeep: '{build-artifact-num-to-keep}'
146
147     parameters:
148         - opendaylight-infra-parameters:
149             project: '{project}'
150             branch: '{branch}'
151             refspec: 'refs/heads/{branch}'
152             artifacts: '{archive-artifacts} **/dependency_tree.txt'
153         - integration-distribution-git-url
154
155     scm:
156         - integration-gerrit-scm:
157             basedir: '$GERRIT_PROJECT'
158             refspec: '$GERRIT_REFSPEC'
159             branch: '{branch}'
160         - integration-distribution-scm:
161             branch: '{branch}'
162
163     wrappers:
164         - opendaylight-infra-wrappers:
165             build-timeout: '{build-timeout}'
166
167     triggers:
168         - gerrit:
169             server-name: 'OpenDaylight'
170             trigger-on:
171                 - patchset-created-event:
172                     exclude-drafts: 'true'
173                     exclude-trivial-rebase: 'false'
174                     exclude-no-code-change: 'true'
175                 - draft-published-event
176                 - comment-added-contains-event:
177                     comment-contains-value: 'test-distribution'
178                 - comment-added-contains-event:
179                     comment-contains-value: 'reverify'
180                 - comment-added-contains-event:
181                     comment-contains-value: 'recheck'
182             projects:
183               - project-compare-type: 'ANT'
184                 project-pattern: '{project}'
185                 branches:
186                   - branch-compare-type: 'ANT'
187                     branch-pattern: '**/{branch}'
188             skip-vote:
189                 successful: false
190                 failed: false
191                 unstable: false
192                 notbuilt: false
193
194     builders:
195         - maven-target:
196             maven-version: '{mvn33}'
197             pom: '$GERRIT_PROJECT/pom.xml'
198             goals: 'clean install dependency:tree -DoutputFile=dependency_tree.txt -V -B -Pq -Djenkins -Dmaven.repo.local=/tmp/r -Dorg.ops4j.pax.url.mvn.localRepository=/tmp/r -Dstream={stream}'
199             java-opts:
200                 - '-Xmx4096m -XX:MaxPermSize=1024m -Dmaven.compile.fork=true'
201             settings: '{mvn-settings}'
202             settings-type: cfp
203             global-settings: 'odl-global-settings'
204             global-settings-type: cfp
205         - maven-target:
206             maven-version: '{mvn33}'
207             pom: 'distribution/pom.xml'
208             goals: 'clean install dependency:tree -DoutputFile=dependency_tree.txt -V -B -Djenkins -Dmaven.repo.local=/tmp/r -Dorg.ops4j.pax.url.mvn.localRepository=/tmp/r'
209             java-opts:
210               - '-Xmx1024m -XX:MaxPermSize=256m -Dmaven.compile.fork=true'
211             settings: '{mvn-settings}'
212             settings-type: cfp
213             global-settings: 'odl-global-settings'
214             global-settings-type: cfp
215         - integration-distribution-check
216
217     publishers:
218         - email-notification:
219             email-prefix: '[{project-name}]'
220         - postbuildscript:
221             builders:
222                 - shell: |
223                     #!/bin/bash
224                     mkdir -p $WORKSPACE/archives
225                     cp karaf*.log $WORKSPACE/archives
226             script-only-if-succeeded: False
227             script-only-if-failed: False
228             mark-unstable-if-failed: True
229         - archive-build:
230             maven-version: '{mvn33}'
231
232 - job-template:
233     name: '{project-name}-integration-{stream}'
234     disabled: {disabled}
235     node: '{build-node}'
236
237     # Job template for ODL integration verify jobs
238     #
239     # This is similar to a normal verify job, but it runs
240     # when a project that's a dependency of your project
241     # is successfully built.
242     #
243     # Required Variables:
244     #     stream:    release stream (eg. stable-lithium or beryllium)
245     #     branch:    git branch (eg. stable/lithium or master)
246
247     project-type: freestyle
248     jdk: '{jdk}'
249
250     logrotate:
251         daysToKeep: '{build-days-to-keep}'
252         numToKeep: '{build-num-to-keep}'
253         artifactDaysToKeep: '{build-artifact-days-to-keep}'
254         artifactNumToKeep: '{build-artifact-num-to-keep}'
255
256     parameters:
257         - opendaylight-infra-parameters:
258             project: '{project}'
259             branch: '{branch}'
260             refspec: 'refs/heads/{branch}'
261             artifacts: '{archive-artifacts}'
262
263     scm:
264         - git-scm:
265             refspec: ''
266             branch: '{branch}'
267
268     wrappers:
269         - opendaylight-infra-wrappers:
270             build-timeout: '{build-timeout}'
271
272     triggers:
273         - reverse:
274             jobs: '{dependencies}'
275             result: 'success'
276
277     builders:
278         - jacoco-nojava-workaround
279         - provide-maven-settings:
280             global-settings-file: 'odl-global-settings'
281             settings-file: '{mvn-settings}'
282         - maven-target:
283             maven-version: '{mvn33}'
284             goals: '{mvn-goals} -V -B -Djenkins -Dmaven.repo.local=/tmp/r -Dorg.ops4j.pax.url.mvn.localRepository=/tmp/r'
285             java-opts:
286               - '{mvn-opts}'
287             settings: '{mvn-settings}'
288             settings-type: cfp
289             global-settings: 'odl-global-settings'
290             global-settings-type: cfp
291
292     publishers:
293         - email-notification:
294             email-prefix: '{email-upstream}'
295         - findbugs
296         - jacoco-report
297         - archive-build:
298             maven-version: '{mvn33}'
299
300 - job-template:
301     name: '{project-name}-merge-{stream}'
302     disabled: {disabled}
303     node: '{build-node}'
304
305     # Job template for ODL merge jobs
306     #
307     # The purpose of this job template is to setup a ODL merge job
308     # and deploy artifacts to Nexus.
309     #
310     # Required Variables:
311     #     stream:    release stream (eg. stable-lithium or beryllium)
312     #     branch:    git branch (eg. stable/lithium or master)
313
314     project-type: maven
315     jdk: '{jdk}'
316
317     logrotate:
318         daysToKeep: '14'
319         numToKeep: '10'
320         artifactDaysToKeep: '{build-artifact-days-to-keep}'
321         artifactNumToKeep: '{build-artifact-num-to-keep}'
322
323     parameters:
324         - opendaylight-infra-parameters:
325             project: '{project}'
326             branch: '{branch}'
327             refspec: 'refs/heads/{branch}'
328             artifacts: '{archive-artifacts}'
329
330     scm:
331         - gerrit-trigger-scm:
332             refspec: ''
333             choosing-strategy: 'default'
334
335     wrappers:
336         - opendaylight-infra-wrappers:
337             build-timeout: '{build-timeout}'
338
339     triggers:
340         - timed: 'H H * * 0'
341         - gerrit-trigger-patch-merged:
342             name: '{project}'
343             branch: '{branch}'
344
345     prebuilders:
346         - jacoco-nojava-workaround
347         - provide-maven-settings:
348             global-settings-file: 'odl-global-settings'
349             settings-file: '{mvn-settings}'
350
351     maven:
352         maven-name: '{mvn33}'
353         goals: '{mvn-goals} -V -B -Djenkins -Dmerge -Dstream={stream} -Dmaven.repo.local=/tmp/r -Dorg.ops4j.pax.url.mvn.localRepository=/tmp/r'
354         maven-opts: '{mvn-opts}'
355         settings: '{mvn-settings}'
356         settings-type: cfp
357         global-settings: 'odl-global-settings'
358         global-settings-type: cfp
359         post-step-run-condition: UNSTABLE
360
361     postbuilders:
362         - conditional-step:
363             condition-kind: file-exists
364             condition-filename: deploy-site.xml
365             condition-basedir: workspace
366
367             # The strategy here is intentional to run Maven site:deploy twice
368             # once using regular pom.xml to produce a staged-site which is
369             # then used by deploy-site.xml to push to Nexus. This is a
370             # workaround to Maven Site's default linking code which creates
371             # incorrect URLs for sites due to auto-detection assuming your
372             # project is configured in a certain way which ODL is not.
373             steps:
374             - maven-target:
375                 maven-version: '{mvn33}'
376                 pom: pom.xml
377                 goals: 'site:deploy -V -B -Dstream={stream}'
378                 java-opts:
379                     - '-Xmx2g'
380                 settings: '{mvn-settings}'
381                 settings-type: cfp
382                 global-settings: 'odl-global-settings'
383                 global-settings-type: cfp
384             - maven-target:
385                 maven-version: '{mvn33}'
386                 pom: deploy-site.xml
387                 goals: 'site:deploy -V -B -Dstream={stream}'
388                 java-opts:
389                     - '-Xmx2g'
390                 settings: '{mvn-settings}'
391                 settings-type: cfp
392                 global-settings: 'odl-global-settings'
393                 global-settings-type: cfp
394
395     reporters:
396         - findbugs
397
398     publishers:
399         - email-notification:
400             email-prefix: '[{project-name}]'
401         - maven-deploy:
402             id: ''
403             unique-version: true
404             deploy-unstable: false
405         - jacoco-report
406         - archive-build:
407             maven-version: '{mvn33}'
408
409 - job-template:
410     name: '{project-name}-periodic-{stream}'
411     disabled: {disabled}
412     node: '{build-node}'
413
414     # Job template for periodic builders
415     #
416     # The purpose of this job template is to setup a periodic
417     # builder.
418     #
419     # Required Variables:
420     #     stream:    release stream (eg. stable-lithium or beryllium)
421     #     branch:    git branch (eg. stable/lithium or master)
422
423     project-type: freestyle
424     jdk: '{jdk}'
425
426     logrotate:
427         daysToKeep: '14'
428
429     parameters:
430         - opendaylight-infra-parameters:
431             project: '{project}'
432             branch: '{branch}'
433             refspec: 'refs/heads/{branch}'
434             artifacts: '{archive-artifacts}'
435
436     scm:
437         - git-scm:
438             refspec: ''
439             branch: '{branch}'
440
441     wrappers:
442         - opendaylight-infra-wrappers:
443             build-timeout: '{build-timeout}'
444
445     triggers:
446         - timed: '@daily'
447
448     builders:
449         - jacoco-nojava-workaround
450         - provide-maven-settings:
451             global-settings-file: 'odl-global-settings'
452             settings-file: '{mvn-settings}'
453         - maven-target:
454             maven-version: '{mvn33}'
455             goals: '{mvn-goals} -V -B -Djenkins -Dmaven.repo.local=/tmp/r -Dorg.ops4j.pax.url.mvn.localRepository=/tmp/r'
456             java-opts:
457               - '{mvn-opts}'
458             settings: '{mvn-settings}'
459             settings-type: cfp
460             global-settings: 'odl-global-settings'
461             global-settings-type: cfp
462
463     publishers:
464         - email-notification:
465             email-prefix: '[{project-name}]'
466         - jacoco-report
467         - findbugs
468         - archive-build:
469             maven-version: '{mvn33}'
470
471 - job-template:
472     name: '{project-name}-sonar'
473     disabled: {disabled}
474     node: '{build-node}'
475
476     project-type: maven
477     jdk: 'openjdk8'
478
479     logrotate:
480         daysToKeep: '7'
481         numToKeep: '10'
482         artifactDaysToKeep: '1'
483         artifactNumToKeep: '1'
484
485     parameters:
486         - opendaylight-infra-parameters:
487             project: '{project}'
488             branch: '{branch}'
489             refspec: 'refs/heads/{branch}'
490             artifacts: '{archive-artifacts}'
491
492     scm:
493         - git-scm:
494             refspec: ''
495             branch: 'master'
496
497     wrappers:
498         - opendaylight-infra-wrappers:
499             build-timeout: '{build-timeout}'
500
501     triggers:
502         - timed: 'H H * * 6'
503         - gerrit-trigger-patch-sonar:
504             name: '{project}'
505
506     prebuilders:
507         - jacoco-nojava-workaround
508         - provide-maven-settings:
509             global-settings-file: 'odl-global-settings'
510             settings-file: '{mvn-settings}'
511
512     maven:
513         maven-name: '{mvn33}'
514         goals: '{mvn-goals} -V -B -Djenkins -Dsonar -Dmaven.repo.local=/tmp/r -Dorg.ops4j.pax.url.mvn.localRepository=/tmp/r'
515         maven-opts: '{mvn-opts}'
516         settings: '{mvn-settings}'
517         settings-type: cfp
518         global-settings: 'odl-global-settings'
519         global-settings-type: cfp
520
521     reporters:
522         - findbugs
523
524     publishers:
525         - sonar:
526             language: 'java'
527             maven-opts: '-Xmx6144m -XX:MaxPermSize=1024m'
528         - email-notification:
529             email-prefix: '[{project-name}]'
530         - jacoco-report
531         - archive-build:
532             maven-version: '{mvn33}'
533
534 - job-template:
535     name: '{project-name}-validate-autorelease-{stream}'
536     disabled: '{obj:disable_autorelease}'
537     node: '{build-node}'
538
539     project-type: freestyle
540     concurrent: true
541     jdk: '{jdk}'
542
543     logrotate:
544         daysToKeep: '7'
545
546     parameters:
547         - opendaylight-infra-parameters:
548             project: '{project}'
549             branch: '{branch}'
550             refspec: 'refs/heads/{branch}'
551             artifacts: '{archive-artifacts}'
552         - autorelease-release-tag:
553             release-tag: 'validate'
554         - autorelease-release-branch:
555             release-branch: '{branch}'
556         - string:
557             name: CLONE_URL
558             default: 'ssh://jenkins-$SILO@git.opendaylight.org:29418/releng/autorelease'
559             description: "Autorelease clone URL"
560
561     scm:
562         - git:
563             url: '$CLONE_URL'
564             credentials-id: 'opendaylight-jenkins-ssh'
565             refspec: ''
566             branches:
567                 - 'origin/{branch}'
568             skip-tag: true
569             submodule:
570                 recursive: true
571                 timeout: 60
572
573     wrappers:
574         - opendaylight-infra-wrappers:
575             build-timeout: '{build-timeout}'
576
577     triggers:
578         - gerrit:
579             server-name: 'OpenDaylight'
580             trigger-on:
581                 - patchset-created-event:
582                     exclude-drafts: 'true'
583                     exclude-trivial-rebase: 'false'
584                     exclude-no-code-change: 'true'
585                 - draft-published-event
586                 - comment-added-contains-event:
587                     comment-contains-value: 'recheck'
588                 - comment-added-contains-event:
589                     comment-contains-value: 'reverify'
590                 - comment-added-contains-event:
591                     comment-contains-value: 'revalidate'
592             projects:
593               - project-compare-type: 'ANT'
594                 project-pattern: '{project}'
595                 branches:
596                   - branch-compare-type: 'ANT'
597                     branch-pattern: '**/{branch}'
598                 file-paths:
599                     - compare-type: ANT
600                       pattern: '**/*.xml'
601
602     builders:
603         - jacoco-nojava-workaround
604         - autorelease-checkout-gerrit-patch
605         - autorelease-generate-release-patches
606         - maven-target:
607             maven-version: '{mvn33}'
608             pom: validate-pom.xml
609             goals: 'clean install dependency:tree -V -B -T1.5C -Pq -Djenkins -Dmaven.repo.local=/tmp/r -Dorg.ops4j.pax.url.mvn.localRepository=/tmp/r'
610             java-opts:
611               - '-Xmx8g'
612             settings: 'autorelease-settings'
613             settings-type: cfp
614             global-settings: 'odl-global-settings'
615             global-settings-type: cfp
616         - maven-target:
617             maven-version: '{mvn33}'
618             pom: 'pom.xml'
619             goals: 'clean validate -V -B -Pq -Djenkins -Dmaven.repo.local=/tmp/r -Dorg.ops4j.pax.url.mvn.localRepository=/tmp/r'
620             java-opts:
621               - '-Xmx8g -XX:MaxPermSize=1024m -Dmaven.compile.fork=true'
622             settings: 'autorelease-settings'
623             settings-type: cfp
624             global-settings: 'odl-global-settings'
625             global-settings-type: cfp
626         - autorelease-sys-stats
627
628     publishers:
629         - email-notification:
630             email-prefix: '[autorelease] [{project-name}]'
631         - archive-build:
632             maven-version: '{mvn33}'
633
634 - job-template:
635     name: '{project-name}-verify-{stream}-{maven}-{jdks}'
636     disabled: {disabled}
637     node: '{build-node}'
638
639     # Job template for ODL verify jobs
640     #
641     # The purpose of this job template is to setup a ODL verify job
642     #
643     # Required Variables:
644     #     stream:    release stream (eg. stable-lithium or beryllium)
645     #     branch:    git branch (eg. stable/lithium or master)
646
647     project-type: freestyle
648     concurrent: true
649     jdk: '{jdks}'
650
651     logrotate:
652         daysToKeep: '7'
653
654     parameters:
655         - opendaylight-infra-parameters:
656             project: '{project}'
657             branch: '{branch}'
658             refspec: 'refs/heads/{branch}'
659             artifacts: '{archive-artifacts}'
660
661     scm:
662         - gerrit-trigger-scm:
663             refspec: '$GERRIT_REFSPEC'
664             choosing-strategy: 'gerrit'
665
666     wrappers:
667         - opendaylight-infra-wrappers:
668             build-timeout: '{build-timeout}'
669
670     triggers:
671         - gerrit-trigger-patch-submitted:
672             name: '{project}'
673             branch: '{branch}'
674
675     builders:
676         - jacoco-nojava-workaround
677         - provide-maven-settings:
678             global-settings-file: 'odl-global-settings'
679             settings-file: '{mvn-settings}'
680         - maven-target:
681             maven-version: '{mvn-version}'
682             goals: '{mvn-goals} -V -B -Djenkins -Dstream={stream} -Dmaven.repo.local=/tmp/r -Dorg.ops4j.pax.url.mvn.localRepository=/tmp/r'
683             java-opts:
684                 - '{mvn-opts}'
685             settings: '{mvn-settings}'
686             settings-type: cfp
687             global-settings: 'odl-global-settings'
688             global-settings-type: cfp
689
690     publishers:
691         - findbugs
692         - email-notification:
693             email-prefix: '[{project-name}]'
694         - jacoco-report
695         - archive-build:
696             maven-version: '{mvn-version}'