Update automated project templates
[releng/builder.git] / jjb / nic / nic.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: nic
8     jobs:
9         - 'nic-verify-{stream}'
10         - 'nic-merge-{stream}'
11         - 'nic-periodic-{stream}'
12         - 'nic-distribution-{stream}'
13         - 'nic-distribution-check-{stream}'
14         - 'nic-integration-{stream}'
15         - 'nic-sonar'
16         - 'nic-clm-{stream}'
17         - 'nic-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         - stable-lithium:
39             branch: 'stable/lithium'
40             jdk: openjdk7
41             jdks:
42                 - openjdk7
43             disable_autorelease: True
44             disable_distribution_check: True
45
46     project: 'nic'
47
48 # For the Job templates below replace instances of:
49 # PROJECT_SHORTNAME with your project name (eg. circuitsw)
50 # PROJECT_PATH with your project name (eg. ofextensions/circuitsw)
51 # MAVEN_GOALS with your maven goals to build
52 # MAVEN_OPTS with your maven options to build
53
54 - job-template:
55     name: 'nic-verify-{stream}'
56
57     # Job template for ODL verify jobs
58     #
59     # The purpose of this job template is to setup a ODL verify job
60     #
61     # Required Variables:
62     #     stream:    release stream (eg. stable-lithium or beryllium)
63     #     branch:    git branch (eg. stable/lithium or master)
64
65     project-type: matrix
66     node: matrix_master
67     concurrent: true
68
69     axes:
70         - axis:
71             type: slave
72             name: nodes
73             values:
74                 - dynamic_verify
75         - axis:
76             type: jdk
77             values: '{obj:jdks}'
78
79     logrotate:
80         daysToKeep: '{build-days-to-keep}'
81         numToKeep: '{build-num-to-keep}'
82         artifactDaysToKeep: '{build-artifact-days-to-keep}'
83         artifactNumToKeep: '{build-artifact-num-to-keep}'
84
85     parameters:
86         - project-parameter:
87             project: '{project}'
88         - gerrit-parameter:
89             branch: '{branch}'
90         - gerrit-refspec-parameter:
91             refspec: 'refs/heads/{branch}'
92
93     scm:
94         - gerrit-trigger-scm:
95             credentials-id: '{ssh-credentials}'
96             refspec: '$GERRIT_REFSPEC'
97             choosing-strategy: 'gerrit'
98
99     wrappers:
100         - build-timeout
101         - ssh-agent-credentials:
102             users:
103                 - '{ssh-credentials}'
104
105     triggers:
106         - gerrit-trigger-patch-submitted:
107             name: 'nic'
108             branch: '{branch}'
109
110     builders:
111         - wipe-org-opendaylight-repo
112         - jacoco-nojava-workaround
113         - provide-maven-settings:
114             global-settings-file: '{odl-global-settings}'
115             settings-file: '{nic-settings}'
116         - maven-target:
117             maven-version: '{mvn33}'
118             pom: 'pom.xml'
119             goals: 'clean install -V -Dmaven.repo.local=/tmp/r -Dorg.ops4j.pax.url.mvn.localRepository=/tmp/r  -Djenkins -Dstream={stream}'
120             java-opts:
121                 - '-Xmx1024m -XX:MaxPermSize=256m'
122             settings: '{nic-settings}'
123             global-settings: '{odl-global-settings}'
124
125     publishers:
126         - findbugs
127         - email-notification:
128             email-prefix: '[nic]'
129         - jacoco-report
130
131 - job-template:
132     name: 'nic-merge-{stream}'
133
134     # Job template for ODL merge jobs
135     #
136     # The purpose of this job template is to setup a ODL merge job
137     # and deploy artifacts to Nexus.
138     #
139     # Required Variables:
140     #     stream:    release stream (eg. stable-lithium or beryllium)
141     #     branch:    git branch (eg. stable/lithium or master)
142
143     project-type: maven
144     node: dynamic_merge
145     jdk: '{jdk}'
146
147     logrotate:
148         daysToKeep: '14'
149         numToKeep: '10'
150         artifactDaysToKeep: '{build-artifact-days-to-keep}'
151         artifactNumToKeep: '{build-artifact-num-to-keep}'
152
153     parameters:
154         - project-parameter:
155             project: '{project}'
156         - gerrit-parameter:
157             branch: '{branch}'
158         - gerrit-refspec-parameter:
159             refspec: 'refs/heads/{branch}'
160
161     scm:
162         - gerrit-trigger-scm:
163             credentials-id: '{ssh-credentials}'
164             refspec: ''
165             choosing-strategy: 'default'
166
167     wrappers:
168         - build-timeout
169         - ssh-agent-credentials:
170             users:
171                 - '{ssh-credentials}'
172
173     triggers:
174         - timed: 'H H * * 0'
175         - gerrit-trigger-patch-merged:
176             name: 'nic'
177             branch: '{branch}'
178
179     prebuilders:
180         - wipe-org-opendaylight-repo
181         - jacoco-nojava-workaround
182         - provide-maven-settings:
183             global-settings-file: '{odl-global-settings}'
184             settings-file: '{nic-settings}'
185
186     maven:
187         maven-name: '{mvn33}'
188         root-pom: 'pom.xml'
189         goals: 'clean install -V -Dmaven.repo.local=/tmp/r -Dorg.ops4j.pax.url.mvn.localRepository=/tmp/r  -Djenkins -Dmerge -Dstream={stream}'
190         maven-opts: '-Xmx1024m -XX:MaxPermSize=256m'
191         settings: '{nic-settings}'
192         global-settings: '{odl-global-settings}'
193         post-step-run-condition: UNSTABLE
194
195     postbuilders:
196         - conditional-step:
197             condition-kind: file-exists
198             condition-filename: deploy-site.xml
199             condition-basedir: workspace
200
201             # The strategy here is intentional to run Maven site:deploy twice
202             # once using regular pom.xml to produce a staged-site which is
203             # then used by deploy-site.xml to push to Nexus. This is a
204             # workaround to Maven Site's default linking code which creates
205             # incorrect URLs for sites due to auto-detection assuming your
206             # project is configured in a certain way which ODL is not.
207             steps:
208             - maven-target:
209                 maven-version: '{mvn33}'
210                 pom: pom.xml
211                 goals: 'site:deploy -Dstream={stream}'
212                 java-opts:
213                     - '-Xmx2g'
214                 settings: '{nic-settings}'
215                 global-settings: '{odl-global-settings}'
216             - maven-target:
217                 maven-version: '{mvn33}'
218                 pom: deploy-site.xml
219                 goals: 'site:deploy -Dstream={stream}'
220                 java-opts:
221                     - '-Xmx2g'
222                 settings: '{nic-settings}'
223                 global-settings: '{odl-global-settings}'
224
225     reporters:
226         - findbugs
227
228     publishers:
229         - archive-artifacts:
230             artifacts: '**/target/surefire-reports/*-output.txt, '
231         - email-notification:
232             email-prefix: '[nic]'
233         - maven-deploy:
234             id: ''
235             unique-version: true
236             deploy-unstable: false
237         - jacoco-report
238
239 - job-template:
240     name: 'nic-periodic-{stream}'
241     disabled: false
242
243     # Job template for periodic builders
244     #
245     # The purpose of this job template is to setup a periodic
246     # builder.
247     #
248     # Required Variables:
249     #     stream:    release stream (eg. stable-lithium or beryllium)
250     #     branch:    git branch (eg. stable/lithium or master)
251
252     project-type: maven
253     node: dynamic_verify
254     jdk: '{jdk}'
255
256     logrotate:
257         daysToKeep: '14'
258         numToKeep: '10'
259         artifactDaysToKeep: '{build-artifact-days-to-keep}'
260         artifactNumToKeep: '{build-artifact-num-to-keep}'
261
262     parameters:
263         - project-parameter:
264             project: '{project}'
265
266     scm:
267         - git-scm:
268             credentials-id: '{ssh-credentials}'
269             refspec: ''
270             branch: '{branch}'
271
272     wrappers:
273         - build-timeout
274         - ssh-agent-credentials:
275             users:
276                 - '{ssh-credentials}'
277
278     triggers:
279         - timed: '@daily'
280
281     prebuilders:
282         - wipe-org-opendaylight-repo
283         - jacoco-nojava-workaround
284         - provide-maven-settings:
285             global-settings-file: '{odl-global-settings}'
286             settings-file: '{nic-settings}'
287
288     maven:
289         maven-name: '{mvn33}'
290         root-pom: 'pom.xml'
291         goals: 'clean install -V -Dmaven.repo.local=/tmp/r -Dorg.ops4j.pax.url.mvn.localRepository=/tmp/r  -Djenkins'
292         maven-opts: '-Xmx1024m -XX:MaxPermSize=256m'
293         settings: '{nic-settings}'
294         global-settings: '{odl-global-settings}'
295
296     reporters:
297         - findbugs
298
299     publishers:
300         - email-notification:
301             email-prefix: '[nic]'
302         - jacoco-report
303
304 - job-template:
305     name: 'nic-distribution-{stream}'
306
307     # Required variables:
308     #     stream:    release stream (eg. stable-lithium or beryllium)
309     #     branch:    git branch (eg. stable/lithium or master)
310
311     project-type: maven
312     node: dynamic_merge
313     jdk: '{jdk}'
314
315     logrotate:
316         daysToKeep: '{build-days-to-keep}'
317         numToKeep: '{build-num-to-keep}'
318         artifactDaysToKeep: '{build-artifact-days-to-keep}'
319         artifactNumToKeep: '{build-artifact-num-to-keep}'
320
321     parameters:
322         - project-parameter:
323             project: 'integration/distribution'
324
325     scm:
326         - git-scm:
327             credentials-id: '{ssh-credentials}'
328             refspec: ''
329             branch: '{branch}'
330
331     wrappers:
332         - build-timeout
333         - ssh-agent-credentials:
334             users:
335                 - '{ssh-credentials}'
336
337     triggers:
338         - reverse:
339             jobs: '{project}-merge-{stream}'
340             result: 'success'
341
342     prebuilders:
343         - wipe-org-opendaylight-repo
344         - provide-maven-settings:
345             global-settings-file: '{odl-global-settings}'
346             settings-file: '{nic-settings}'
347
348     maven:
349         maven-name: '{mvn33}'
350         root-pom: 'pom.xml'
351         goals: 'clean install -Djenkins -Dmaven.repo.local=/tmp/r -Dorg.ops4j.pax.url.mvn.localRepository=/tmp/r'
352         maven-opts: '-Xmx1024m -XX:MaxPermSize=256m -Dmaven.compile.fork=true'
353         settings: '{integration-settings}'
354         global-settings: '{odl-global-settings}'
355
356     publishers:
357         - email-notification:
358             email-prefix: '[{project}]'
359         - maven-deploy:
360             id: ''
361             unique-version: true
362             deploy-unstable: false
363
364 # Template: integration-patch-distribution-{stream}
365 # Goal: Build a patch and make sure the distribution can deploy with this change
366 # Operation: This job template builds a patch, creates a distribution containing
367 #            the patch, and triggers the distribution deploy test
368
369 - job-template:
370     name: 'nic-distribution-check-{stream}'
371     disabled: '{obj:disable_distribution_check}'
372
373     project-type: maven
374     node: dynamic_verify
375     concurrent: true
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: '{nic-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: '{nic-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: '[nic]'
466
467 - job-template:
468     name: 'nic-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},odlparent-merge-{stream},vtn-merge-{stream},yangtools-merge-{stream},groupbasedpolicy-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: '{nic-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: '{nic-settings}'
525         global-settings: '{odl-global-settings}'
526
527     reporters:
528         - findbugs
529
530     publishers:
531         - email-notification:
532             email-prefix: '[nic] [controller] [odlparent] [vtn] [yangtools] [groupbasedpolicy]'
533         - jacoco-report
534
535 - job-template:
536     name: 'nic-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: 'nic'
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: '{nic-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: '{nic-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: '[nic]'
594         - jacoco-report
595
596 - job-template:
597     name: 'nic-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: '{nic-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: '{nic-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: nic
647
648     publishers:
649         - email-notification:
650             email-prefix: '[nic]'
651
652 - job-template:
653     name: 'nic-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: 'nic'
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] [nic]'
751