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