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