Create a opendaylight-infra-wrapper macro
[releng/builder.git] / jjb / integration / integration-distribution-jobs.yaml
1
2 - project:
3     name: integration-distribution
4     jobs:
5         - '{name}-verify-python-{stream}'
6         - 'integration-distribution-verify-{stream}'
7         - 'integration-distribution-merge-{stream}'
8         - 'integration-distribution-deploy-{stream}'
9         - 'integration-distribution-offline-{stream}'
10
11     project: integration/distribution
12
13     stream:
14         - boron:
15             branch: 'master'
16             jre: 'openjdk8'
17         - beryllium:
18             branch: 'stable/beryllium'
19             jre: 'openjdk7'
20         - stable-lithium:
21             branch: 'stable/lithium'
22             jre: 'openjdk7'
23
24
25 - job-template:
26     name: 'integration-distribution-verify-{stream}'
27
28     project-type: maven
29     node: dynamic_verify
30     concurrent: true
31     jdk: '{jre}'
32
33     logrotate:
34         daysToKeep: '{build-days-to-keep}'
35         numToKeep: '{build-num-to-keep}'
36         artifactDaysToKeep: '{build-artifact-days-to-keep}'
37         artifactNumToKeep: '{build-artifact-num-to-keep}'
38
39     parameters:
40         - project-parameter:
41             project: 'integration/distribution'
42         - gerrit-parameters:
43             project: '{project}'
44             branch: '{branch}'
45             refspec: 'refs/heads/{branch}'
46         - integration-patch-refspec:
47             branch: '$GERRIT_REFSPEC'
48
49     scm:
50         - gerrit-trigger-scm:
51             credentials-id: '{ssh-credentials}'
52             refspec: '$PATCHREFSPEC'
53             choosing-strategy: 'gerrit'
54
55     wrappers:
56         - opendaylight-infra-wrappers:
57             build-timeout: '{build-timeout}'
58
59     triggers:
60         - gerrit-trigger-relevant-patch-submitted:
61             name: 'integration/distribution'
62             branch: '{branch}'
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: 'clean install -V -B -Dmaven.repo.local=/tmp/r -Dorg.ops4j.pax.url.mvn.localRepository=/tmp/r -Djenkins -Dstream={stream}'
77         maven-opts: '-Xmx1024m -XX:MaxPermSize=256m'
78         settings: 'integration-settings'
79         settings-type: cfp
80         global-settings: 'odl-global-settings'
81         global-settings-type: cfp
82         ignore-upstream-changes: true
83         post-step-run-condition: 'SUCCESS'
84
85     postbuilders:
86         - trigger-builds:
87             - project: 'integration-distribution-deploy-{stream}'
88               block: true
89               predefined-parameters:
90                   BUNDLEURL=$BUNDLEURL
91
92     publishers:
93         - email-notification:
94             email-prefix: '[integration]'
95         - archive-artifacts:
96             artifacts: '**/target/surefire-reports/*-output.txt, '
97         - findbugs
98         - jacoco-report
99
100 - job-template:
101     name: 'integration-distribution-merge-{stream}'
102
103     project-type: maven
104     node: dynamic_merge
105     jdk: '{jre}'
106
107     logrotate:
108         daysToKeep: '{build-days-to-keep}'
109         numToKeep: '{build-num-to-keep}'
110         artifactDaysToKeep: '{build-artifact-days-to-keep}'
111         artifactNumToKeep: '{build-artifact-num-to-keep}'
112
113     parameters:
114         - project-parameter:
115             project: 'integration/distribution'
116         - gerrit-parameters:
117             project: '{project}'
118             branch: '{branch}'
119             refspec: 'refs/heads/{branch}'
120
121     scm:
122         - gerrit-trigger-scm:
123             credentials-id: '{ssh-credentials}'
124             refspec: ''
125             choosing-strategy: 'default'
126
127     wrappers:
128         - opendaylight-infra-wrappers:
129             build-timeout: '{build-timeout}'
130
131     triggers:
132         - timed: 'H H * * 0'
133         - gerrit-trigger-patch-merged:
134             name: 'integration/distribution'
135             branch: '{branch}'
136
137     prebuilders:
138         - wipe-org-opendaylight-repo
139         - jacoco-nojava-workaround
140         - provide-maven-settings:
141             global-settings-file: 'odl-global-settings'
142             settings-file: 'integration-settings'
143
144     maven:
145         maven-name: '{mvn33}'
146         root-pom: 'pom.xml'
147         goals: 'clean install -V -B -Dmaven.repo.local=/tmp/r -Dorg.ops4j.pax.url.mvn.localRepository=/tmp/r -Djenkins -Dmerge -Dstream={stream}'
148         maven-opts: '-Xmx1024m -XX:MaxPermSize=256m'
149         settings: 'integration-settings'
150         settings-type: cfp
151         global-settings: 'odl-global-settings'
152         global-settings-type: cfp
153
154     postbuilders:
155         - conditional-step:
156             condition-kind: file-exists
157             condition-filename: deploy-site.xml
158             condition-basedir: workspace
159
160             # The strategy here is intentional to run Maven site:deploy twice
161             # once using regular pom.xml to produce a staged-site which is
162             # then used by deploy-site.xml to push to Nexus. This is a
163             # workaround to Maven Site's default linking code which creates
164             # incorrect URLs for sites due to auto-detection assuming your
165             # project is configured in a certain way which ODL is not.
166             steps:
167             - maven-target:
168                 maven-version: '{mvn33}'
169                 pom: pom.xml
170                 goals: 'site:deploy -V -B -Dstream={stream}'
171                 java-opts:
172                     - '-Xmx2g'
173                 settings: 'integration-settings'
174                 settings-type: cfp
175                 global-settings: 'odl-global-settings'
176                 global-settings-type: cfp
177             - maven-target:
178                 maven-version: '{mvn33}'
179                 pom: deploy-site.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
188     reporters:
189         - findbugs
190
191     publishers:
192         - archive-artifacts:
193             artifacts: '**/target/surefire-reports/*-output.txt, '
194         - email-notification:
195             email-prefix: '[integration]'
196         - maven-deploy:
197             id: ''
198             unique-version: true
199             deploy-unstable: false
200         - jacoco-report
201
202 # Template: integration-distribution-deploy-{stream}
203 # Goal: Verify distribution starts with no issues when all features are loaded
204 # Operation: This job deploys the controller installing odl-integration-all
205
206 - job-template:
207     name: 'integration-distribution-deploy-{stream}'
208
209     project-type: freestyle
210     node: dynamic_verify
211     concurrent: true
212
213     logrotate:
214         daysToKeep: '{build-days-to-keep}'
215         numToKeep: '{build-num-to-keep}'
216         artifactDaysToKeep: '{build-artifact-days-to-keep}'
217         artifactNumToKeep: '{build-num-to-keep}'
218
219     parameters:
220         - project-parameter:
221             project: 'integration/distribution'
222         - integration-branch:
223             branch: '{branch}'
224         - integration-bundleurl:
225             bundleurl: 'last'
226         - integration-jdk-version:
227             jdkversion: '{jre}'
228
229     wrappers:
230         - opendaylight-infra-wrappers:
231             build-timeout: '{build-timeout}'
232
233     triggers:
234         - timed: 'H H * * *'
235
236     builders:
237         - integration-get-bundle-vars
238         - inject:
239             properties-file: 'bundle_vars.txt'
240         - integration-deploy-controller-verify
241
242     publishers:
243         - email-notification:
244             email-prefix: '[integration]'
245         - integration-csit-archive-build
246         - archive-build:
247             maven-version: '{mvn33}'
248
249 # Template: integration-distribution-offline-{stream}
250 # Goal: Verify distribution can start with no internet connection
251 # Operation: This job deploys the controller removing any external repository definition
252
253 - job-template:
254     name: 'integration-distribution-offline-{stream}'
255
256     project-type: freestyle
257     node: dynamic_verify
258
259     logrotate:
260         daysToKeep: '{build-days-to-keep}'
261         numToKeep: '{build-num-to-keep}'
262         artifactDaysToKeep: '{build-artifact-days-to-keep}'
263         artifactNumToKeep: '{build-num-to-keep}'
264
265     parameters:
266         - project-parameter:
267             project: 'integration/distribution'
268         - integration-branch:
269             branch: '{branch}'
270         - integration-bundleurl:
271             bundleurl: 'last'
272         - integration-jdk-version:
273             jdkversion: '{jre}'
274
275     wrappers:
276         - opendaylight-infra-wrappers:
277             build-timeout: '{build-timeout}'
278
279     triggers:
280         - timed: 'H H * * *'
281
282     builders:
283         - integration-get-bundle-vars
284         - inject:
285             properties-file: 'bundle_vars.txt'
286         - integration-deploy-controller-offline
287
288     publishers:
289         - email-notification:
290             email-prefix: '[integration]'
291         - integration-csit-archive-build
292         - archive-build:
293             maven-version: '{mvn33}'