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