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