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