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