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