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