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