ef584dc92e75b09dc8cc1e2e5d4cf0bb4576f8eb
[releng/builder.git] / jjb / integration / distribution-jobs.yaml
1 ---
2 - project:
3     name: distribution-jobs
4     jobs:
5       - '{project-name}-verify-python-{stream}'
6       - 'distribution-verify-{stream}'
7       - 'distribution-merge-{stream}'
8       - 'distribution-deploy-{stream}'
9       - 'distribution-offline-{stream}'
10
11     project: integration/distribution
12     project-name: distribution
13
14     stream:
15       - carbon:
16           branch: 'master'
17           jre: 'openjdk8'
18       - boron:
19           branch: 'stable/boron'
20           jre: 'openjdk8'
21       - beryllium:
22           branch: 'stable/beryllium'
23           jre: 'openjdk7'
24
25
26 - job-template:
27     name: 'distribution-verify-{stream}'
28
29     project-type: maven
30     node: centos7-java-builder-2c-8g
31     concurrent: true
32     jdk: '{jre}'
33
34     properties:
35       - opendaylight-infra-properties:
36           build-days-to-keep: '{build-days-to-keep}'
37
38     parameters:
39       - opendaylight-infra-parameters:
40           os-cloud: '{os-cloud}'
41           project: '{project}'
42           branch: '{branch}'
43           refspec: 'refs/heads/{branch}'
44           artifacts: '{archive-artifacts} **/dependency_tree.txt **/*.hprof'
45       - integration-patch-refspec:
46           branch: '$GERRIT_REFSPEC'
47
48     scm:
49       - gerrit-trigger-scm:
50           refspec: '$PATCHREFSPEC'
51           choosing-strategy: 'gerrit'
52
53     wrappers:
54       - opendaylight-infra-wrappers:
55           build-timeout: '{build-timeout}'
56
57     triggers:
58       - gerrit-trigger-patch-submitted:
59           server: '{server-name}'
60           project: '{project}'
61           branch: '{branch}'
62           files: '**'
63
64     prebuilders:
65       - integration-get-bundle-url-root
66       - inject:
67           properties-file: 'bundle.txt'
68       - wipe-org-opendaylight-repo
69       - provide-maven-settings:
70           global-settings-file: 'odl-global-settings'
71           settings-file: 'integration-settings'
72
73     maven:
74       maven-name: 'mvn33'
75       root-pom: 'pom.xml'
76       goals: >
77           clean install dependency:tree -DoutputFile=dependency_tree.txt -V -B
78           -Dmaven.repo.local=/tmp/r -Dorg.ops4j.pax.url.mvn.localRepository=/tmp/r
79           -Djenkins -Dstream={stream}
80       maven-opts: '-Xmx1024m -XX:MaxPermSize=256m'
81       settings: 'integration-settings'
82       settings-type: cfp
83       global-settings: 'odl-global-settings'
84       global-settings-type: cfp
85       ignore-upstream-changes: true
86       post-step-run-condition: 'SUCCESS'
87
88     postbuilders:
89       - trigger-builds:
90           - project: 'distribution-deploy-{stream}'
91             block: true
92             predefined-parameters:
93               BUNDLEURL=$BUNDLEURL
94
95     reporters:
96       - findbugs
97
98     publishers:
99       - jacoco-report
100       - opendaylight-infra-shiplogs:
101           maven-version: 'mvn33'
102       - email-notification:
103           email-recipients: '{email-recipients}'
104           email-prefix: '[int/dist]'
105
106
107 - job-template:
108     name: 'distribution-merge-{stream}'
109
110     # Need to keep jobs that deploy to Nexus at end of build as Maven
111     # projects. Maybe reconsider this once upstream moves deploy to a
112     # separate lifecycle:
113     #     https://issues.apache.org/jira/browse/MNG-5666
114
115     project-type: maven
116     node: '{build-node}'
117     jdk: '{jre}'
118
119     properties:
120       - opendaylight-infra-properties:
121           build-days-to-keep: '{build-days-to-keep}'
122
123     parameters:
124       - opendaylight-infra-parameters:
125           os-cloud: '{os-cloud}'
126           project: '{project}'
127           branch: '{branch}'
128           refspec: 'refs/heads/{branch}'
129           artifacts: '{archive-artifacts} **/dependency_tree.txt **/*.hprof **/target/surefire-reports/*-output.txt'
130       - integration-bundleurl:
131           bundleurl: 'last'
132     scm:
133       - gerrit-trigger-scm:
134           refspec: ''
135           choosing-strategy: 'default'
136
137     wrappers:
138       - opendaylight-infra-wrappers:
139           build-timeout: '{build-timeout}'
140
141     triggers:
142       - gerrit-trigger-patch-merged:
143           server-name: '{server-name}'
144           name: 'integration/distribution'
145           branch: '{branch}'
146
147     prebuilders:
148       - wipe-org-opendaylight-repo
149       - jacoco-nojava-workaround
150       - integration-get-bundle-vars
151       - inject:
152           properties-file: 'bundle_vars.txt'
153       - provide-maven-settings:
154           global-settings-file: 'odl-global-settings'
155           settings-file: 'integration-settings'
156       - distribute-build-url:
157           path: 'distribution-karaf/src/main/assembly'
158
159     maven:
160       maven-name: 'mvn33'
161       root-pom: 'pom.xml'
162       goals: >
163           clean install dependency:tree -DoutputFile=dependency_tree.txt -V -B
164           -Dmaven.repo.local=/tmp/r -Dorg.ops4j.pax.url.mvn.localRepository=/tmp/r
165           -Djenkins -Dmerge -Dstream={stream}
166       maven-opts: '-Xmx1024m -XX:MaxPermSize=256m'
167       settings: 'integration-settings'
168       settings-type: cfp
169       global-settings: 'odl-global-settings'
170       global-settings-type: cfp
171
172     postbuilders:
173       - conditional-step:
174           condition-kind: file-exists
175           condition-filename: deploy-site.xml
176           condition-basedir: workspace
177
178           # The strategy here is intentional to run Maven site:deploy twice
179           # once using regular pom.xml to produce a staged-site which is
180           # then used by deploy-site.xml to push to Nexus. This is a
181           # workaround to Maven Site's default linking code which creates
182           # incorrect URLs for sites due to auto-detection assuming your
183           # project is configured in a certain way which ODL is not.
184           steps:
185             - maven-target:
186                 maven-version: 'mvn33'
187                 pom: pom.xml
188                 goals: 'site:deploy -V -B -Dstream={stream}'
189                 java-opts:
190                   - '-Xmx2g'
191                 settings: 'integration-settings'
192                 settings-type: cfp
193                 global-settings: 'odl-global-settings'
194                 global-settings-type: cfp
195             - maven-target:
196                 maven-version: 'mvn33'
197                 pom: deploy-site.xml
198                 goals: 'site:deploy -V -B -Dstream={stream}'
199                 java-opts:
200                   - '-Xmx2g'
201                 settings: 'integration-settings'
202                 settings-type: cfp
203                 global-settings: 'odl-global-settings'
204                 global-settings-type: cfp
205       - integration-compare-distributions
206     # TODO: the output of the above command is not *friendly* for the reader because the most important info
207     # is listed last. This is fine/best for command line output, but for keeping in a file it would be better
208     # to put the summary at the beginning of the file. Some bash magic can be done here to make that happen.
209
210     reporters:
211       - findbugs
212
213     publishers:
214       - maven-deploy:
215           id: ''
216           unique-version: true
217           deploy-unstable: false
218       - jacoco-report
219       - opendaylight-infra-shiplogs:
220           maven-version: 'mvn33'
221       - email-notification:
222           email-recipients: '{email-recipients}'
223           email-prefix: '[int/dist]'
224
225 # Template: distribution-deploy-{stream}
226 # Goal: Verify distribution starts with no issues when all features are loaded
227 # Operation: This job deploys the controller installing odl-integration-all
228
229 - job-template:
230     name: 'distribution-deploy-{stream}'
231
232     project-type: freestyle
233     node: centos7-java-builder-2c-8g
234     concurrent: true
235
236     properties:
237       - opendaylight-infra-properties:
238           build-days-to-keep: '{build-days-to-keep}'
239
240     parameters:
241       - opendaylight-infra-parameters:
242           os-cloud: '{os-cloud}'
243           project: '{project}'
244           branch: '{branch}'
245           refspec: 'refs/heads/{branch}'
246           artifacts: '{archive-artifacts} **/*.hprof'
247       - integration-distribution-branch:
248           branch: '{branch}'
249       - integration-bundleurl:
250           bundleurl: '{bundleurl}'
251       - integration-jdk-version:
252           jdkversion: '{jre}'
253
254     wrappers:
255       - opendaylight-infra-wrappers:
256           build-timeout: '{build-timeout}'
257
258     triggers:
259       - timed: 'H H * * *'
260
261     builders:
262       - integration-get-bundle-vars
263       - inject:
264           properties-file: 'bundle_vars.txt'
265       - integration-deploy-controller-verify
266
267     publishers:
268       - email-notification:
269           email-recipients: '{email-recipients}'
270           email-prefix: '[int/dist]'
271       - integration-csit-archive-build
272       - opendaylight-infra-shiplogs:
273           maven-version: 'mvn33'
274
275 # Template: distribution-offline-{stream}
276 # Goal: Verify distribution can start with no internet connection
277 # Operation: This job deploys the controller removing any external repository definition
278
279 - job-template:
280     name: 'distribution-offline-{stream}'
281
282     project-type: freestyle
283     node: centos7-java-builder-2c-8g
284
285     properties:
286       - opendaylight-infra-properties:
287           build-days-to-keep: '{build-days-to-keep}'
288
289     parameters:
290       - opendaylight-infra-parameters:
291           os-cloud: '{os-cloud}'
292           project: '{project}'
293           branch: '{branch}'
294           refspec: 'refs/heads/{branch}'
295           artifacts: '{archive-artifacts} **/*.hprof'
296       - integration-distribution-branch:
297           branch: '{branch}'
298       - integration-bundleurl:
299           bundleurl: '{bundleurl}'
300       - integration-jdk-version:
301           jdkversion: '{jre}'
302
303     wrappers:
304       - opendaylight-infra-wrappers:
305           build-timeout: '{build-timeout}'
306
307     triggers:
308       - timed: 'H H * * *'
309
310     builders:
311       - integration-get-bundle-vars
312       - inject:
313           properties-file: 'bundle_vars.txt'
314       - integration-deploy-controller-offline
315
316     publishers:
317       - email-notification:
318           email-recipients: '{email-recipients}'
319           email-prefix: '[int/dist]'
320       - integration-csit-archive-build
321       - opendaylight-infra-shiplogs:
322           maven-version: 'mvn33'