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