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