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