Merge "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: '{build-days-to-keep}'
138         numToKeep: '{build-num-to-keep}'
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
231     # Job template for periodic builders
232     #
233     # The purpose of this job template is to setup a periodic
234     # builder.
235     #
236     # Required Variables:
237     #     stream:    release stream (eg. stable-lithium or beryllium)
238     #     branch:    git branch (eg. stable/lithium or master)
239
240     project-type: maven
241     node: dynamic_verify
242     jdk: '{jdk}'
243
244     logrotate:
245         daysToKeep: '{build-days-to-keep}'
246         numToKeep: '{build-num-to-keep}'
247         artifactDaysToKeep: '{build-artifact-days-to-keep}'
248         artifactNumToKeep: '{build-artifact-num-to-keep}'
249
250     parameters:
251         - project-parameter:
252             project: '{project}'
253
254     scm:
255         - git-scm:
256             credentials-id: '{ssh-credentials}'
257             refspec: ''
258             branch: '{branch}'
259
260     wrappers:
261         - build-timeout
262         - ssh-agent-credentials:
263             users:
264                 - '{ssh-credentials}'
265
266     triggers:
267         - timed: '@daily'
268
269     prebuilders:
270         - wipe-org-opendaylight-repo
271         - jacoco-nojava-workaround
272         - provide-maven-settings:
273             global-settings-file: '{odl-global-settings}'
274             settings-file: '{discovery-settings}'
275
276     maven:
277         maven-name: '{mvn33}'
278         root-pom: 'pom.xml'
279         goals: 'clean install -V -Dmaven.repo.local=/tmp/r -Dorg.ops4j.pax.url.mvn.localRepository=/tmp/r  -Djenkins'
280         maven-opts: '-Xmx1024m -XX:MaxPermSize=256m'
281         settings: '{discovery-settings}'
282         global-settings: '{odl-global-settings}'
283
284     reporters:
285         - findbugs
286
287     publishers:
288         - email-notification:
289             email-prefix: '[discovery]'
290         - jacoco-report
291
292 - job-template:
293     name: 'discovery-distribution-{stream}'
294
295     # Required variables:
296     #     stream:    release stream (eg. stable-lithium or beryllium)
297     #     branch:    git branch (eg. stable/lithium or master)
298
299     project-type: maven
300     node: dynamic_merge
301     jdk: '{jdk}'
302
303     logrotate:
304         daysToKeep: '{build-days-to-keep}'
305         numToKeep: '{build-num-to-keep}'
306         artifactDaysToKeep: '{build-artifact-days-to-keep}'
307         artifactNumToKeep: '{build-artifact-num-to-keep}'
308
309     parameters:
310         - project-parameter:
311             project: 'integration/distribution'
312
313     scm:
314         - git-scm:
315             credentials-id: '{ssh-credentials}'
316             refspec: ''
317             branch: '{branch}'
318
319     wrappers:
320         - build-timeout
321         - ssh-agent-credentials:
322             users:
323                 - '{ssh-credentials}'
324
325     triggers:
326         - reverse:
327             jobs: '{project}-merge-{stream}'
328             result: 'success'
329
330     prebuilders:
331         - wipe-org-opendaylight-repo
332         - provide-maven-settings:
333             global-settings-file: '{odl-global-settings}'
334             settings-file: '{discovery-settings}'
335
336     maven:
337         maven-name: '{mvn33}'
338         root-pom: 'pom.xml'
339         goals: 'clean install -Djenkins -Dmaven.repo.local=/tmp/r -Dorg.ops4j.pax.url.mvn.localRepository=/tmp/r'
340         maven-opts: '-Xmx1024m -XX:MaxPermSize=256m -Dmaven.compile.fork=true'
341         settings: '{integration-settings}'
342         global-settings: '{odl-global-settings}'
343
344     publishers:
345         - email-notification:
346             email-prefix: '[{project}]'
347         - maven-deploy:
348             id: ''
349             unique-version: true
350             deploy-unstable: false
351
352 - job-template:
353     name: 'discovery-integration-{stream}'
354     # Temporarily disable this job until Rackspace networking issues are
355     # resolved.
356     #disabled: DISABLED
357     disabled: true
358
359     # Job template for ODL integration verify jobs
360     #
361     # This is similar to a normal verify job, but it runs
362     # when a project that's a dependency of your project
363     # is successfully built.
364     #
365     # Required Variables:
366     #     stream:    release stream (eg. stable-lithium or beryllium)
367     #     branch:    git branch (eg. stable/lithium or master)
368
369     project-type: maven
370     node: dynamic_merge
371     jdk: '{jdk}'
372
373     logrotate:
374         daysToKeep: '{build-days-to-keep}'
375         numToKeep: '{build-num-to-keep}'
376         artifactDaysToKeep: '{build-artifact-days-to-keep}'
377         artifactNumToKeep: '{build-artifact-num-to-keep}'
378
379     parameters:
380         - project-parameter:
381             project: '{project}'
382
383     scm:
384         - git-scm:
385             credentials-id: '{ssh-credentials}'
386             refspec: ''
387             branch: '{branch}'
388
389     wrappers:
390         - build-timeout
391         - ssh-agent-credentials:
392             users:
393                 - '{ssh-credentials}'
394
395     triggers:
396         - reverse:
397             jobs: 'odlparent-merge-{stream}'
398             result: 'success'
399
400     prebuilders:
401         - wipe-org-opendaylight-repo
402         - jacoco-nojava-workaround
403         - provide-maven-settings:
404             global-settings-file: '{odl-global-settings}'
405             settings-file: '{discovery-settings}'
406
407     maven:
408         maven-name: '{mvn33}'
409         root-pom: 'pom.xml'
410         goals: 'clean install -V -Dmaven.repo.local=/tmp/r -Dorg.ops4j.pax.url.mvn.localRepository=/tmp/r  -Djenkins'
411         maven-opts: '-Xmx1024m -XX:MaxPermSize=256m'
412         settings: '{discovery-settings}'
413         global-settings: '{odl-global-settings}'
414
415     reporters:
416         - findbugs
417
418     publishers:
419         - email-notification:
420             email-prefix: '[discovery] [odlparent]'
421         - jacoco-report
422
423 - job-template:
424     name: 'discovery-sonar'
425
426     project-type: maven
427     node: dynamic_verify
428     jdk: 'openjdk7'
429
430     logrotate:
431         daysToKeep: '7'
432         numToKeep: '10'
433         artifactDaysToKeep: '1'
434         artifactNumToKeep: '1'
435
436     parameters:
437         - project-parameter:
438             project: '{project}'
439
440     scm:
441         - git-scm:
442             credentials-id: '{ssh-credentials}'
443             refspec: ''
444             branch: 'master'
445
446     wrappers:
447         - build-timeout
448         - ssh-agent-credentials:
449             users:
450                 - '{ssh-credentials}'
451
452     triggers:
453         - timed: '@weekly'
454         - gerrit-trigger-patch-sonar:
455             name: 'discovery'
456
457     prebuilders:
458         - wipe-org-opendaylight-repo
459         - jacoco-nojava-workaround
460         - provide-maven-settings:
461             global-settings-file: '{odl-global-settings}'
462             settings-file: '{discovery-settings}'
463
464     maven:
465         maven-name: '{mvn33}'
466         root-pom: 'pom.xml'
467         goals: 'clean install -V -Dmaven.repo.local=/tmp/r -Dorg.ops4j.pax.url.mvn.localRepository=/tmp/r  -Djenkins -Dsonar'
468         maven-opts: '-Xmx1024m -XX:MaxPermSize=256m'
469         settings: '{discovery-settings}'
470         global-settings: '{odl-global-settings}'
471
472     reporters:
473         - findbugs
474
475     publishers:
476         - sonar:
477             language: 'java'
478             maven-opts: '-Xmx6144m -XX:MaxPermSize=1024m'
479         - email-notification:
480             email-prefix: '[discovery]'
481         - jacoco-report
482
483 - job-template:
484     name: 'discovery-clm-{stream}'
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