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