Add job to comprehensively test RPM building logic
[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-verify-full-rpm-master'
12       - 'packaging-test-rpm-master'
13       - 'packaging-test-rpm-upgrade-master'
14       - 'packaging-test-deb-master'
15
16     project: 'integration/packaging'
17
18     stream:
19       - boron
20       - carbon
21       - nitrogen
22       - oxygen
23     branch: 'master'
24
25     # common parameters required for 'lf-infra-deploy-maven-file' builder
26     group-id: 'org.opendaylight.integration-packaging'
27     upload-files-dir: '$WORKSPACE/upload_files'
28     maven-repo-url: '$NEXUS_URL/content/repositories/$REPO_ID'
29
30 - job-template:
31     name: 'packaging-build-rpm-{stream}'
32
33     node: centos7-java-builder-2c-4g
34
35     project-type: freestyle
36
37     mvn-opts: ''
38     mvn-params: ''
39     mvn-version: mvn33
40
41     properties:
42       - opendaylight-infra-properties:
43           build-days-to-keep: 7
44
45     parameters:
46       - opendaylight-infra-parameters:
47           os-cloud: '{os-cloud}'
48           project: '{project}'
49           branch: '{branch}'
50           refspec: 'refs/heads/{branch}'
51           artifacts: '{archive-artifacts}'
52       - lf-infra-maven-parameters:
53           mvn-opts: '{mvn-opts}'
54           mvn-params: '{mvn-params}'
55           mvn-version: '{mvn-version}'
56           staging-profile-id: ''
57       - string:
58           name: DOWNLOAD_URL
59           # yamllint disable-line rule:line-length
60           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'
61           description: 'URL to ODL tarball artifact to repackage into RPM'
62       - string:
63           name: CHANGELOG_NAME
64           default: 'Jenkins'
65           description: 'Name of person who defined RPM'
66       - string:
67           name: CHANGELOG_EMAIL
68           default: 'jenkins-donotreply@opendaylight.org'
69           description: 'Email of person who defined RPM'
70
71     scm:
72       - integration-gerrit-scm:
73           basedir: 'packaging'
74           refspec: '$GERRIT_REFSPEC'
75           branch: 'master'
76
77     wrappers:
78       - opendaylight-infra-wrappers:
79           build-timeout: '{build-timeout}'
80
81     builders:
82       - shell: !include-raw: build-rpm.sh
83       - lf-infra-deploy-maven-file:
84           global-settings-file: 'global-settings'
85           settings-file: 'packaging-settings'
86           mvn-version: '{mvn-version}'
87           repo-id: 'opendaylight-{stream}-epel-7-x86_64-devel'
88           group-id: '{group-id}'
89           upload-files-dir: '{upload-files-dir}'
90           maven-repo-url: '{maven-repo-url}'
91
92     publishers:
93       - lf-infra-publish
94
95
96 - job-template:
97     name: 'packaging-build-rpm-snap-{stream}'
98
99     node: centos7-java-builder-2c-4g
100
101     project-type: freestyle
102
103     mvn-opts: ''
104     mvn-params: ''
105     mvn-version: mvn33
106
107     properties:
108       - opendaylight-infra-properties:
109           build-days-to-keep: 7
110
111     parameters:
112       - opendaylight-infra-parameters:
113           os-cloud: '{os-cloud}'
114           project: '{project}'
115           branch: '{branch}'
116           refspec: 'refs/heads/{branch}'
117           artifacts: '{archive-artifacts}'
118       - lf-infra-maven-parameters:
119           mvn-opts: '{mvn-opts}'
120           mvn-params: '{mvn-params}'
121           mvn-version: '{mvn-version}'
122           staging-profile-id: ''
123       - string:
124           name: CHANGELOG_NAME
125           default: 'Jenkins'
126           description: 'Name of person who defined RPM'
127       - string:
128           name: CHANGELOG_EMAIL
129           default: 'jenkins-donotreply@opendaylight.org'
130           description: 'Email of person who defined RPM'
131
132     scm:
133       - integration-gerrit-scm:
134           basedir: 'packaging'
135           refspec: '$GERRIT_REFSPEC'
136           branch: 'master'
137
138     wrappers:
139       - opendaylight-infra-wrappers:
140           build-timeout: '{build-timeout}'
141
142     builders:
143       - shell: !include-raw: build-rpm-snap.sh
144       - lf-infra-deploy-maven-file:
145           global-settings-file: 'global-settings'
146           settings-file: 'packaging-settings'
147           mvn-version: '{mvn-version}'
148           repo-id: 'opendaylight-{stream}-epel-7-x86_64-devel'
149           group-id: '{group-id}'
150           upload-files-dir: '{upload-files-dir}'
151           maven-repo-url: '{maven-repo-url}'
152
153     triggers:
154       - timed: '@daily'
155
156     publishers:
157       - lf-infra-publish
158
159
160 - job-template:
161     name: 'packaging-verify-full-rpm-master'
162
163     node: centos7-java-builder-2c-4g
164
165     project-type: freestyle
166
167     parameters:
168       - opendaylight-infra-parameters:
169           os-cloud: '{os-cloud}'
170           project: '{project}'
171           branch: '{branch}'
172           refspec: 'refs/heads/{branch}'
173           artifacts: '{archive-artifacts}'
174
175     scm:
176       - integration-gerrit-scm:
177           basedir: 'packaging'
178           refspec: '$GERRIT_REFSPEC'
179           branch: 'master'
180
181     wrappers:
182       - opendaylight-infra-wrappers:
183           build-timeout: '{build-timeout}'
184
185     builders:
186       # TODO: Install/test each RPM. Will require builder script changes.
187       # Test Carbon SR1 tarball
188       - inject:
189           # yamllint disable-line rule:line-length
190           properties-content: 'DOWNLOAD_URL=https://nexus.opendaylight.org/content/repositories/opendaylight.release/org/opendaylight/integration/distribution-karaf/0.6.1-Carbon/distribution-karaf-0.6.1-Carbon.tar.gz'
191       - shell: !include-raw: build-rpm.sh
192
193       # Test Carbon multipatch zip (no parallel tarball available)
194       - inject:
195           # yamllint disable-line rule:line-length
196           properties-content: 'DOWNLOAD_URL=https://nexus.opendaylight.org/content/repositories/opendaylight.snapshot/org/opendaylight/integration/integration/distribution/distribution-karaf/0.6.2-SNAPSHOT/distribution-karaf-0.6.2-20171002.113256-59.zip'
197       - shell: !include-raw: build-rpm.sh
198
199       # Test latest Carbon snapshot
200       - inject:
201           properties-content: 'STREAM=carbon'
202       - shell: !include-raw: build-rpm-snap.sh
203
204       # Test Nitrogen tarball
205       - inject:
206           # yamllint disable-line rule:line-length
207           properties-content: 'DOWNLOAD_URL=https://nexus.opendaylight.org/content/repositories/opendaylight.release/org/opendaylight/integration/karaf/0.7.0/karaf-0.7.0.tar.gz'
208       - shell: !include-raw: build-rpm.sh
209
210       # Test Nitrogen multipatch zip (no parallel tarball available)
211       - inject:
212           # yamllint disable-line rule:line-length
213           properties-content: 'DOWNLOAD_URL=https://nexus.opendaylight.org/content/repositories/opendaylight.snapshot/org/opendaylight/integration/integration/distribution/karaf/0.7.1-SNAPSHOT/karaf-0.7.1-20171003.134117-9.zip'
214       - shell: !include-raw: build-rpm.sh
215
216       # Test latest Nitrogen snapshot
217       - inject:
218           properties-content: 'STREAM=nitrogen'
219       - shell: !include-raw: build-rpm-snap.sh
220
221       # Test Oxygen tarball
222       # TODO: Change this to an autorelease build once available
223       - inject:
224           # yamllint disable-line rule:line-length
225           properties-content: 'DOWNLOAD_URL=https://nexus.opendaylight.org/content/repositories/opendaylight.snapshot/org/opendaylight/integration/karaf/0.8.0-SNAPSHOT/karaf-0.8.0-20170928.142221-597.tar.gz'
226       - shell: !include-raw: build-rpm.sh
227
228       # Test Oxygen multipatch zip (no parallel tarball available)
229       - inject:
230           # yamllint disable-line rule:line-length
231           properties-content: 'DOWNLOAD_URL=https://nexus.opendaylight.org/content/repositories/opendaylight.snapshot/org/opendaylight/integration/integration/distribution/karaf/0.8.0-SNAPSHOT/karaf-0.8.0-20171003.122621-24.zip'
232       - shell: !include-raw: build-rpm.sh
233
234       # Test latest Oxygen snapshot
235       - inject:
236           properties-content: 'STREAM=oxygen'
237       - shell: !include-raw: build-rpm-snap.sh
238
239     triggers:
240       - timed: '@daily'
241       - gerrit:
242           server-name: '{server-name}'
243           trigger-on:
244             - comment-added-contains-event:
245                 comment-contains-value: 'verify-rpm-full'
246           projects:
247             - project-compare-type: ANT
248               project-pattern: '{project}'
249               branches:
250                 - branch-compare-type: ANT
251                   branch-pattern: '**/{branch}'
252
253     publishers:
254       - lf-infra-publish
255
256
257 - job-template:
258     name: 'packaging-test-rpm-master'
259
260     node: centos7-java-builder-2c-4g
261
262     parameters:
263       - opendaylight-infra-parameters:
264           os-cloud: '{os-cloud}'
265           project: '{project}'
266           branch: '{branch}'
267           refspec: 'refs/heads/{branch}'
268           artifacts: '{archive-artifacts}'
269       - string:
270           name: URL
271           # yamllint disable-line rule:line-length
272           default: 'https://raw.githubusercontent.com/opendaylight/integration-packaging/master/packages/rpm/example_repo_configs/opendaylight-60-release.repo'
273           description: 'Link to .repo or .rpm file'
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-rpm.sh
287       - shell: !include-raw: start-odl.sh
288       - shell: |
289           # Install expect to interact with Karaf shell
290           sudo yum install -y expect
291           # Install nmap to check status of ODL's SSH port
292           sudo yum install -y nmap
293       - shell: !include-raw: test-karaf.expect
294       - shell: !include-raw: stop-odl.sh
295
296     publishers:
297       # TODO: Remove the archive publisher
298       #       small data should be stored on logs.opendaylight.org
299       #       large data should be stored on nexus.opendaylight.org
300       - archive:
301           artifacts: '**'
302           allow-empty: true
303           fingerprint: true
304           latest-only: true
305       - lf-infra-publish
306
307
308 - job-template:
309     name: 'packaging-test-rpm-upgrade-master'
310
311     node: centos7-java-builder-2c-4g
312
313     parameters:
314       - opendaylight-infra-parameters:
315           os-cloud: '{os-cloud}'
316           project: '{project}'
317           branch: '{branch}'
318           refspec: 'refs/heads/{branch}'
319           artifacts: '{archive-artifacts}'
320       - string:
321           name: URL
322           # yamllint disable-line rule:line-length
323           default: 'https://raw.githubusercontent.com/opendaylight/integration-packaging/master/packages/rpm/example_repo_configs/opendaylight-6-release.repo'
324           description: 'Link to .repo or .rpm file'
325       - string:
326           name: UPGRADE_URL
327           # yamllint disable-line rule:line-length
328           default: 'https://raw.githubusercontent.com/opendaylight/integration-packaging/master/packages/rpm/example_repo_configs/opendaylight-6-testing.repo'
329           description: 'Link to .repo or .rpm file'
330
331     scm:
332       - integration-gerrit-scm:
333           basedir: 'packaging'
334           refspec: '$GERRIT_REFSPEC'
335           branch: 'master'
336
337     wrappers:
338       - opendaylight-infra-wrappers:
339           build-timeout: '{build-timeout}'
340
341     builders:
342       - shell: !include-raw: install-rpm.sh
343       - shell: !include-raw: start-odl.sh
344       - shell: |
345           # Install expect to interact with Karaf shell
346           sudo yum install -y expect
347           # Install nmap to check status of ODL's SSH port
348           sudo yum install -y nmap
349       - shell: !include-raw: test-karaf.expect
350       - shell: !include-raw: stop-odl.sh
351       - shell: !include-raw: test-rpm-upgrade.sh
352       - shell: !include-raw: start-odl.sh
353       - shell: !include-raw: test-karaf.expect
354       - shell: !include-raw: stop-odl.sh
355
356     publishers:
357       - lf-infra-publish
358
359
360 - job-template:
361     name: 'packaging-test-deb-master'
362
363     node: ubuntu1604-mininet-ovs-25-2c-4g
364
365     parameters:
366       - opendaylight-infra-parameters:
367           os-cloud: '{os-cloud}'
368           project: '{project}'
369           branch: '{branch}'
370           refspec: 'refs/heads/{branch}'
371           artifacts: '{archive-artifacts}'
372       - string:
373           name: PACKAGE
374           default: 'ppa:odl-team/carbon'
375           description: 'Link to .deb package or name of PPA repo'
376
377     scm:
378       - integration-gerrit-scm:
379           basedir: 'packaging'
380           refspec: '$GERRIT_REFSPEC'
381           branch: 'master'
382
383     wrappers:
384       - opendaylight-infra-wrappers:
385           build-timeout: '{build-timeout}'
386
387     builders:
388       - shell: !include-raw: install-deb.sh
389       - shell: !include-raw: start-odl.sh
390       - shell: |
391           # Install expect to interact with Karaf shell
392           sudo apt-get install -y expect
393           # Install nmap to check status of ODL's SSH port
394           sudo apt-get install -y nmap
395       - shell: !include-raw: test-karaf.expect
396       - shell: !include-raw: stop-odl.sh
397
398     publishers:
399       - lf-infra-publish
400
401
402 - job-template:
403     name: 'packaging-build-deb-{stream}'
404
405     node: ubuntu1604-mininet-ovs-25-2c-4g
406
407     project-type: freestyle
408
409     mvn-opts: ''
410     mvn-params: ''
411     mvn-version: mvn33
412
413     properties:
414       - opendaylight-infra-properties:
415           build-days-to-keep: 7
416
417     parameters:
418       - opendaylight-infra-parameters:
419           os-cloud: '{os-cloud}'
420           project: '{project}'
421           branch: '{branch}'
422           refspec: 'refs/heads/{branch}'
423           artifacts: '{archive-artifacts}'
424       - lf-infra-maven-parameters:
425           mvn-opts: '{mvn-opts}'
426           mvn-params: '{mvn-params}'
427           mvn-version: '{mvn-version}'
428           staging-profile-id: ''
429       - string:
430           name: DOWNLOAD_URL
431           # yamllint disable-line rule:line-length
432           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'
433           description: 'URL to ODL tarball artifact to repackage into .deb'
434       - string:
435           name: CHANGELOG_NAME
436           default: 'Jenkins'
437           description: 'Name of person who defined .deb'
438       - string:
439           name: CHANGELOG_EMAIL
440           default: 'jenkins-donotreply@opendaylight.org'
441           description: 'Email of person who defined .deb'
442
443     scm:
444       - integration-gerrit-scm:
445           basedir: 'packaging'
446           refspec: '$GERRIT_REFSPEC'
447           branch: 'master'
448
449     wrappers:
450       - opendaylight-infra-wrappers:
451           build-timeout: '{build-timeout}'
452
453     builders:
454       - shell: !include-raw: build-deb.sh
455       - lf-infra-deploy-maven-file:
456           global-settings-file: 'global-settings'
457           settings-file: 'packaging-settings'
458           mvn-version: '{mvn-version}'
459           repo-id: 'opendaylight-{stream}-ubuntu-1604-x86_64-devel'
460           group-id: '{group-id}'
461           upload-files-dir: '{upload-files-dir}'
462           maven-repo-url: '{maven-repo-url}'
463
464     publishers:
465       - lf-infra-publish