Add step in all projects merge job to trigger distribution merge
[releng/builder.git] / jjb / integration / integration-distribution-jobs.yaml
1
2 - project:
3     name: integration-distribution
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: integration-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: 'integration-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
126     scm:
127         - gerrit-trigger-scm:
128             refspec: ''
129             choosing-strategy: 'default'
130
131     wrappers:
132         - opendaylight-infra-wrappers:
133             build-timeout: '{build-timeout}'
134
135     triggers:
136         - gerrit-trigger-patch-merged:
137             server-name: '{server-name}'
138             name: 'integration/distribution'
139             branch: '{branch}'
140
141     prebuilders:
142         - wipe-org-opendaylight-repo
143         - jacoco-nojava-workaround
144         - provide-maven-settings:
145             global-settings-file: 'odl-global-settings'
146             settings-file: 'integration-settings'
147         - distribute-build-url:
148             path: 'distribution-karaf/src/main/assembly'
149
150     maven:
151         maven-name: 'mvn33'
152         root-pom: 'pom.xml'
153         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}'
154         maven-opts: '-Xmx1024m -XX:MaxPermSize=256m'
155         settings: 'integration-settings'
156         settings-type: cfp
157         global-settings: 'odl-global-settings'
158         global-settings-type: cfp
159
160     postbuilders:
161         - conditional-step:
162             condition-kind: file-exists
163             condition-filename: deploy-site.xml
164             condition-basedir: workspace
165
166             # The strategy here is intentional to run Maven site:deploy twice
167             # once using regular pom.xml to produce a staged-site which is
168             # then used by deploy-site.xml to push to Nexus. This is a
169             # workaround to Maven Site's default linking code which creates
170             # incorrect URLs for sites due to auto-detection assuming your
171             # project is configured in a certain way which ODL is not.
172             steps:
173             - maven-target:
174                 maven-version: 'mvn33'
175                 pom: pom.xml
176                 goals: 'site:deploy -V -B -Dstream={stream}'
177                 java-opts:
178                     - '-Xmx2g'
179                 settings: 'integration-settings'
180                 settings-type: cfp
181                 global-settings: 'odl-global-settings'
182                 global-settings-type: cfp
183             - maven-target:
184                 maven-version: 'mvn33'
185                 pom: deploy-site.xml
186                 goals: 'site:deploy -V -B -Dstream={stream}'
187                 java-opts:
188                     - '-Xmx2g'
189                 settings: 'integration-settings'
190                 settings-type: cfp
191                 global-settings: 'odl-global-settings'
192                 global-settings-type: cfp
193
194     reporters:
195         - findbugs
196
197     publishers:
198         - maven-deploy:
199             id: ''
200             unique-version: true
201             deploy-unstable: false
202         - jacoco-report
203         - opendaylight-infra-shiplogs:
204             maven-version: 'mvn33'
205         - email-notification:
206             email-recipients: '{email-recipients}'
207             email-prefix: '[int/dist]'
208
209 # Template: integration-distribution-deploy-{stream}
210 # Goal: Verify distribution starts with no issues when all features are loaded
211 # Operation: This job deploys the controller installing odl-integration-all
212
213 - job-template:
214     name: 'distribution-deploy-{stream}'
215
216     project-type: freestyle
217     node: centos7-java-builder-2c-8g
218     concurrent: true
219
220     properties:
221         - opendaylight-infra-properties:
222             build-days-to-keep: '{build-days-to-keep}'
223
224     parameters:
225         - opendaylight-infra-parameters:
226             project: '{project}'
227             branch: '{branch}'
228             refspec: 'refs/heads/{branch}'
229             artifacts: '{archive-artifacts} **/*.hprof'
230         - integration-branch:
231             branch: '{branch}'
232         - integration-bundleurl:
233             bundleurl: '{bundleurl}'
234         - integration-jdk-version:
235             jdkversion: '{jre}'
236
237     wrappers:
238         - opendaylight-infra-wrappers:
239             build-timeout: '{build-timeout}'
240
241     triggers:
242         - timed: 'H H * * *'
243
244     builders:
245         - integration-get-bundle-vars
246         - inject:
247             properties-file: 'bundle_vars.txt'
248         - integration-deploy-controller-verify
249
250     publishers:
251         - email-notification:
252             email-recipients: '{email-recipients}'
253             email-prefix: '[int/dist]'
254         - integration-csit-archive-build
255         - opendaylight-infra-shiplogs:
256             maven-version: 'mvn33'
257
258 # Template: integration-distribution-offline-{stream}
259 # Goal: Verify distribution can start with no internet connection
260 # Operation: This job deploys the controller removing any external repository definition
261
262 - job-template:
263     name: 'distribution-offline-{stream}'
264
265     project-type: freestyle
266     node: centos7-java-builder-2c-8g
267
268     properties:
269         - opendaylight-infra-properties:
270             build-days-to-keep: '{build-days-to-keep}'
271
272     parameters:
273         - opendaylight-infra-parameters:
274             project: '{project}'
275             branch: '{branch}'
276             refspec: 'refs/heads/{branch}'
277             artifacts: '{archive-artifacts} **/*.hprof'
278         - integration-branch:
279             branch: '{branch}'
280         - integration-bundleurl:
281             bundleurl: '{bundleurl}'
282         - integration-jdk-version:
283             jdkversion: '{jre}'
284
285     wrappers:
286         - opendaylight-infra-wrappers:
287             build-timeout: '{build-timeout}'
288
289     triggers:
290         - timed: 'H H * * *'
291
292     builders:
293         - integration-get-bundle-vars
294         - inject:
295             properties-file: 'bundle_vars.txt'
296         - integration-deploy-controller-offline
297
298     publishers:
299         - email-notification:
300             email-recipients: '{email-recipients}'
301             email-prefix: '[int/dist]'
302         - integration-csit-archive-build
303         - opendaylight-infra-shiplogs:
304             maven-version: 'mvn33'