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