24eca1faeb4c4992d159a92cf1fb7dc5759e0e3f
[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         - findbugs
121         - email-notification:
122             email-prefix: '[armoury]'
123         - jacoco-report
124
125 - job-template:
126     name: 'armoury-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: 'armoury'
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: '{armoury-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: '-Xmx2048m -XX:MaxPermSize=256m -Dmaven.compile.fork=true'
185         settings: '{armoury-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: '{armoury-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: '{armoury-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: '[armoury]'
227         - maven-deploy:
228             id: ''
229             unique-version: true
230             deploy-unstable: false
231         - jacoco-report
232
233 - job-template:
234     name: 'armoury-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: '{armoury-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: '-Xmx2048m -XX:MaxPermSize=256m -Dmaven.compile.fork=true'
287         settings: '{armoury-settings}'
288         global-settings: '{odl-global-settings}'
289
290     reporters:
291         - findbugs
292
293     publishers:
294         - email-notification:
295             email-prefix: '[armoury]'
296         - jacoco-report
297
298 - job-template:
299     name: 'armoury-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: '{armoury-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: 'armoury-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             projects:
415               - project-compare-type: 'ANT'
416                 project-pattern: '{name}'
417                 branches:
418                   - branch-compare-type: 'ANT'
419                     branch-pattern: '**/{branch}'
420             skip-vote:
421                 successful: true
422                 failed: true
423                 unstable: true
424                 notbuilt: true
425
426     prebuilders:
427         - integration-get-bundle-url
428         - inject:
429             properties-file: 'bundle.txt'
430         - wipe-org-opendaylight-repo
431         - maven-target:
432             maven-version: '{mvn33}'
433             pom: '$GERRIT_PROJECT/pom.xml'
434             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}'
435             java-opts:
436                 - '-Xmx4096m -XX:MaxPermSize=1024m -Dmaven.compile.fork=true'
437             settings: '{armoury-settings}'
438             global-settings: '{odl-global-settings}'
439
440     maven:
441         maven-name: '{mvn33}'
442         root-pom: 'distribution/pom.xml'
443         goals: 'clean install -Djenkins -Dmaven.repo.local=/tmp/r -Dorg.ops4j.pax.url.mvn.localRepository=/tmp/r'
444         maven-opts: '-Xmx1024m -XX:MaxPermSize=256m -Dmaven.compile.fork=true'
445         settings: '{armoury-settings}'
446         global-settings: '{odl-global-settings}'
447         ignore-upstream-changes: true
448         post-step-run-condition: 'SUCCESS'
449
450     postbuilders:
451         - trigger-builds:
452             - project: 'integration-distribution-deploy-{stream}'
453               block: true
454               predefined-parameters:
455                   BUNDLEURL=$BUNDLEURL
456
457     publishers:
458         - email-notification:
459             email-prefix: '[armoury]'
460
461 - job-template:
462     name: 'armoury-integration-{stream}'
463     disabled: false
464
465     # Job template for ODL integration verify jobs
466     #
467     # This is similar to a normal verify job, but it runs
468     # when a project that's a dependency of your project
469     # is successfully built.
470     #
471     # Required Variables:
472     #     stream:    release stream (eg. stable-lithium or beryllium)
473     #     branch:    git branch (eg. stable/lithium or master)
474
475     project-type: maven
476     node: dynamic_merge
477     jdk: '{jdk}'
478
479     logrotate:
480         daysToKeep: '{build-days-to-keep}'
481         numToKeep: '{build-num-to-keep}'
482         artifactDaysToKeep: '{build-artifact-days-to-keep}'
483         artifactNumToKeep: '{build-artifact-num-to-keep}'
484
485     parameters:
486         - project-parameter:
487             project: '{project}'
488
489     scm:
490         - git-scm:
491             credentials-id: '{ssh-credentials}'
492             refspec: ''
493             branch: '{branch}'
494
495     wrappers:
496         - build-timeout
497         - ssh-agent-credentials:
498             users:
499                 - '{ssh-credentials}'
500
501     triggers:
502         - reverse:
503             jobs: 'odlparent-merge-{stream},yangtools-merge-{stream},controller-merge-{stream},mdsal-merge-{stream}'
504             result: 'success'
505
506     prebuilders:
507         - wipe-org-opendaylight-repo
508         - jacoco-nojava-workaround
509         - provide-maven-settings:
510             global-settings-file: '{odl-global-settings}'
511             settings-file: '{armoury-settings}'
512
513     maven:
514         maven-name: '{mvn33}'
515         root-pom: 'pom.xml'
516         goals: 'clean install -V -Dmaven.repo.local=/tmp/r -Dorg.ops4j.pax.url.mvn.localRepository=/tmp/r  -Djenkins'
517         maven-opts: '-Xmx2048m -XX:MaxPermSize=256m -Dmaven.compile.fork=true'
518         settings: '{armoury-settings}'
519         global-settings: '{odl-global-settings}'
520
521     reporters:
522         - findbugs
523
524     publishers:
525         - email-notification:
526             email-prefix: '[armoury] [odlparent] [yangtools] [controller] [mdsal]'
527         - jacoco-report
528
529 - job-template:
530     name: 'armoury-sonar'
531     disabled: false
532
533     project-type: maven
534     node: dynamic_verify
535     jdk: 'openjdk8'
536
537     logrotate:
538         daysToKeep: '7'
539         numToKeep: '10'
540         artifactDaysToKeep: '1'
541         artifactNumToKeep: '1'
542
543     parameters:
544         - project-parameter:
545             project: '{project}'
546
547     scm:
548         - git-scm:
549             credentials-id: '{ssh-credentials}'
550             refspec: ''
551             branch: 'master'
552
553     wrappers:
554         - build-timeout
555         - ssh-agent-credentials:
556             users:
557                 - '{ssh-credentials}'
558
559     triggers:
560         - timed: '@weekly'
561         - gerrit-trigger-patch-sonar:
562             name: 'armoury'
563
564     prebuilders:
565         - wipe-org-opendaylight-repo
566         - jacoco-nojava-workaround
567         - provide-maven-settings:
568             global-settings-file: '{odl-global-settings}'
569             settings-file: '{armoury-settings}'
570
571     maven:
572         maven-name: '{mvn33}'
573         root-pom: 'pom.xml'
574         goals: 'clean install -V -Dmaven.repo.local=/tmp/r -Dorg.ops4j.pax.url.mvn.localRepository=/tmp/r  -Djenkins -Dsonar'
575         maven-opts: '-Xmx2048m -XX:MaxPermSize=256m -Dmaven.compile.fork=true'
576         settings: '{armoury-settings}'
577         global-settings: '{odl-global-settings}'
578
579     reporters:
580         - findbugs
581
582     publishers:
583         - sonar:
584             language: 'java'
585             maven-opts: '-Xmx6144m -XX:MaxPermSize=1024m'
586         - email-notification:
587             email-prefix: '[armoury]'
588         - jacoco-report
589
590 - job-template:
591     name: 'armoury-clm-{stream}'
592     disabled: false
593
594     project-type: maven
595     node: dynamic_verify
596     jdk: '{jdk}'
597
598     logrotate:
599         daysToKeep: '{build-days-to-keep}'
600         numToKeep: '{build-num-to-keep}'
601         artifactDaysToKeep: '{build-artifact-days-to-keep}'
602         artifactNumToKeep: '{build-artifact-num-to-keep}'
603
604     parameters:
605         - project-parameter:
606             project: '{project}'
607
608     scm:
609         - git-scm:
610             credentials-id: '{ssh-credentials}'
611             refspec: ''
612             branch: '{branch}'
613
614     wrappers:
615         - build-timeout
616         - ssh-agent-credentials:
617             users:
618                 - '{ssh-credentials}'
619
620     triggers:
621         - timed: '@weekly'
622
623     prebuilders:
624         - wipe-org-opendaylight-repo
625         - provide-maven-settings:
626             global-settings-file: '{odl-global-settings}'
627             settings-file: '{armoury-settings}'
628
629     maven:
630         maven-name: '{mvn33}'
631         root-pom: 'pom.xml'
632         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'
633         maven-opts: '-Xmx4096m -XX:MaxPermSize=512m'
634         settings: '{armoury-settings}'
635         global-settings: '{odl-global-settings}'
636
637     postbuilders:
638         - shell: 'find . -regex ".*karaf/target" | xargs rm -rf'
639         - check-clm:
640             application-name: armoury
641
642     publishers:
643         - email-notification:
644             email-prefix: '[armoury]'
645
646 - job-template:
647     name: 'armoury-validate-autorelease-{stream}'
648     disabled: '{obj:disable_autorelease}'
649
650     project-type: maven
651     node: dynamic_verify
652     concurrent: true
653     jdk: '{jdk}'
654
655     logrotate:
656         daysToKeep: '{build-days-to-keep}'
657         numToKeep: '{build-num-to-keep}'
658         artifactDaysToKeep: '{build-artifact-days-to-keep}'
659         artifactNumToKeep: '{build-artifact-num-to-keep}'
660
661     parameters:
662         - project-parameter:
663             project: '{project}'
664         - gerrit-parameter:
665             branch: '{branch}'
666         - autorelease-release-tag:
667             release-tag: 'validate'
668         - autorelease-release-branch:
669             release-branch: '{branch}'
670         - autorelease-release-datestamp:
671             datestamp: true
672
673     scm:
674         - git:
675             url: 'https://git.opendaylight.org/gerrit/releng/autorelease'
676             refspec: ''
677             branches:
678                 - 'origin/{branch}'
679             skip-tag: true
680             submodule:
681                 recursive: true
682
683     wrappers:
684         - autorelease-build-timeout
685         - ssh-agent-credentials:
686             users:
687                 - '{ssh-credentials}'
688
689     triggers:
690         - gerrit:
691             server-name: 'OpenDaylight'
692             trigger-on:
693                 - patchset-created-event:
694                     exclude-drafts: 'false'
695                     exclude-trivial-rebase: 'false'
696                     exclude-no-code-change: 'false'
697                 - draft-published-event
698                 - comment-added-contains-event:
699                     comment-contains-value: 'recheck'
700                 - comment-added-contains-event:
701                     comment-contains-value: 'reverify'
702                 - comment-added-contains-event:
703                     comment-contains-value: 'revalidate'
704             projects:
705               - project-compare-type: 'ANT'
706                 project-pattern: 'armoury'
707                 branches:
708                   - branch-compare-type: 'ANT'
709                     branch-pattern: '**/{branch}'
710
711     prebuilders:
712         - wipe-org-opendaylight-repo
713         - jacoco-nojava-workaround
714         - autorelease-checkout-gerrit-patch
715         - autorelease-generate-taglist
716         - autorelease-generate-release-patches
717         - maven-target:
718             maven-version: '{mvn33}'
719             pom: validate-pom.xml
720             goals: 'clean install -T1.5C -Djenkins -DskipTests -Dcheckstyle.skip=true -Dmaven.repo.local=/tmp/r -Dorg.ops4j.pax.url.mvn.localRepository=/tmp/r'
721             java-opts:
722             - '-Xmx8g'
723             settings: '{autorelease-settings}'
724             global-settings: '{odl-global-settings}'
725
726     maven:
727         maven-name: '{mvn33}'
728         root-pom: 'pom.xml'
729         goals: 'clean validate -Djenkins -Dmaven.repo.local=/tmp/r -Dorg.ops4j.pax.url.mvn.localRepository=/tmp/r'
730         maven-opts: '-Xmx8g -XX:MaxPermSize=1024m -Dmaven.compile.fork=true'
731         settings: '{autorelease-settings}'
732         global-settings: '{odl-global-settings}'
733         automatic-archiving: false
734         post-step-run-condition: UNSTABLE
735
736     postbuilders:
737         - shell: "./scripts/list-project-dependencies.sh"
738         - autorelease-sys-stats
739
740     publishers:
741         - archive-artifacts:
742             artifacts: '*.log'
743         - email-notification:
744             email-prefix: '[autorelease] [armoury]'
745