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