Merge "Update JJB version 2.0.5"
[releng/builder.git] / jjb / releng-templates-java.yaml
1 ---
2 - job-group:
3     name: odl-maven-jobs
4
5     jobs:
6       - gerrit-maven-clm
7
8       # TODO: Figure out what's wrong with the gerrit-maven-merge job.
9       # - gerrit-maven-merge:
10       #     post_build_trigger:
11       #       - project:
12       #           - 'distribution-merge-{stream}'
13       #         condition: SUCCESS
14       #         trigger-with-no-params: true
15       - '{project-name}-merge-{stream}':
16           build-timeout: 180
17           mvn-goals: clean install -V -Dmaven.compile.fork=true -Dintegrationtests -Dvtn.build.jobs=2
18
19       - gerrit-maven-release
20       - gerrit-maven-verify
21       - gerrit-maven-verify-dependencies:
22           build-timeout: 180
23
24 - job-template:
25     name: '{project-name}-integration-{stream}'
26
27     ######################
28     # Default parameters #
29     ######################
30
31     archive-artifacts: >
32       **/*.log
33       **/hs_err_*.log
34       **/target/**/feature.xml
35       **/target/failsafe-reports/failsafe-summary.xml
36       **/target/surefire-reports/*-output.txt
37     mvn-goals: clean install
38
39     #####################
40     # Job Configuration #
41     #####################
42
43     project-type: freestyle
44     node: '{build-node}'
45     jdk: '{java-version}'
46
47     properties:
48       - opendaylight-infra-properties:
49           build-days-to-keep: '{build-days-to-keep}'
50
51     parameters:
52       - opendaylight-infra-parameters:
53           os-cloud: '{os-cloud}'
54           project: '{project}'
55           branch: '{branch}'
56           refspec: 'refs/heads/{branch}'
57           artifacts: '{archive-artifacts}'
58
59     scm:
60       - git-scm:
61           refspec: ''
62           branch: '{branch}'
63
64     wrappers:
65       - opendaylight-infra-wrappers:
66           build-timeout: '{build-timeout}'
67
68     triggers:
69       - reverse:
70           jobs: '{dependencies}'
71           result: 'success'
72
73     builders:
74       - jacoco-nojava-workaround
75       - provide-maven-settings:
76           global-settings-file: 'global-settings'
77           settings-file: '{mvn-settings}'
78       - maven-target:
79           maven-version: 'mvn35'
80           goals: |
81               {mvn-goals}
82               {opendaylight-infra-mvn-opts}
83           java-opts:
84             - '{mvn-opts}'
85           settings: '{mvn-settings}'
86           settings-type: cfp
87           global-settings: 'global-settings'
88           global-settings-type: cfp
89
90     publishers:
91       - email-notification:
92           email-recipients: '{email-recipients}'
93           email-prefix: '{email-upstream}'
94       - findbugs
95       - lf-jacoco-report
96       - lf-infra-publish
97
98 - job-template:
99     name: '{project-name}-merge-{stream}'
100
101     ######################
102     # Default parameters #
103     ######################
104
105     archive-artifacts: >
106       **/*.log
107       **/hs_err_*.log
108       **/target/**/feature.xml
109       **/target/failsafe-reports/failsafe-summary.xml
110       **/target/surefire-reports/*-output.txt
111     cron: 'H H * * 0'
112     mvn-opts: ''
113     mvn-version: mvn35
114     java-version: openjdk8
115
116     #####################
117     # Job Configuration #
118     #####################
119
120     # Need to keep jobs that deploy to Nexus at end of build as Maven
121     # projects. Maybe reconsider this once upstream moves deploy to a
122     # separate lifecycle:
123     #     https://issues.apache.org/jira/browse/MNG-5666
124     project-type: maven
125     node: '{build-node}'
126     jdk: '{java-version}'
127
128     properties:
129       - opendaylight-infra-properties:
130           build-days-to-keep: 14
131
132     parameters:
133       - opendaylight-infra-parameters:
134           os-cloud: '{os-cloud}'
135           project: '{project}'
136           branch: '{branch}'
137           refspec: 'refs/heads/{branch}'
138           artifacts: '{archive-artifacts}'
139       - string:
140           name: STREAM
141           default: '{stream}'
142           description: "String representing release name"
143
144     scm:
145       - gerrit-trigger-scm:
146           refspec: ''
147           choosing-strategy: 'default'
148
149     wrappers:
150       - opendaylight-infra-wrappers:
151           build-timeout: '{build-timeout}'
152
153     triggers:
154       - timed: '{obj:cron}'
155       - gerrit-trigger-patch-merged:
156           gerrit-server-name: '{gerrit-server-name}'
157           name: '{project}'
158           branch: '{branch}'
159
160     prebuilders:
161       - jacoco-nojava-workaround
162       - provide-maven-settings:
163           global-settings-file: 'global-settings'
164           settings-file: '{mvn-settings}'
165       - lf-maven-install:
166           mvn-version: '{mvn-version}'
167
168     # TODO: Do we want to apply sophisticated checks as in *-distribution-check-*?
169     maven:
170       maven-name: '{mvn-version}'
171       goals: >
172           {mvn-goals}
173           -Dmerge
174           -Dstream={stream}
175           {opendaylight-infra-mvn-opts}
176       maven-opts: '{mvn-opts}'
177       settings: '{mvn-settings}'
178       settings-type: cfp
179       global-settings: 'global-settings'
180       global-settings-type: cfp
181       post-step-run-condition: UNSTABLE
182
183     reporters:
184       - findbugs
185
186     publishers:
187       - email-notification:
188           email-recipients: '{email-recipients}'
189           email-prefix: '[{project-name}]'
190       - maven-deploy:
191           id: ''
192           unique-version: true
193           deploy-unstable: false
194       - lf-jacoco-report
195       - lf-infra-publish
196       - trigger:
197           project: 'distribution-merge-{stream}'
198           threshold: SUCCESS