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