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     concurrent: true
375     jdk: '{jdk}'
376
377     logrotate:
378         daysToKeep: '14'
379         numToKeep: '10'
380         artifactDaysToKeep: '{build-artifact-days-to-keep}'
381         artifactNumToKeep: '{build-artifact-num-to-keep}'
382
383     parameters:
384         - gerrit-project-parameter:
385             project: '{project}'
386         - gerrit-refspec-parameter:
387             refspec: '{branch}'
388         - project-parameter:
389             project: '{project}'
390         - integration-distribution-git-url
391
392     scm:
393         - integration-gerrit-scm:
394             credentials-id: '{ssh-credentials}'
395             basedir: '$GERRIT_PROJECT'
396             refspec: '$GERRIT_REFSPEC'
397             branch: '{branch}'
398         - integration-distribution-scm:
399             credentials-id: '{ssh-credentials}'
400             branch: '{branch}'
401
402     wrappers:
403         - build-timeout
404         - ssh-agent-credentials:
405             users:
406                 - '{ssh-credentials}'
407
408     triggers:
409         - gerrit:
410             server-name: 'OpenDaylight'
411             trigger-on:
412                 - patchset-created-event:
413                     exclude-drafts: 'true'
414                     exclude-trivial-rebase: 'false'
415                     exclude-no-code-change: 'true'
416                 - draft-published-event
417                 - comment-added-contains-event:
418                     comment-contains-value: 'test-distribution'
419             projects:
420               - project-compare-type: 'ANT'
421                 project-pattern: '{name}'
422                 branches:
423                   - branch-compare-type: 'ANT'
424                     branch-pattern: '**/{branch}'
425             skip-vote:
426                 successful: true
427                 failed: true
428                 unstable: true
429                 notbuilt: true
430
431     prebuilders:
432         - integration-get-bundle-url
433         - inject:
434             properties-file: 'bundle.txt'
435         - wipe-org-opendaylight-repo
436         - maven-target:
437             maven-version: '{mvn33}'
438             pom: '$GERRIT_PROJECT/pom.xml'
439             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}'
440             java-opts:
441                 - '-Xmx4096m -XX:MaxPermSize=1024m -Dmaven.compile.fork=true'
442             settings: '{coretutorials-settings}'
443             global-settings: '{odl-global-settings}'
444
445     maven:
446         maven-name: '{mvn33}'
447         root-pom: 'distribution/pom.xml'
448         goals: 'clean install -Djenkins -Dmaven.repo.local=/tmp/r -Dorg.ops4j.pax.url.mvn.localRepository=/tmp/r'
449         maven-opts: '-Xmx1024m -XX:MaxPermSize=256m -Dmaven.compile.fork=true'
450         settings: '{coretutorials-settings}'
451         global-settings: '{odl-global-settings}'
452         ignore-upstream-changes: true
453         post-step-run-condition: 'SUCCESS'
454
455     postbuilders:
456         - trigger-builds:
457             - project: 'integration-distribution-deploy-{stream}'
458               block: true
459               predefined-parameters:
460                   BUNDLEURL=$BUNDLEURL
461
462     publishers:
463         - email-notification:
464             email-prefix: '[coretutorials]'
465
466 - job-template:
467     name: 'coretutorials-integration-{stream}'
468     disabled: false
469
470     # Job template for ODL integration verify jobs
471     #
472     # This is similar to a normal verify job, but it runs
473     # when a project that's a dependency of your project
474     # is successfully built.
475     #
476     # Required Variables:
477     #     stream:    release stream (eg. stable-lithium or beryllium)
478     #     branch:    git branch (eg. stable/lithium or master)
479
480     project-type: maven
481     node: dynamic_merge
482     jdk: '{jdk}'
483
484     logrotate:
485         daysToKeep: '{build-days-to-keep}'
486         numToKeep: '{build-num-to-keep}'
487         artifactDaysToKeep: '{build-artifact-days-to-keep}'
488         artifactNumToKeep: '{build-artifact-num-to-keep}'
489
490     parameters:
491         - project-parameter:
492             project: '{project}'
493
494     scm:
495         - git-scm:
496             credentials-id: '{ssh-credentials}'
497             refspec: ''
498             branch: '{branch}'
499
500     wrappers:
501         - build-timeout
502         - ssh-agent-credentials:
503             users:
504                 - '{ssh-credentials}'
505
506     triggers:
507         - reverse:
508             jobs: 'odlparent-merge-{stream},yangtools-merge-{stream},controller-merge-{stream}'
509             result: 'success'
510
511     prebuilders:
512         - wipe-org-opendaylight-repo
513         - jacoco-nojava-workaround
514         - provide-maven-settings:
515             global-settings-file: '{odl-global-settings}'
516             settings-file: '{coretutorials-settings}'
517
518     maven:
519         maven-name: '{mvn33}'
520         root-pom: 'pom.xml'
521         goals: 'clean install -V -Dmaven.repo.local=/tmp/r -Dorg.ops4j.pax.url.mvn.localRepository=/tmp/r  -Djenkins'
522         maven-opts: '-Xmx1024m -XX:MaxPermSize=256m'
523         settings: '{coretutorials-settings}'
524         global-settings: '{odl-global-settings}'
525
526     reporters:
527         - findbugs
528
529     publishers:
530         - email-notification:
531             email-prefix: '[coretutorials] [odlparent] [yangtools] [controller]'
532         - jacoco-report
533
534 - job-template:
535     name: 'coretutorials-sonar'
536     disabled: false
537
538     project-type: maven
539     node: dynamic_verify
540     jdk: 'openjdk8'
541
542     logrotate:
543         daysToKeep: '7'
544         numToKeep: '10'
545         artifactDaysToKeep: '1'
546         artifactNumToKeep: '1'
547
548     parameters:
549         - project-parameter:
550             project: '{project}'
551
552     scm:
553         - git-scm:
554             credentials-id: '{ssh-credentials}'
555             refspec: ''
556             branch: 'master'
557
558     wrappers:
559         - build-timeout
560         - ssh-agent-credentials:
561             users:
562                 - '{ssh-credentials}'
563
564     triggers:
565         - timed: '@weekly'
566         - gerrit-trigger-patch-sonar:
567             name: 'coretutorials'
568
569     prebuilders:
570         - wipe-org-opendaylight-repo
571         - jacoco-nojava-workaround
572         - provide-maven-settings:
573             global-settings-file: '{odl-global-settings}'
574             settings-file: '{coretutorials-settings}'
575
576     maven:
577         maven-name: '{mvn33}'
578         root-pom: 'pom.xml'
579         goals: 'clean install -V -Dmaven.repo.local=/tmp/r -Dorg.ops4j.pax.url.mvn.localRepository=/tmp/r  -Djenkins -Dsonar'
580         maven-opts: '-Xmx1024m -XX:MaxPermSize=256m'
581         settings: '{coretutorials-settings}'
582         global-settings: '{odl-global-settings}'
583
584     reporters:
585         - findbugs
586
587     publishers:
588         - sonar:
589             language: 'java'
590             maven-opts: '-Xmx6144m -XX:MaxPermSize=1024m'
591         - email-notification:
592             email-prefix: '[coretutorials]'
593         - jacoco-report
594
595 - job-template:
596     name: 'coretutorials-clm-{stream}'
597     disabled: false
598
599     project-type: maven
600     node: dynamic_verify
601     jdk: '{jdk}'
602
603     logrotate:
604         daysToKeep: '{build-days-to-keep}'
605         numToKeep: '{build-num-to-keep}'
606         artifactDaysToKeep: '{build-artifact-days-to-keep}'
607         artifactNumToKeep: '{build-artifact-num-to-keep}'
608
609     parameters:
610         - project-parameter:
611             project: '{project}'
612
613     scm:
614         - git-scm:
615             credentials-id: '{ssh-credentials}'
616             refspec: ''
617             branch: '{branch}'
618
619     wrappers:
620         - build-timeout
621         - ssh-agent-credentials:
622             users:
623                 - '{ssh-credentials}'
624
625     triggers:
626         - timed: '@weekly'
627
628     prebuilders:
629         - wipe-org-opendaylight-repo
630         - provide-maven-settings:
631             global-settings-file: '{odl-global-settings}'
632             settings-file: '{coretutorials-settings}'
633
634     maven:
635         maven-name: '{mvn33}'
636         root-pom: 'pom.xml'
637         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'
638         maven-opts: '-Xmx4096m -XX:MaxPermSize=512m'
639         settings: '{coretutorials-settings}'
640         global-settings: '{odl-global-settings}'
641
642     postbuilders:
643         - shell: 'find . -regex ".*karaf/target" | xargs rm -rf'
644         - check-clm:
645             application-name: coretutorials
646
647     publishers:
648         - email-notification:
649             email-prefix: '[coretutorials]'
650
651 - job-template:
652     name: 'coretutorials-validate-autorelease-{stream}'
653     disabled: '{obj:disable_autorelease}'
654
655     project-type: maven
656     node: dynamic_verify
657     concurrent: true
658     jdk: '{jdk}'
659
660     logrotate:
661         daysToKeep: '{build-days-to-keep}'
662         numToKeep: '{build-num-to-keep}'
663         artifactDaysToKeep: '{build-artifact-days-to-keep}'
664         artifactNumToKeep: '{build-artifact-num-to-keep}'
665
666     parameters:
667         - project-parameter:
668             project: '{project}'
669         - gerrit-parameter:
670             branch: '{branch}'
671         - autorelease-release-tag:
672             release-tag: 'validate'
673         - autorelease-release-branch:
674             release-branch: '{branch}'
675         - autorelease-release-datestamp:
676             datestamp: true
677
678     scm:
679         - git:
680             url: 'https://git.opendaylight.org/gerrit/releng/autorelease'
681             refspec: ''
682             branches:
683                 - 'origin/{branch}'
684             skip-tag: true
685             submodule:
686                 recursive: true
687
688     wrappers:
689         - autorelease-build-timeout
690         - ssh-agent-credentials:
691             users:
692                 - '{ssh-credentials}'
693
694     triggers:
695         - gerrit:
696             server-name: 'OpenDaylight'
697             trigger-on:
698                 - patchset-created-event:
699                     exclude-drafts: 'false'
700                     exclude-trivial-rebase: 'false'
701                     exclude-no-code-change: 'false'
702                 - draft-published-event
703                 - comment-added-contains-event:
704                     comment-contains-value: 'recheck'
705                 - comment-added-contains-event:
706                     comment-contains-value: 'reverify'
707                 - comment-added-contains-event:
708                     comment-contains-value: 'revalidate'
709             projects:
710               - project-compare-type: 'ANT'
711                 project-pattern: 'coretutorials'
712                 branches:
713                   - branch-compare-type: 'ANT'
714                     branch-pattern: '**/{branch}'
715
716     prebuilders:
717         - wipe-org-opendaylight-repo
718         - jacoco-nojava-workaround
719         - autorelease-checkout-gerrit-patch
720         - autorelease-generate-taglist
721         - autorelease-generate-release-patches
722         - maven-target:
723             maven-version: '{mvn33}'
724             pom: validate-pom.xml
725             goals: 'clean install -T1.5C -Djenkins -DskipTests -Dcheckstyle.skip=true -Dmaven.repo.local=/tmp/r -Dorg.ops4j.pax.url.mvn.localRepository=/tmp/r'
726             java-opts:
727             - '-Xmx8g'
728             settings: '{autorelease-settings}'
729             global-settings: '{odl-global-settings}'
730
731     maven:
732         maven-name: '{mvn33}'
733         root-pom: 'pom.xml'
734         goals: 'clean validate -Djenkins -Dmaven.repo.local=/tmp/r -Dorg.ops4j.pax.url.mvn.localRepository=/tmp/r'
735         maven-opts: '-Xmx8g -XX:MaxPermSize=1024m -Dmaven.compile.fork=true'
736         settings: '{autorelease-settings}'
737         global-settings: '{odl-global-settings}'
738         automatic-archiving: false
739         post-step-run-condition: UNSTABLE
740
741     postbuilders:
742         - shell: "./scripts/list-project-dependencies.sh"
743         - autorelease-sys-stats
744
745     publishers:
746         - archive-artifacts:
747             artifacts: '*.log'
748         - email-notification:
749             email-prefix: '[autorelease] [coretutorials]'
750