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