removing netconf connector from netconf scale suite for carbon
[releng/builder.git] / jjb / releng-templates-java.yaml
1 - job-template:
2     # Template used for running CLM scans
3     # Arguements:
4     #   {name}         - Project Shortname
5     #   {project}      - Fully qualified project name
6     #   {mvn-settings} - Project maven settings file
7     #   {stream}
8     #   {jdk}
9     name: '{project-name}-clm-{stream}'
10
11     project-type: freestyle
12     node: '{build-node}'
13     jdk: '{jdk}'
14
15     logrotate:
16         daysToKeep: '{build-days-to-keep}'
17         numToKeep: '{build-num-to-keep}'
18
19     parameters:
20         - opendaylight-infra-parameters:
21             project: '{project}'
22             branch: '{branch}'
23             refspec: 'refs/heads/{branch}'
24             artifacts: '{archive-artifacts}'
25
26     scm:
27         - git-scm:
28             refspec: ''
29             branch: '{branch}'
30
31     wrappers:
32         - opendaylight-infra-wrappers:
33             build-timeout: '{build-timeout}'
34
35     triggers:
36         - timed: 'H H * * 6'
37
38     builders:
39         - provide-maven-settings:
40             global-settings-file: 'odl-global-settings'
41             settings-file: '{mvn-settings}'
42         - maven-target:
43             maven-version: 'mvn33'
44             pom: 'pom.xml'
45             goals: 'clean install dependency:tree com.sonatype.clm:clm-maven-plugin:index -V -B -Pq -Djenkins -Dmaven.repo.local=/tmp/r -Dorg.ops4j.pax.url.mvn.localRepository=/tmp/r'
46             java-opts:
47               - '-Xmx4096m -XX:MaxPermSize=512m'
48             settings: '{mvn-settings}'
49             settings-type: cfp
50             global-settings: 'odl-global-settings'
51             global-settings-type: cfp
52         - shell: 'find . -regex ".*karaf/target" | xargs rm -rf'
53         - check-clm:
54             application-name: '{project-name}'
55
56     publishers:
57         - email-notification:
58             email-recipients: '{email-recipients}'
59             email-prefix: '[{project-name}]'
60         - opendaylight-infra-shiplogs:
61             maven-version: 'mvn33'
62
63 - job-template:
64     name: '{project-name}-distribution-{stream}'
65
66     # Required variables:
67     #     stream:    release stream (eg. boron or carbon)
68     #     branch:    git branch (eg. stable/boron or master)
69
70     # Need to keep jobs that deploy to Nexus at end of build as Maven
71     # projects. Maybe reconsider this once upstream moves deploy to a
72     # separate lifecycle:
73     #     https://issues.apache.org/jira/browse/MNG-5666
74     project-type: maven
75     node: '{build-node}'
76     jdk: '{jdk}'
77
78     logrotate:
79         daysToKeep: '{build-days-to-keep}'
80         numToKeep: '{build-num-to-keep}'
81         artifactDaysToKeep: '{build-artifact-days-to-keep}'
82         artifactNumToKeep: '{build-artifact-num-to-keep}'
83
84     parameters:
85         - opendaylight-infra-parameters:
86             project: 'integration/distribution'
87             branch: '{branch}'
88             refspec: 'refs/heads/{branch}'
89             artifacts: '{archive-artifacts} **/dependency_tree.txt **/target/surefire-reports/*-output.txt'
90
91     scm:
92         - git-scm:
93             refspec: ''
94             branch: '{branch}'
95
96     wrappers:
97         - opendaylight-infra-wrappers:
98             build-timeout: '{build-timeout}'
99
100     triggers:
101         - reverse:
102             jobs: '{project}-merge-{stream}'
103             result: 'success'
104
105     prebuilders:
106         - provide-maven-settings:
107             global-settings-file: 'odl-global-settings'
108             settings-file: '{mvn-settings}'
109
110     maven:
111         maven-name: 'mvn33'
112         root-pom: 'pom.xml'
113         goals: 'clean install dependency:tree -DoutputFile=dependency_tree.txt -V -B -Djenkins -Dmaven.repo.local=/tmp/r -Dorg.ops4j.pax.url.mvn.localRepository=/tmp/r'
114         maven-opts: '-Xmx1024m -XX:MaxPermSize=256m -Dmaven.compile.fork=true'
115         settings: 'integration-distribution-settings'
116         settings-type: cfp
117         global-settings: 'odl-global-settings'
118         global-settings-type: cfp
119
120     publishers:
121         - email-notification:
122             email-recipients: '{email-recipients}'
123             email-prefix: '[{project}]'
124         - maven-deploy:
125             id: ''
126             unique-version: true
127             deploy-unstable: false
128         - opendaylight-infra-shiplogs:
129             maven-version: 'mvn33'
130
131 - job-template:
132     # Template: {name}-distribution-check-{stream}
133     # Goal: Build a patch and make sure the distribution can deploy with this change
134     # Operation: This job template builds a patch, creates a distribution containing
135     #            the patch, and triggers the distribution deploy test
136
137     name: '{project-name}-distribution-check-{stream}'
138     disabled: false
139
140     project-type: freestyle
141     node: '{build-node}'
142     concurrent: true
143     jdk: '{jdk}'
144
145     logrotate:
146         daysToKeep: '{build-days-to-keep}'
147         numToKeep: '{build-num-to-keep}'
148         artifactDaysToKeep: '{build-artifact-days-to-keep}'
149         artifactNumToKeep: '{build-artifact-num-to-keep}'
150
151     parameters:
152         - opendaylight-infra-parameters:
153             project: '{project}'
154             branch: '{branch}'
155             refspec: 'refs/heads/{branch}'
156             artifacts: '{archive-artifacts} **/dependency_tree.txt **/target/surefire-reports/*-output.txt'
157         - integration-distribution-git-url:
158             git-url: '{git-url}'
159
160     scm:
161         - integration-gerrit-scm:
162             basedir: '$GERRIT_PROJECT'
163             refspec: '$GERRIT_REFSPEC'
164             branch: '{branch}'
165         - integration-distribution-scm:
166             branch: '{branch}'
167
168     wrappers:
169         - opendaylight-infra-wrappers:
170             # Distro-check jobs typically run within 10 - 30 minutes
171             # with 45 minutes being the occassional edge case.
172             # enforce a 60 minute limit to ensure stuck jobs get
173             # cleared up sooner.
174             build-timeout: '60'
175
176     triggers:
177         - gerrit-trigger-patch-submitted:
178             server: '{server-name}'
179             project: '{project}'
180             branch: '{branch}'
181             files: '**'
182
183     builders:
184         - maven-target:
185             maven-version: 'mvn33'
186             pom: '$GERRIT_PROJECT/pom.xml'
187             goals: 'clean install dependency:tree -DoutputFile=dependency_tree.txt -V -B -Pq -Djenkins -Dmaven.repo.local=/tmp/r -Dorg.ops4j.pax.url.mvn.localRepository=/tmp/r -Dstream={stream}'
188             java-opts:
189                 - '-Xmx4096m -XX:MaxPermSize=1024m -Dmaven.compile.fork=true'
190             settings: '{mvn-settings}'
191             settings-type: cfp
192             global-settings: 'odl-global-settings'
193             global-settings-type: cfp
194         - maven-target:
195             maven-version: 'mvn33'
196             pom: 'distribution/pom.xml'
197             goals: 'clean install dependency:tree -DoutputFile=dependency_tree.txt -V -B -Djenkins -Dmaven.repo.local=/tmp/r -Dorg.ops4j.pax.url.mvn.localRepository=/tmp/r'
198             java-opts:
199               - '-Xmx1024m -XX:MaxPermSize=256m -Dmaven.compile.fork=true'
200             settings: '{mvn-settings}'
201             settings-type: cfp
202             global-settings: 'odl-global-settings'
203             global-settings-type: cfp
204         - integration-distribution-check
205
206     publishers:
207         - email-notification:
208             email-recipients: '{email-recipients}'
209             email-prefix: '[{project-name}]'
210         - postbuildscript:
211             builders:
212                 - shell: |
213                     #!/bin/bash
214                     mkdir -p $WORKSPACE/archives
215                     cp karaf*.log $WORKSPACE/archives
216             script-only-if-succeeded: False
217             script-only-if-failed: False
218             mark-unstable-if-failed: True
219         - archive:
220             artifacts: '*.zip'
221         - opendaylight-infra-shiplogs:
222             maven-version: 'mvn33'
223
224 - job-template:
225     name: '{project-name}-integration-{stream}'
226
227     # Job template for ODL integration verify jobs
228     #
229     # This is similar to a normal verify job, but it runs
230     # when a project that's a dependency of your project
231     # is successfully built.
232     #
233     # Required Variables:
234     #     stream:    release stream (eg. boron or carbon)
235     #     branch:    git branch (eg. stable/boron or master)
236
237     project-type: freestyle
238     node: '{build-node}'
239     jdk: '{jdk}'
240
241     logrotate:
242         daysToKeep: '{build-days-to-keep}'
243         numToKeep: '{build-num-to-keep}'
244         artifactDaysToKeep: '{build-artifact-days-to-keep}'
245         artifactNumToKeep: '{build-artifact-num-to-keep}'
246
247     parameters:
248         - opendaylight-infra-parameters:
249             project: '{project}'
250             branch: '{branch}'
251             refspec: 'refs/heads/{branch}'
252             artifacts: '{archive-artifacts}'
253
254     scm:
255         - git-scm:
256             refspec: ''
257             branch: '{branch}'
258
259     wrappers:
260         - opendaylight-infra-wrappers:
261             build-timeout: '{build-timeout}'
262
263     triggers:
264         - reverse:
265             jobs: '{dependencies}'
266             result: 'success'
267
268     builders:
269         - jacoco-nojava-workaround
270         - provide-maven-settings:
271             global-settings-file: 'odl-global-settings'
272             settings-file: '{mvn-settings}'
273         - maven-target:
274             maven-version: 'mvn33'
275             goals: '{mvn-goals} -V -B -Djenkins -Dmaven.repo.local=/tmp/r -Dorg.ops4j.pax.url.mvn.localRepository=/tmp/r'
276             java-opts:
277               - '{mvn-opts}'
278             settings: '{mvn-settings}'
279             settings-type: cfp
280             global-settings: 'odl-global-settings'
281             global-settings-type: cfp
282
283     publishers:
284         - email-notification:
285             email-recipients: '{email-recipients}'
286             email-prefix: '{email-upstream}'
287         - findbugs
288         - jacoco-report
289         - opendaylight-infra-shiplogs:
290             maven-version: 'mvn33'
291
292 - job-template:
293     name: '{project-name}-merge-{stream}'
294
295     # Job template for ODL merge jobs
296     #
297     # The purpose of this job template is to setup a ODL merge job
298     # and deploy artifacts to Nexus.
299     #
300     # Required Variables:
301     #     stream:    release stream (eg. boron or carbon)
302     #     branch:    git branch (eg. stable/boron or master)
303
304     # Need to keep jobs that deploy to Nexus at end of build as Maven
305     # projects. Maybe reconsider this once upstream moves deploy to a
306     # separate lifecycle:
307     #     https://issues.apache.org/jira/browse/MNG-5666
308     project-type: maven
309     node: '{build-node}'
310     jdk: '{jdk}'
311
312     logrotate:
313         daysToKeep: '14'
314         numToKeep: '10'
315         artifactDaysToKeep: '{build-artifact-days-to-keep}'
316         artifactNumToKeep: '{build-artifact-num-to-keep}'
317
318     parameters:
319         - opendaylight-infra-parameters:
320             project: '{project}'
321             branch: '{branch}'
322             refspec: 'refs/heads/{branch}'
323             artifacts: '{archive-artifacts}'
324
325     scm:
326         - gerrit-trigger-scm:
327             refspec: ''
328             choosing-strategy: 'default'
329
330     wrappers:
331         - opendaylight-infra-wrappers:
332             build-timeout: '{build-timeout}'
333
334     triggers:
335         - timed: 'H H * * 0'
336         - gerrit-trigger-patch-merged:
337             server-name: '{server-name}'
338             name: '{project}'
339             branch: '{branch}'
340
341     prebuilders:
342         - jacoco-nojava-workaround
343         - provide-maven-settings:
344             global-settings-file: 'odl-global-settings'
345             settings-file: '{mvn-settings}'
346
347     maven:
348         maven-name: 'mvn33'
349         goals: '{mvn-goals} -V -B -Djenkins -Dmerge -Dstream={stream} -Dmaven.repo.local=/tmp/r -Dorg.ops4j.pax.url.mvn.localRepository=/tmp/r'
350         maven-opts: '{mvn-opts}'
351         settings: '{mvn-settings}'
352         settings-type: cfp
353         global-settings: 'odl-global-settings'
354         global-settings-type: cfp
355         post-step-run-condition: UNSTABLE
356
357     postbuilders:
358         - conditional-step:
359             condition-kind: file-exists
360             condition-filename: deploy-site.xml
361             condition-basedir: workspace
362
363             # The strategy here is intentional to run Maven site:deploy twice
364             # once using regular pom.xml to produce a staged-site which is
365             # then used by deploy-site.xml to push to Nexus. This is a
366             # workaround to Maven Site's default linking code which creates
367             # incorrect URLs for sites due to auto-detection assuming your
368             # project is configured in a certain way which ODL is not.
369             steps:
370             - maven-target:
371                 maven-version: 'mvn33'
372                 pom: pom.xml
373                 goals: 'site:deploy -V -B -Dstream={stream}'
374                 java-opts:
375                     - '-Xmx2g'
376                 settings: '{mvn-settings}'
377                 settings-type: cfp
378                 global-settings: 'odl-global-settings'
379                 global-settings-type: cfp
380             - maven-target:
381                 maven-version: 'mvn33'
382                 pom: deploy-site.xml
383                 goals: 'site:deploy -V -B -Dstream={stream}'
384                 java-opts:
385                     - '-Xmx2g'
386                 settings: '{mvn-settings}'
387                 settings-type: cfp
388                 global-settings: 'odl-global-settings'
389                 global-settings-type: cfp
390
391     reporters:
392         - findbugs
393
394     publishers:
395         - email-notification:
396             email-recipients: '{email-recipients}'
397             email-prefix: '[{project-name}]'
398         - maven-deploy:
399             id: ''
400             unique-version: true
401             deploy-unstable: false
402         - jacoco-report
403         - opendaylight-infra-shiplogs:
404             maven-version: 'mvn33'
405
406 - job-template:
407     name: '{project-name}-periodic-{stream}'
408
409     # Job template for periodic builders
410     #
411     # The purpose of this job template is to setup a periodic
412     # builder.
413     #
414     # Required Variables:
415     #     stream:    release stream (eg. boron or carbon)
416     #     branch:    git branch (eg. stable/boron or master)
417
418     project-type: freestyle
419     node: '{build-node}'
420     jdk: '{jdk}'
421
422     logrotate:
423         daysToKeep: '14'
424
425     parameters:
426         - opendaylight-infra-parameters:
427             project: '{project}'
428             branch: '{branch}'
429             refspec: 'refs/heads/{branch}'
430             artifacts: '{archive-artifacts}'
431
432     scm:
433         - git-scm:
434             refspec: ''
435             branch: '{branch}'
436
437     wrappers:
438         - opendaylight-infra-wrappers:
439             build-timeout: '{build-timeout}'
440
441     triggers:
442         - timed: '@daily'
443
444     builders:
445         - jacoco-nojava-workaround
446         - provide-maven-settings:
447             global-settings-file: 'odl-global-settings'
448             settings-file: '{mvn-settings}'
449         - maven-target:
450             maven-version: 'mvn33'
451             goals: '{mvn-goals} -V -B -Djenkins -Dmaven.repo.local=/tmp/r -Dorg.ops4j.pax.url.mvn.localRepository=/tmp/r'
452             java-opts:
453               - '{mvn-opts}'
454             settings: '{mvn-settings}'
455             settings-type: cfp
456             global-settings: 'odl-global-settings'
457             global-settings-type: cfp
458
459     publishers:
460         - email-notification:
461             email-recipients: '{email-recipients}'
462             email-prefix: '[{project-name}]'
463         - jacoco-report
464         - findbugs
465         - opendaylight-infra-shiplogs:
466             maven-version: 'mvn33'
467
468 - job-template:
469     name: '{project-name}-sonar'
470     disabled: false
471
472     project-type: freestyle
473     node: '{build-node}'
474     jdk: 'openjdk8'
475
476     logrotate:
477         daysToKeep: '7'
478         numToKeep: '10'
479         artifactDaysToKeep: '1'
480         artifactNumToKeep: '1'
481
482     parameters:
483         - opendaylight-infra-parameters:
484             project: '{project}'
485             branch: '{branch}'
486             refspec: 'refs/heads/{branch}'
487             artifacts: '{archive-artifacts}'
488
489     scm:
490         - git-scm:
491             refspec: ''
492             branch: 'master'
493
494     wrappers:
495         - opendaylight-infra-wrappers:
496             build-timeout: '{build-timeout}'
497
498     triggers:
499         - timed: 'H H * * 6'
500         - gerrit-trigger-patch-sonar:
501             server-name: '{server-name}'
502             name: '{project}'
503             # FIXME: Make sure this does not alter Gerrit votes, then update docs.
504
505     builders:
506         - jacoco-nojava-workaround
507         - provide-maven-settings:
508             global-settings-file: 'odl-global-settings'
509             settings-file: '{mvn-settings}'
510         - maven-target:
511             maven-version: 'mvn33'
512             goals: '{mvn-goals} -V -B -Djenkins -Dsonar -Dmaven.repo.local=/tmp/r -Dorg.ops4j.pax.url.mvn.localRepository=/tmp/r'
513             maven-opts:
514               - '{mvn-opts}'
515             settings: '{mvn-settings}'
516             settings-type: cfp
517             global-settings: 'odl-global-settings'
518             global-settings-type: cfp
519         - maven-target:
520             maven-version: 'mvn33'
521             # We should switch to the recommended configuration of sonar once
522             # JJB adds support for configurating the Sonar wrapper:
523             #    http://docs.sonarqube.org/display/SCAN/Analyzing+with+SonarQube+Scanner+for+Jenkins
524             goals: 'sonar:sonar -V -B -Djenkins -Dsonar -Dsonar.host.url=https://sonar.opendaylight.org -Dmaven.repo.local=/tmp/r -Dorg.ops4j.pax.url.mvn.localRepository=/tmp/r'
525             maven-opts:
526               - '{mvn-opts}'
527             settings: '{mvn-settings}'
528             settings-type: cfp
529             global-settings: 'odl-global-settings'
530             global-settings-type: cfp
531
532     publishers:
533         - email-notification:
534             email-recipients: '{email-recipients}'
535             email-prefix: '[{project-name}]'
536         - jacoco-report
537         - findbugs
538         - opendaylight-infra-shiplogs:
539             maven-version: 'mvn33'
540
541 - job-template:
542     name: '{project-name}-validate-autorelease-{stream}'
543     disabled: false
544
545     project-type: freestyle
546     node: '{build-node}'
547     concurrent: true
548     jdk: '{jdk}'
549
550     logrotate:
551         daysToKeep: '7'
552
553     parameters:
554         - opendaylight-infra-parameters:
555             project: '{project}'
556             branch: '{branch}'
557             refspec: 'refs/heads/{branch}'
558             artifacts: '{archive-artifacts}'
559         - autorelease-release-tag:
560             release-tag: 'validate'
561         - autorelease-release-branch:
562             release-branch: '{branch}'
563         - string:
564             name: CLONE_URL
565             default: '{git-url}/releng/autorelease'
566             description: "Autorelease clone URL"
567
568     scm:
569         - git:
570             url: '$CLONE_URL'
571             credentials-id: 'opendaylight-jenkins-ssh'
572             refspec: ''
573             branches:
574                 - 'origin/{branch}'
575             skip-tag: true
576             submodule:
577                 recursive: true
578                 timeout: 60
579
580     wrappers:
581         - opendaylight-infra-wrappers:
582             build-timeout: '{build-timeout}'
583
584     triggers:
585         - gerrit-trigger-patch-submitted:
586             server: '{server-name}'
587             project: '{project}'
588             branch: '{branch}'
589             files: '**/*.xml'
590
591     builders:
592         - jacoco-nojava-workaround
593         - autorelease-checkout-gerrit-patch
594         - autorelease-generate-release-patches
595         - maven-target:
596             maven-version: 'mvn33'
597             pom: validate-pom.xml
598             goals: 'clean install dependency:tree -V -B -T1.5C -Pq -Djenkins -Dmaven.repo.local=/tmp/r -Dorg.ops4j.pax.url.mvn.localRepository=/tmp/r'
599             java-opts:
600               - '-Xmx8g'
601             settings: 'autorelease-settings'
602             settings-type: cfp
603             global-settings: 'odl-global-settings'
604             global-settings-type: cfp
605         - maven-target:
606             maven-version: 'mvn33'
607             pom: 'pom.xml'
608             goals: 'clean validate -V -B -Pq -Djenkins -Dmaven.repo.local=/tmp/r -Dorg.ops4j.pax.url.mvn.localRepository=/tmp/r'
609             java-opts:
610               - '-Xmx8g -XX:MaxPermSize=1024m -Dmaven.compile.fork=true'
611             settings: 'autorelease-settings'
612             settings-type: cfp
613             global-settings: 'odl-global-settings'
614             global-settings-type: cfp
615         - autorelease-sys-stats
616
617     publishers:
618         - email-notification:
619             email-recipients: '{email-recipients}'
620             email-prefix: '[autorelease] [{project-name}]'
621         - opendaylight-infra-shiplogs:
622             maven-version: 'mvn33'
623
624 - job-template:
625     name: '{project-name}-verify-{stream}-{maven}-{jdks}'
626
627     # Job template for ODL verify jobs
628     #
629     # The purpose of this job template is to setup a ODL verify job
630     #
631     # Required Variables:
632     #     stream:    release stream (eg. boron or carbon)
633     #     branch:    git branch (eg. stable/boron or master)
634
635     project-type: freestyle
636     node: '{build-node}'
637     concurrent: true
638     jdk: '{jdks}'
639
640     logrotate:
641         daysToKeep: '7'
642
643     parameters:
644         - opendaylight-infra-parameters:
645             project: '{project}'
646             branch: '{branch}'
647             refspec: 'refs/heads/{branch}'
648             artifacts: '{archive-artifacts}'
649
650     scm:
651         - gerrit-trigger-scm:
652             refspec: '$GERRIT_REFSPEC'
653             choosing-strategy: 'gerrit'
654
655     wrappers:
656         - opendaylight-infra-wrappers:
657             build-timeout: '{build-timeout}'
658
659     triggers:
660         - gerrit-trigger-patch-submitted:
661             server: '{server-name}'
662             project: '{project}'
663             branch: '{branch}'
664             files: '**'
665
666     builders:
667         - jacoco-nojava-workaround
668         - provide-maven-settings:
669             global-settings-file: 'odl-global-settings'
670             settings-file: '{mvn-settings}'
671         - maven-target:
672             maven-version: '{mvn-version}'
673             goals: '{mvn-goals} -V -B -Djenkins -Dstream={stream} -Dmaven.repo.local=/tmp/r -Dorg.ops4j.pax.url.mvn.localRepository=/tmp/r'
674             java-opts:
675                 - '{mvn-opts}'
676             settings: '{mvn-settings}'
677             settings-type: cfp
678             global-settings: 'odl-global-settings'
679             global-settings-type: cfp
680
681     publishers:
682         - findbugs
683         - email-notification:
684             email-recipients: '{email-recipients}'
685             email-prefix: '[{project-name}]'
686         - jacoco-report
687         - opendaylight-infra-shiplogs:
688             maven-version: '{mvn-version}'