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