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