Find major version from stream, avoid mismatches
[releng/builder.git] / jjb / packaging / packaging.yaml
1 ---
2 - project:
3     name: packaging
4     project-name: packaging
5
6     jobs:
7       - '{project-name}-verify-tox-master'
8       - 'packaging-build-rpm-{stream}'
9       - 'packaging-build-rpm-snap-{stream}'
10       - 'packaging-build-deb-{stream}'
11       - 'packaging-test-rpm-master'
12       - 'packaging-test-rpm-upgrade-master'
13       - 'packaging-test-deb-master'
14
15     project: 'integration/packaging'
16
17     stream:
18       - boron
19       - carbon
20       - nitrogen
21       - oxygen
22     branch: 'master'
23
24
25 - job-template:
26     name: 'packaging-build-rpm-{stream}'
27
28     node: centos7-java-builder-2c-4g
29
30     project-type: freestyle
31
32     mvn-opts: ''
33     mvn-params: ''
34     mvn-version: mvn33
35
36     properties:
37       - opendaylight-infra-properties:
38           build-days-to-keep: 7
39
40     parameters:
41       - opendaylight-infra-parameters:
42           os-cloud: '{os-cloud}'
43           project: '{project}'
44           branch: '{branch}'
45           refspec: 'refs/heads/{branch}'
46           artifacts: '{archive-artifacts}'
47       - lf-infra-maven-parameters:
48           mvn-opts: '{mvn-opts}'
49           mvn-params: '{mvn-params}'
50           mvn-version: '{mvn-version}'
51           staging-profile-id: ''
52       - string:
53           name: DOWNLOAD_URL
54           # yamllint disable-line rule:line-length
55           default: 'https://nexus.opendaylight.org/content/repositories/opendaylight.release/org/opendaylight/integration/distribution-karaf/0.6.0-Carbon/distribution-karaf-0.6.0-Carbon.tar.gz'
56           description: 'URL to ODL tarball artifact to repackage into RPM'
57       - string:
58           name: CHANGELOG_NAME
59           default: 'Jenkins'
60           description: 'Name of person who defined RPM'
61       - string:
62           name: CHANGELOG_EMAIL
63           default: 'jenkins-donotreply@opendaylight.org'
64           description: 'Email of person who defined RPM'
65
66     scm:
67       - integration-gerrit-scm:
68           basedir: 'packaging'
69           refspec: '$GERRIT_REFSPEC'
70           branch: 'master'
71
72     wrappers:
73       - opendaylight-infra-wrappers:
74           build-timeout: '{build-timeout}'
75
76     builders:
77       - shell: !include-raw: build-rpm.sh
78       - lf-infra-deploy-maven-file:
79           global-settings-file: 'global-settings'
80           settings-file: 'packaging-settings'
81           mvn-version: 'mvn33'
82           maven-repo-url: '$NEXUS_URL/content/repositories/$REPO_ID'
83           repo-id: 'opendaylight-{stream}-epel-7-x86_64-devel'
84           group-id: 'org.opendaylight.integration-packaging'
85           upload-files-dir: '$WORKSPACE/upload_files'
86
87     publishers:
88       - lf-infra-publish
89
90
91 - job-template:
92     name: 'packaging-build-rpm-snap-{stream}'
93
94     node: centos7-java-builder-2c-4g
95
96     project-type: freestyle
97
98     mvn-opts: ''
99     mvn-params: ''
100     mvn-version: mvn33
101
102     properties:
103       - opendaylight-infra-properties:
104           build-days-to-keep: 7
105
106     parameters:
107       - opendaylight-infra-parameters:
108           os-cloud: '{os-cloud}'
109           project: '{project}'
110           branch: '{branch}'
111           refspec: 'refs/heads/{branch}'
112           artifacts: '{archive-artifacts}'
113       - lf-infra-maven-parameters:
114           mvn-opts: '{mvn-opts}'
115           mvn-params: '{mvn-params}'
116           mvn-version: '{mvn-version}'
117           staging-profile-id: ''
118       - string:
119           name: CHANGELOG_NAME
120           default: 'Jenkins'
121           description: 'Name of person who defined RPM'
122       - string:
123           name: CHANGELOG_EMAIL
124           default: 'jenkins-donotreply@opendaylight.org'
125           description: 'Email of person who defined RPM'
126
127     scm:
128       - integration-gerrit-scm:
129           basedir: 'packaging'
130           refspec: '$GERRIT_REFSPEC'
131           branch: 'master'
132
133     wrappers:
134       - opendaylight-infra-wrappers:
135           build-timeout: '{build-timeout}'
136
137     builders:
138       - shell: !include-raw: build-rpm-snap.sh
139       - lf-infra-deploy-maven-file:
140           global-settings-file: 'global-settings'
141           settings-file: 'packaging-settings'
142           mvn-version: 'mvn33'
143           maven-repo-url: '$NEXUS_URL/content/repositories/$REPO_ID'
144           repo-id: 'opendaylight-{stream}-epel-7-x86_64-devel'
145           group-id: 'org.opendaylight.integration-packaging'
146           upload-files-dir: '$WORKSPACE/upload_files'
147
148     triggers:
149       - timed: '@daily'
150
151     publishers:
152       - lf-infra-publish
153
154
155 - job-template:
156     name: 'packaging-test-rpm-master'
157
158     node: centos7-java-builder-2c-4g
159
160     parameters:
161       - opendaylight-infra-parameters:
162           os-cloud: '{os-cloud}'
163           project: '{project}'
164           branch: '{branch}'
165           refspec: 'refs/heads/{branch}'
166           artifacts: '{archive-artifacts}'
167       - string:
168           name: URL
169           # yamllint disable-line rule:line-length
170           default: 'https://raw.githubusercontent.com/opendaylight/integration-packaging/master/packages/rpm/example_repo_configs/opendaylight-60-release.repo'
171           description: 'Link to .repo or .rpm file'
172
173     scm:
174       - integration-gerrit-scm:
175           basedir: 'packaging'
176           refspec: '$GERRIT_REFSPEC'
177           branch: 'master'
178
179     wrappers:
180       - opendaylight-infra-wrappers:
181           build-timeout: '{build-timeout}'
182
183     builders:
184       - shell: !include-raw: install-rpm.sh
185       - shell: !include-raw: start-odl.sh
186       - shell: |
187           # Install expect to interact with Karaf shell
188           sudo yum install -y expect
189           # Install nmap to check status of ODL's SSH port
190           sudo yum install -y nmap
191       - shell: !include-raw: include-raw-test-karaf.expect
192       - shell: !include-raw: stop-odl.sh
193
194     publishers:
195       # TODO: Remove the archive publisher
196       #       small data should be stored on logs.opendaylight.org
197       #       large data should be stored on nexus.opendaylight.org
198       - archive:
199           artifacts: '**'
200           allow-empty: true
201           fingerprint: true
202           latest-only: true
203       - lf-infra-publish
204
205
206 - job-template:
207     name: 'packaging-test-rpm-upgrade-master'
208
209     node: centos7-java-builder-2c-4g
210
211     parameters:
212       - opendaylight-infra-parameters:
213           os-cloud: '{os-cloud}'
214           project: '{project}'
215           branch: '{branch}'
216           refspec: 'refs/heads/{branch}'
217           artifacts: '{archive-artifacts}'
218       - string:
219           name: URL
220           # yamllint disable-line rule:line-length
221           default: 'https://raw.githubusercontent.com/opendaylight/integration-packaging/master/packages/rpm/example_repo_configs/opendaylight-6-release.repo'
222           description: 'Link to .repo or .rpm file'
223       - string:
224           name: UPGRADE_URL
225           # yamllint disable-line rule:line-length
226           default: 'https://raw.githubusercontent.com/opendaylight/integration-packaging/master/packages/rpm/example_repo_configs/opendaylight-6-testing.repo'
227           description: 'Link to .repo or .rpm file'
228
229     scm:
230       - integration-gerrit-scm:
231           basedir: 'packaging'
232           refspec: '$GERRIT_REFSPEC'
233           branch: 'master'
234
235     wrappers:
236       - opendaylight-infra-wrappers:
237           build-timeout: '{build-timeout}'
238
239     builders:
240       - shell: !include-raw: install-rpm.sh
241       - shell: !include-raw: start-odl.sh
242       - shell: |
243           # Install expect to interact with Karaf shell
244           sudo yum install -y expect
245           # Install nmap to check status of ODL's SSH port
246           sudo yum install -y nmap
247       - shell: !include-raw: include-raw-test-karaf.expect
248       - shell: !include-raw: stop-odl.sh
249       - shell: !include-raw: test-rpm-upgrade.sh
250       - shell: !include-raw: start-odl.sh
251       - shell: !include-raw: include-raw-test-karaf.expect
252       - shell: !include-raw: stop-odl.sh
253
254     publishers:
255       - lf-infra-publish
256
257
258 - job-template:
259     name: 'packaging-test-deb-master'
260
261     node: ubuntu1604-mininet-ovs-25-2c-4g
262
263     parameters:
264       - opendaylight-infra-parameters:
265           os-cloud: '{os-cloud}'
266           project: '{project}'
267           branch: '{branch}'
268           refspec: 'refs/heads/{branch}'
269           artifacts: '{archive-artifacts}'
270       - string:
271           name: PACKAGE
272           default: 'ppa:odl-team/carbon'
273           description: 'Link to .deb package or name of PPA repo'
274
275     scm:
276       - integration-gerrit-scm:
277           basedir: 'packaging'
278           refspec: '$GERRIT_REFSPEC'
279           branch: 'master'
280
281     wrappers:
282       - opendaylight-infra-wrappers:
283           build-timeout: '{build-timeout}'
284
285     builders:
286       - shell: !include-raw: install-deb.sh
287       - shell: !include-raw: start-odl.sh
288       - shell: |
289           # Install expect to interact with Karaf shell
290           sudo apt-get install -y expect
291           # Install nmap to check status of ODL's SSH port
292           sudo apt-get install -y nmap
293       - shell: !include-raw: include-raw-test-karaf.expect
294       - shell: !include-raw: stop-odl.sh
295
296     publishers:
297       - lf-infra-publish
298
299
300 - job-template:
301     name: 'packaging-build-deb-{stream}'
302
303     node: ubuntu1604-mininet-ovs-25-2c-4g
304
305     project-type: freestyle
306
307     mvn-opts: ''
308     mvn-params: ''
309     mvn-version: mvn33
310
311     properties:
312       - opendaylight-infra-properties:
313           build-days-to-keep: 7
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       - lf-infra-maven-parameters:
323           mvn-opts: '{mvn-opts}'
324           mvn-params: '{mvn-params}'
325           mvn-version: '{mvn-version}'
326           staging-profile-id: ''
327       - string:
328           name: DOWNLOAD_URL
329           # yamllint disable-line rule:line-length
330           default: 'https://nexus.opendaylight.org/content/repositories/opendaylight.release/org/opendaylight/integration/distribution-karaf/0.5.3-Boron-SR3/distribution-karaf-0.5.3-Boron-SR3.tar.gz'
331           description: 'URL to ODL tarball artifact to repackage into .deb'
332       - string:
333           name: CHANGELOG_NAME
334           default: 'Jenkins'
335           description: 'Name of person who defined .deb'
336       - string:
337           name: CHANGELOG_EMAIL
338           default: 'jenkins-donotreply@opendaylight.org'
339           description: 'Email of person who defined .deb'
340
341     scm:
342       - integration-gerrit-scm:
343           basedir: 'packaging'
344           refspec: '$GERRIT_REFSPEC'
345           branch: 'master'
346
347     wrappers:
348       - opendaylight-infra-wrappers:
349           build-timeout: '{build-timeout}'
350
351     builders:
352       - shell: !include-raw: build-deb.sh
353       - lf-infra-deploy-maven-file:
354           global-settings-file: 'global-settings'
355           settings-file: 'packaging-settings'
356           mvn-version: '{mvn-version}'
357           maven-repo-url: '$NEXUS_URL/content/repositories/$REPO_ID'
358           repo-id: 'opendaylight-{stream}-ubuntu-1604-x86_64-devel'
359           group-id: 'org.opendaylight.integration-packaging'
360           upload-files-dir: '$WORKSPACE/upload_files'
361
362     publishers:
363       - lf-infra-publish