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