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