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