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