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