425d1b18c05e8633aecaa4cd859cf4d3280dc77f
[releng/builder.git] / jjb / centinel / centinel.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: centinel
8     jobs:
9         - 'centinel-verify-{stream}'
10         - 'centinel-merge-{stream}'
11         - 'centinel-periodic-{stream}'
12         - 'centinel-distribution-{stream}'
13         - 'centinel-distribution-check-{stream}'
14         - 'centinel-integration-{stream}'
15         - 'centinel-sonar'
16         - 'centinel-clm-{stream}'
17         - 'centinel-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: 'centinel'
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: 'centinel-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: 'centinel'
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: '{centinel-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: '{centinel-settings}'
116             global-settings: '{odl-global-settings}'
117
118     publishers:
119         - findbugs
120         - email-notification:
121             email-prefix: '[centinel]'
122         - jacoco-report
123
124 - job-template:
125     name: 'centinel-merge-{stream}'
126
127     # Job template for ODL merge jobs
128     #
129     # The purpose of this job template is to setup a ODL merge job
130     # and deploy artifacts to Nexus.
131     #
132     # Required Variables:
133     #     stream:    release stream (eg. stable-lithium or beryllium)
134     #     branch:    git branch (eg. stable/lithium or master)
135
136     project-type: maven
137     node: dynamic_merge
138     jdk: '{jdk}'
139
140     logrotate:
141         daysToKeep: '14'
142         numToKeep: '10'
143         artifactDaysToKeep: '{build-artifact-days-to-keep}'
144         artifactNumToKeep: '{build-artifact-num-to-keep}'
145
146     parameters:
147         - project-parameter:
148             project: '{project}'
149         - gerrit-parameter:
150             branch: '{branch}'
151         - gerrit-refspec-parameter:
152             refspec: 'refs/heads/{branch}'
153
154     scm:
155         - gerrit-trigger-scm:
156             credentials-id: '{ssh-credentials}'
157             refspec: ''
158             choosing-strategy: 'default'
159
160     wrappers:
161         - build-timeout
162         - ssh-agent-credentials:
163             users:
164                 - '{ssh-credentials}'
165
166     triggers:
167         - timed: 'H H * * 0'
168         - gerrit-trigger-patch-merged:
169             name: 'centinel'
170             branch: '{branch}'
171
172     prebuilders:
173         - wipe-org-opendaylight-repo
174         - jacoco-nojava-workaround
175         - provide-maven-settings:
176             global-settings-file: '{odl-global-settings}'
177             settings-file: '{centinel-settings}'
178
179     maven:
180         maven-name: '{mvn33}'
181         root-pom: 'pom.xml'
182         goals: 'clean install -V -Dmaven.repo.local=/tmp/r -Dorg.ops4j.pax.url.mvn.localRepository=/tmp/r  -Djenkins -Dmerge -Dstream={stream}'
183         maven-opts: '-Xmx1024m -XX:MaxPermSize=256m'
184         settings: '{centinel-settings}'
185         global-settings: '{odl-global-settings}'
186         post-step-run-condition: UNSTABLE
187
188     postbuilders:
189         - conditional-step:
190             condition-kind: file-exists
191             condition-filename: deploy-site.xml
192             condition-basedir: workspace
193
194             # The strategy here is intentional to run Maven site:deploy twice
195             # once using regular pom.xml to produce a staged-site which is
196             # then used by deploy-site.xml to push to Nexus. This is a
197             # workaround to Maven Site's default linking code which creates
198             # incorrect URLs for sites due to auto-detection assuming your
199             # project is configured in a certain way which ODL is not.
200             steps:
201             - maven-target:
202                 maven-version: '{mvn33}'
203                 pom: pom.xml
204                 goals: 'site:deploy -Dstream={stream}'
205                 java-opts:
206                     - '-Xmx2g'
207                 settings: '{centinel-settings}'
208                 global-settings: '{odl-global-settings}'
209             - maven-target:
210                 maven-version: '{mvn33}'
211                 pom: deploy-site.xml
212                 goals: 'site:deploy -Dstream={stream}'
213                 java-opts:
214                     - '-Xmx2g'
215                 settings: '{centinel-settings}'
216                 global-settings: '{odl-global-settings}'
217
218     reporters:
219         - findbugs
220
221     publishers:
222         - archive-artifacts:
223             artifacts: '**/target/surefire-reports/*-output.txt, '
224         - email-notification:
225             email-prefix: '[centinel]'
226         - maven-deploy:
227             id: ''
228             unique-version: true
229             deploy-unstable: false
230         - jacoco-report
231
232 - job-template:
233     name: 'centinel-periodic-{stream}'
234     disabled: false
235
236     # Job template for periodic builders
237     #
238     # The purpose of this job template is to setup a periodic
239     # builder.
240     #
241     # Required Variables:
242     #     stream:    release stream (eg. stable-lithium or beryllium)
243     #     branch:    git branch (eg. stable/lithium or master)
244
245     project-type: maven
246     node: dynamic_verify
247     jdk: '{jdk}'
248
249     logrotate:
250         daysToKeep: '14'
251         numToKeep: '10'
252         artifactDaysToKeep: '{build-artifact-days-to-keep}'
253         artifactNumToKeep: '{build-artifact-num-to-keep}'
254
255     parameters:
256         - project-parameter:
257             project: '{project}'
258
259     scm:
260         - git-scm:
261             credentials-id: '{ssh-credentials}'
262             refspec: ''
263             branch: '{branch}'
264
265     wrappers:
266         - build-timeout
267         - ssh-agent-credentials:
268             users:
269                 - '{ssh-credentials}'
270
271     triggers:
272         - timed: '@daily'
273
274     prebuilders:
275         - wipe-org-opendaylight-repo
276         - jacoco-nojava-workaround
277         - provide-maven-settings:
278             global-settings-file: '{odl-global-settings}'
279             settings-file: '{centinel-settings}'
280
281     maven:
282         maven-name: '{mvn33}'
283         root-pom: 'pom.xml'
284         goals: 'clean install -V -Dmaven.repo.local=/tmp/r -Dorg.ops4j.pax.url.mvn.localRepository=/tmp/r  -Djenkins'
285         maven-opts: '-Xmx1024m -XX:MaxPermSize=256m'
286         settings: '{centinel-settings}'
287         global-settings: '{odl-global-settings}'
288
289     reporters:
290         - findbugs
291
292     publishers:
293         - email-notification:
294             email-prefix: '[centinel]'
295         - jacoco-report
296
297 - job-template:
298     name: 'centinel-distribution-{stream}'
299
300     # Required variables:
301     #     stream:    release stream (eg. stable-lithium or beryllium)
302     #     branch:    git branch (eg. stable/lithium or master)
303
304     project-type: maven
305     node: dynamic_merge
306     jdk: '{jdk}'
307
308     logrotate:
309         daysToKeep: '{build-days-to-keep}'
310         numToKeep: '{build-num-to-keep}'
311         artifactDaysToKeep: '{build-artifact-days-to-keep}'
312         artifactNumToKeep: '{build-artifact-num-to-keep}'
313
314     parameters:
315         - project-parameter:
316             project: 'integration/distribution'
317
318     scm:
319         - git-scm:
320             credentials-id: '{ssh-credentials}'
321             refspec: ''
322             branch: '{branch}'
323
324     wrappers:
325         - build-timeout
326         - ssh-agent-credentials:
327             users:
328                 - '{ssh-credentials}'
329
330     triggers:
331         - reverse:
332             jobs: '{project}-merge-{stream}'
333             result: 'success'
334
335     prebuilders:
336         - wipe-org-opendaylight-repo
337         - provide-maven-settings:
338             global-settings-file: '{odl-global-settings}'
339             settings-file: '{centinel-settings}'
340
341     maven:
342         maven-name: '{mvn33}'
343         root-pom: 'pom.xml'
344         goals: 'clean install -Djenkins -Dmaven.repo.local=/tmp/r -Dorg.ops4j.pax.url.mvn.localRepository=/tmp/r'
345         maven-opts: '-Xmx1024m -XX:MaxPermSize=256m -Dmaven.compile.fork=true'
346         settings: '{integration-settings}'
347         global-settings: '{odl-global-settings}'
348
349     publishers:
350         - email-notification:
351             email-prefix: '[{project}]'
352         - maven-deploy:
353             id: ''
354             unique-version: true
355             deploy-unstable: false
356
357 # Template: integration-patch-distribution-{stream}
358 # Goal: Build a patch and make sure the distribution can deploy with this change
359 # Operation: This job template builds a patch, creates a distribution containing
360 #            the patch, and triggers the distribution deploy test
361
362 - job-template:
363     name: 'centinel-distribution-check-{stream}'
364     disabled: '{obj:disable_distribution_check}'
365
366     project-type: maven
367     node: dynamic_verify
368     concurrent: true
369     jdk: '{jdk}'
370
371     logrotate:
372         daysToKeep: '14'
373         numToKeep: '10'
374         artifactDaysToKeep: '{build-artifact-days-to-keep}'
375         artifactNumToKeep: '{build-artifact-num-to-keep}'
376
377     parameters:
378         - gerrit-project-parameter:
379             project: '{project}'
380         - gerrit-refspec-parameter:
381             refspec: '{branch}'
382         - project-parameter:
383             project: '{project}'
384         - integration-distribution-git-url
385
386     scm:
387         - integration-gerrit-scm:
388             credentials-id: '{ssh-credentials}'
389             basedir: '$GERRIT_PROJECT'
390             refspec: '$GERRIT_REFSPEC'
391             branch: '{branch}'
392         - integration-distribution-scm:
393             credentials-id: '{ssh-credentials}'
394             branch: '{branch}'
395
396     wrappers:
397         - build-timeout
398         - ssh-agent-credentials:
399             users:
400                 - '{ssh-credentials}'
401
402     triggers:
403         - gerrit:
404             server-name: 'OpenDaylight'
405             trigger-on:
406                 - patchset-created-event:
407                     exclude-drafts: 'true'
408                     exclude-trivial-rebase: 'false'
409                     exclude-no-code-change: 'true'
410                 - draft-published-event
411                 - comment-added-contains-event:
412                     comment-contains-value: 'test-distribution'
413             projects:
414               - project-compare-type: 'ANT'
415                 project-pattern: '{name}'
416                 branches:
417                   - branch-compare-type: 'ANT'
418                     branch-pattern: '**/{branch}'
419             skip-vote:
420                 successful: true
421                 failed: true
422                 unstable: true
423                 notbuilt: true
424
425     prebuilders:
426         - integration-get-bundle-url
427         - inject:
428             properties-file: 'bundle.txt'
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: '{centinel-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: '{centinel-settings}'
445         global-settings: '{odl-global-settings}'
446         ignore-upstream-changes: true
447         post-step-run-condition: 'SUCCESS'
448
449     postbuilders:
450         - trigger-builds:
451             - project: 'integration-distribution-deploy-{stream}'
452               block: true
453               predefined-parameters:
454                   BUNDLEURL=$BUNDLEURL
455
456     publishers:
457         - email-notification:
458             email-prefix: '[centinel]'
459
460 - job-template:
461     name: 'centinel-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},controller-merge-{stream},yangtools-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: '{centinel-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: '-Xmx1024m -XX:MaxPermSize=256m'
517         settings: '{centinel-settings}'
518         global-settings: '{odl-global-settings}'
519
520     reporters:
521         - findbugs
522
523     publishers:
524         - email-notification:
525             email-prefix: '[centinel] [odlparent] [controller] [yangtools]'
526         - jacoco-report
527
528 - job-template:
529     name: 'centinel-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: 'centinel'
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: '{centinel-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: '-Xmx1024m -XX:MaxPermSize=256m'
575         settings: '{centinel-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: '[centinel]'
587         - jacoco-report
588
589 - job-template:
590     name: 'centinel-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: '{centinel-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: '{centinel-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: centinel
640
641     publishers:
642         - email-notification:
643             email-prefix: '[centinel]'
644
645 - job-template:
646     name: 'centinel-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: 'centinel'
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] [centinel]'
744