Build and test rpm-snap using docker
[releng/builder.git] / jjb / packaging / packaging.yaml
1 ---
2 - project:
3     name: packaging
4     project-name: packaging
5
6     jobs:
7       - 'packaging-build-rpm-{stream}'
8       - 'packaging-build-rpm-snap-{stream}'
9       - 'packaging-build-deb-{stream}'
10       - 'packaging-verify-full-rpm-master'
11       - 'packaging-verify-rpm-master'
12       - 'packaging-test-rpm-master'
13       - 'packaging-test-rpm-upgrade-master'
14       - 'packaging-test-deb-master'
15       - gerrit-tox-verify:
16           branch: master
17           stream: master
18
19     project: 'integration/packaging'
20
21     stream:
22       - fluorine
23       - carbon
24       - nitrogen
25       - oxygen
26     branch: 'master'
27
28     # common parameters required for 'lf-infra-deploy-maven-file' builder
29     group-id: 'org.opendaylight.integration-packaging'
30     upload-files-dir: '$WORKSPACE/upload_files'
31     maven-repo-url: '$NEXUS_URL/content/repositories/$REPO_ID'
32
33 - job-template:
34     name: 'packaging-build-rpm-{stream}'
35
36     node: centos7-builder-2c-8g
37
38     project-type: freestyle
39
40     mvn-opts: ''
41     mvn-params: ''
42     mvn-version: mvn33
43
44     properties:
45       - opendaylight-infra-properties:
46           build-days-to-keep: 7
47
48     parameters:
49       - opendaylight-infra-parameters:
50           os-cloud: '{os-cloud}'
51           project: '{project}'
52           branch: '{branch}'
53           refspec: 'refs/heads/{branch}'
54           artifacts: '{archive-artifacts}'
55       - lf-infra-maven-parameters:
56           mvn-opts: '{mvn-opts}'
57           mvn-params: '{mvn-params}'
58           mvn-version: '{mvn-version}'
59           staging-profile-id: ''
60       - string:
61           name: DOWNLOAD_URL
62           # yamllint disable-line rule:line-length
63           default: 'https://nexus.opendaylight.org/content/repositories/opendaylight.release/org/opendaylight/integration/karaf/0.7.0/karaf-0.7.0.tar.gz'
64           description: 'URL to ODL tarball artifact to repackage into RPM'
65       - string:
66           name: CHANGELOG_NAME
67           default: 'Jenkins'
68           description: 'Name of person who defined RPM'
69       - string:
70           name: CHANGELOG_EMAIL
71           default: 'jenkins-donotreply@opendaylight.org'
72           description: 'Email of person who defined RPM'
73
74     scm:
75       - integration-gerrit-scm:
76           basedir: 'packaging'
77           refspec: '$GERRIT_REFSPEC'
78           branch: 'master'
79
80     wrappers:
81       - opendaylight-infra-wrappers:
82           build-timeout: '{build-timeout}'
83
84     builders:
85       - shell: !include-raw-escape: build-rpm.sh
86       - install-test-uninstall-rpm
87       - lf-infra-deploy-maven-file:
88           global-settings-file: 'global-settings'
89           settings-file: 'packaging-settings'
90           mvn-version: '{mvn-version}'
91           repo-id: 'opendaylight-{stream}-epel-7-x86_64-devel'
92           group-id: '{group-id}'
93           upload-files-dir: '{upload-files-dir}'
94           maven-repo-url: '{maven-repo-url}'
95
96     publishers:
97       - lf-infra-publish
98
99
100 - job-template:
101     name: 'packaging-build-rpm-snap-{stream}'
102
103     node: centos7-docker-2c-8g
104
105     project-type: freestyle
106
107     mvn-opts: ''
108     mvn-params: ''
109     mvn-version: mvn33
110
111     properties:
112       - opendaylight-infra-properties:
113           build-days-to-keep: 7
114
115     parameters:
116       - opendaylight-infra-parameters:
117           os-cloud: '{os-cloud}'
118           project: '{project}'
119           branch: '{branch}'
120           refspec: 'refs/heads/{branch}'
121           artifacts: '{archive-artifacts}'
122       - lf-infra-maven-parameters:
123           mvn-opts: '{mvn-opts}'
124           mvn-params: '{mvn-params}'
125           mvn-version: '{mvn-version}'
126           staging-profile-id: ''
127       - string:
128           name: CHANGELOG_NAME
129           default: 'Jenkins'
130           description: 'Name of person who defined RPM'
131       - string:
132           name: CHANGELOG_EMAIL
133           default: 'jenkins-donotreply@opendaylight.org'
134           description: 'Email of person who defined RPM'
135
136     scm:
137       - integration-gerrit-scm:
138           basedir: 'packaging'
139           refspec: '$GERRIT_REFSPEC'
140           branch: 'master'
141
142     wrappers:
143       - opendaylight-infra-wrappers:
144           build-timeout: '{build-timeout}'
145
146     builders:
147       - inject:
148           properties-content: 'STREAM={stream}'
149       - shell: !include-raw: build-rpm-snap-docker.sh
150       - shell: !include-raw: test-rpm-docker.sh
151       - lf-infra-deploy-maven-file:
152           global-settings-file: 'global-settings'
153           settings-file: 'packaging-settings'
154           mvn-version: '{mvn-version}'
155           repo-id: 'opendaylight-{stream}-epel-7-x86_64-devel'
156           group-id: '{group-id}'
157           upload-files-dir: '{upload-files-dir}'
158           maven-repo-url: '{maven-repo-url}'
159
160     triggers:
161       - timed: '@daily'
162
163     publishers:
164       - lf-infra-publish
165
166
167 - job-template:
168     name: 'packaging-verify-rpm-master'
169
170     node: centos7-builder-2c-8g
171
172     project-type: freestyle
173
174     parameters:
175       - opendaylight-infra-parameters:
176           os-cloud: '{os-cloud}'
177           project: '{project}'
178           branch: '{branch}'
179           refspec: 'refs/heads/{branch}'
180           artifacts: '{archive-artifacts}'
181
182     scm:
183       - integration-gerrit-scm:
184           basedir: 'packaging'
185           refspec: '$GERRIT_REFSPEC'
186           branch: 'master'
187
188     wrappers:
189       - opendaylight-infra-wrappers:
190           build-timeout: '{build-timeout}'
191
192     builders:
193       # Test Nitrogen tarball
194       - inject:
195           # yamllint disable-line rule:line-length
196           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'
197       - shell: !include-raw-escape: build-rpm.sh
198       - install-test-uninstall-rpm
199
200       # Test Oxygen pre-release autorelease tarball
201       # FIXME: There aren't any available Oxygen autorelease builds, add one once possible
202       # FIXME: Oxygen tests fail due to jira.opendaylight.org/browse/ODLPARENT-139
203       # - inject:
204       # yamllint disable-line rule:line-length
205       #    properties-content: 'DOWNLOAD_URL=https://nexus.opendaylight.org/content/repositories/autorelease-2052/org/opendaylight/integration/karaf/0.8.0/karaf-0.8.0.tar.gz'
206       # - shell: !include-raw-escape: build-rpm.sh
207       # - install-test-uninstall-rpm
208
209       # Test Oxygen multipatch zip (no parallel tarball available)
210       # FIXME: Oxygen tests fail due to jira.opendaylight.org/browse/ODLPARENT-139
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.8.0-SNAPSHOT/karaf-0.8.0-20180204.191936-134.zip'
214       # - shell: !include-raw-escape: build-rpm.sh
215       # - install-test-uninstall-rpm
216
217       # Test latest Oxygen snapshot
218       # FIXME: Oxygen tests fail due to jira.opendaylight.org/browse/ODLPARENT-139
219       # - inject:
220       #     properties-content: 'STREAM=oxygen'
221       # - shell: !include-raw: build-rpm-snap.sh
222       # - install-test-uninstall-rpm
223
224     triggers:
225       - gerrit:
226           server-name: '{gerrit-server-name}'
227           trigger-on:
228             - comment-added-contains-event:
229                 comment-contains-value: 'rpm-verify'
230           projects:
231             - project-compare-type: ANT
232               project-pattern: '{project}'
233               branches:
234                 - branch-compare-type: ANT
235                   branch-pattern: '**/{branch}'
236               file-paths:
237                 - compare-type: ANT
238                   pattern: 'packages/**'
239
240     publishers:
241       - lf-infra-publish
242
243
244 - job-template:
245     name: 'packaging-verify-full-rpm-master'
246
247     node: centos7-builder-2c-8g
248
249     project-type: freestyle
250
251     parameters:
252       - opendaylight-infra-parameters:
253           os-cloud: '{os-cloud}'
254           project: '{project}'
255           branch: '{branch}'
256           refspec: 'refs/heads/{branch}'
257           artifacts: '{archive-artifacts}'
258
259     scm:
260       - integration-gerrit-scm:
261           basedir: 'packaging'
262           refspec: '$GERRIT_REFSPEC'
263           branch: 'master'
264
265     wrappers:
266       - opendaylight-infra-wrappers:
267           build-timeout: '{build-timeout}'
268
269     builders:
270       # Test Carbon SR2 tarball
271       - inject:
272           # yamllint disable-line rule:line-length
273           properties-content: 'DOWNLOAD_URL=https://nexus.opendaylight.org/content/repositories/opendaylight.release/org/opendaylight/integration/distribution-karaf/0.6.2-Carbon/distribution-karaf-0.6.2-Carbon.tar.gz'
274       - shell: !include-raw-escape: build-rpm.sh
275       - install-test-uninstall-rpm
276
277       # Test Carbon multipatch zip (no parallel tarball available)
278       # NB: This will need to be updated as old builds expire
279       - inject:
280           # yamllint disable-line rule:line-length
281           properties-content: 'DOWNLOAD_URL=https://nexus.opendaylight.org/content/repositories/opendaylight.snapshot/org/opendaylight/integration/integration/distribution/distribution-karaf/0.6.3-SNAPSHOT/distribution-karaf-0.6.3-20180115.181738-1.zip'
282       - shell: !include-raw-escape: build-rpm.sh
283       - install-test-uninstall-rpm
284
285       # Test latest Carbon snapshot
286       - inject:
287           properties-content: 'STREAM=carbon'
288       - shell: !include-raw: build-rpm-snap.sh
289       - install-test-uninstall-rpm
290
291       # Test Nitrogen tarball
292       - inject:
293           # yamllint disable-line rule:line-length
294           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'
295       - shell: !include-raw-escape: build-rpm.sh
296       - install-test-uninstall-rpm
297
298       # Test Nitrogen SR1 tarball
299       - inject:
300           # yamllint disable-line rule:line-length
301           properties-content: 'DOWNLOAD_URL=https://nexus.opendaylight.org/content/repositories/opendaylight.release/org/opendaylight/integration/karaf/0.7.1/karaf-0.7.1.tar.gz'
302       - shell: !include-raw-escape: build-rpm.sh
303       - install-test-uninstall-rpm
304
305       # Test Nitrogen multipatch zip (no parallel tarball available)
306       # NB: This will need to be updated as old builds expire
307       - inject:
308           # yamllint disable-line rule:line-length
309           properties-content: 'DOWNLOAD_URL=https://nexus.opendaylight.org/content/repositories/opendaylight.snapshot/org/opendaylight/integration/integration/distribution/karaf/0.7.2-SNAPSHOT/karaf-0.7.2-20180115.183312-2.zip'
310       - shell: !include-raw-escape: build-rpm.sh
311       - install-test-uninstall-rpm
312
313       # Test latest Nitrogen snapshot
314       - inject:
315           properties-content: 'STREAM=nitrogen'
316       - shell: !include-raw: build-rpm-snap.sh
317       - install-test-uninstall-rpm
318
319       # Test Oxygen pre-release autorelease tarball
320       # FIXME: There aren't any available Oxygen autorelease builds, add one once possible
321       # FIXME: Oxygen tests fail due to jira.opendaylight.org/browse/ODLPARENT-139
322       # NB: This will need to be updated as old builds expire
323       # - inject:
324       # yamllint disable-line rule:line-length
325       #    properties-content: 'DOWNLOAD_URL=https://nexus.opendaylight.org/content/repositories/autorelease-2052/org/opendaylight/integration/karaf/0.8.0/karaf-0.8.0.tar.gz'
326       # - shell: !include-raw-escape: build-rpm.sh
327       # - install-test-uninstall-rpm
328
329       # Test Oxygen multipatch zip (no parallel tarball available)
330       # FIXME: Oxygen tests fail due to jira.opendaylight.org/browse/ODLPARENT-139
331       # NB: This will need to be updated as old builds expire
332       # - inject:
333       # yamllint disable-line rule:line-length
334       #     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-20180204.191936-134.zip'
335       # - shell: !include-raw: build-rpm.sh
336       # - install-test-uninstall-rpm
337
338       # Test latest Oxygen snapshot
339       # FIXME: Oxygen tests fail due to jira.opendaylight.org/browse/ODLPARENT-139
340       # NB: Leaving this one known-failing Oxygen test running so can watch for fix
341       - inject:
342           properties-content: 'STREAM=oxygen'
343       - shell: !include-raw: build-rpm-snap.sh
344       - install-test-uninstall-rpm
345
346     triggers:
347       - timed: '@daily'
348       - gerrit:
349           server-name: '{gerrit-server-name}'
350           trigger-on:
351             - comment-added-contains-event:
352                 comment-contains-value: 'verify-rpm-full'
353           projects:
354             - project-compare-type: ANT
355               project-pattern: '{project}'
356               branches:
357                 - branch-compare-type: ANT
358                   branch-pattern: '**/{branch}'
359
360     publishers:
361       - lf-infra-publish
362
363
364 - job-template:
365     name: 'packaging-test-rpm-master'
366
367     node: centos7-builder-2c-8g
368
369     parameters:
370       - opendaylight-infra-parameters:
371           os-cloud: '{os-cloud}'
372           project: '{project}'
373           branch: '{branch}'
374           refspec: 'refs/heads/{branch}'
375           artifacts: '{archive-artifacts}'
376       - string:
377           name: URL
378           # yamllint disable-line rule:line-length
379           default: 'https://git.opendaylight.org/gerrit/gitweb?p=integration/packaging.git;a=blob_plain;f=packages/rpm/example_repo_configs/opendaylight-8-devel.repo'
380           description: 'Link to .repo or .rpm file'
381
382     scm:
383       - integration-gerrit-scm:
384           basedir: 'packaging'
385           refspec: '$GERRIT_REFSPEC'
386           branch: 'master'
387
388     wrappers:
389       - opendaylight-infra-wrappers:
390           build-timeout: '{build-timeout}'
391
392     builders:
393       - shell: |
394           # Install expect to interact with Karaf shell
395           # Install nmap to check status of ODL's SSH port
396           sudo yum install -y expect nmap
397       - shell: !include-raw-escape: install-rpm.sh
398       - shell: !include-raw: start-odl.sh
399       - shell: !include-raw-escape: test-ports-nofeature.sh
400       - shell: !include-raw: test-karaf-oxygensafe.expect
401       # Disable this test until ODLPARENT-139 is fixed
402       # - shell: !include-raw-escape: test-rest-ok.sh
403       - shell: !include-raw: stop-odl.sh
404       - shell: !include-raw: uninstall-rpm.sh
405
406     publishers:
407       # TODO: Remove the archive publisher
408       #       small data should be stored on logs.opendaylight.org
409       #       large data should be stored on nexus.opendaylight.org
410       - archive:
411           artifacts: '**'
412           allow-empty: true
413           fingerprint: true
414           latest-only: true
415       - lf-infra-publish
416
417
418 - job-template:
419     name: 'packaging-test-rpm-upgrade-master'
420
421     node: centos7-builder-2c-8g
422
423     parameters:
424       - opendaylight-infra-parameters:
425           os-cloud: '{os-cloud}'
426           project: '{project}'
427           branch: '{branch}'
428           refspec: 'refs/heads/{branch}'
429           artifacts: '{archive-artifacts}'
430       - string:
431           name: URL
432           # yamllint disable-line rule:line-length
433           default: 'https://raw.githubusercontent.com/opendaylight/integration-packaging/master/packages/rpm/example_repo_configs/opendaylight-7-release.repo'
434           description: 'Link to .repo or .rpm file'
435       - string:
436           name: UPGRADE_URL
437           # yamllint disable-line rule:line-length
438           default: 'https://raw.githubusercontent.com/opendaylight/integration-packaging/master/packages/rpm/example_repo_configs/opendaylight-7-devel.repo'
439           description: 'Link to .repo or .rpm file'
440
441     scm:
442       - integration-gerrit-scm:
443           basedir: 'packaging'
444           refspec: '$GERRIT_REFSPEC'
445           branch: 'master'
446
447     wrappers:
448       - opendaylight-infra-wrappers:
449           build-timeout: '{build-timeout}'
450
451     builders:
452       - shell: !include-raw-escape: install-rpm.sh
453       - shell: !include-raw: start-odl.sh
454       - shell: |
455           # Install expect to interact with Karaf shell
456           sudo yum install -y expect
457           # Install nmap to check status of ODL's SSH port
458           sudo yum install -y nmap
459       - shell: !include-raw: test-karaf-oxygensafe.expect
460       - shell: !include-raw: stop-odl.sh
461       - shell: !include-raw: test-rpm-upgrade.sh
462       - shell: !include-raw: start-odl.sh
463       - shell: !include-raw: test-karaf-oxygensafe.expect
464       - shell: !include-raw: stop-odl.sh
465       - shell: !include-raw: uninstall-rpm.sh
466
467     publishers:
468       - lf-infra-publish
469
470
471 - job-template:
472     name: 'packaging-test-deb-master'
473
474     node: ubuntu1604-mininet-ovs-25-1c-4g
475
476     parameters:
477       - opendaylight-infra-parameters:
478           os-cloud: '{os-cloud}'
479           project: '{project}'
480           branch: '{branch}'
481           refspec: 'refs/heads/{branch}'
482           artifacts: '{archive-artifacts}'
483       - string:
484           name: PACKAGE
485           default: 'ppa:odl-team/carbon'
486           description: 'Link to .deb package or name of PPA repo'
487
488     scm:
489       - integration-gerrit-scm:
490           basedir: 'packaging'
491           refspec: '$GERRIT_REFSPEC'
492           branch: 'master'
493
494     wrappers:
495       - opendaylight-infra-wrappers:
496           build-timeout: '{build-timeout}'
497
498     builders:
499       - shell: !include-raw: install-deb.sh
500       - shell: !include-raw: start-odl.sh
501       - shell: |
502           # Install expect to interact with Karaf shell
503           sudo apt-get install -y expect
504           # Install nmap to check status of ODL's SSH port
505           sudo apt-get install -y nmap
506       - shell: !include-raw: test-karaf-oxygensafe.expect
507       - shell: !include-raw: stop-odl.sh
508
509     publishers:
510       - lf-infra-publish
511
512
513 - job-template:
514     name: 'packaging-build-deb-{stream}'
515
516     node: ubuntu1604-mininet-ovs-25-1c-4g
517
518     project-type: freestyle
519
520     mvn-opts: ''
521     mvn-params: ''
522     mvn-version: mvn33
523
524     properties:
525       - opendaylight-infra-properties:
526           build-days-to-keep: 7
527
528     parameters:
529       - opendaylight-infra-parameters:
530           os-cloud: '{os-cloud}'
531           project: '{project}'
532           branch: '{branch}'
533           refspec: 'refs/heads/{branch}'
534           artifacts: '{archive-artifacts}'
535       - lf-infra-maven-parameters:
536           mvn-opts: '{mvn-opts}'
537           mvn-params: '{mvn-params}'
538           mvn-version: '{mvn-version}'
539           staging-profile-id: ''
540       - string:
541           name: DOWNLOAD_URL
542           # FIXME: Update the default value to an active stream.
543           # yamllint disable-line rule:line-length
544           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'
545           description: 'URL to ODL tarball artifact to repackage into .deb'
546       - string:
547           name: CHANGELOG_NAME
548           default: 'Jenkins'
549           description: 'Name of person who defined .deb'
550       - string:
551           name: CHANGELOG_EMAIL
552           default: 'jenkins-donotreply@opendaylight.org'
553           description: 'Email of person who defined .deb'
554
555     scm:
556       - integration-gerrit-scm:
557           basedir: 'packaging'
558           refspec: '$GERRIT_REFSPEC'
559           branch: 'master'
560
561     wrappers:
562       - opendaylight-infra-wrappers:
563           build-timeout: '{build-timeout}'
564
565     builders:
566       - shell: !include-raw: build-deb.sh
567       - lf-infra-deploy-maven-file:
568           global-settings-file: 'global-settings'
569           settings-file: 'packaging-settings'
570           mvn-version: '{mvn-version}'
571           repo-id: 'opendaylight-{stream}-ubuntu-1604-x86_64-devel'
572           group-id: '{group-id}'
573           upload-files-dir: '{upload-files-dir}'
574           maven-repo-url: '{maven-repo-url}'
575
576     publishers:
577       - lf-infra-publish