Merge "Use printf over echo for adding newlines"
[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       - inject:
224           properties-content: 'STREAM=oxygen'
225       - shell: !include-raw: build-rpm-snap.sh
226       - install-test-uninstall-rpm
227
228     triggers:
229       - gerrit:
230           server-name: '{gerrit-server-name}'
231           trigger-on:
232             - comment-added-contains-event:
233                 comment-contains-value: 'rpm-verify'
234           projects:
235             - project-compare-type: ANT
236               project-pattern: '{project}'
237               branches:
238                 - branch-compare-type: ANT
239                   branch-pattern: '**/{branch}'
240               file-paths:
241                 - compare-type: ANT
242                   pattern: 'packages/**'
243
244     publishers:
245       - lf-infra-publish
246
247
248 - job-template:
249     name: 'packaging-verify-full-rpm-master'
250
251     node: centos7-builder-2c-8g
252
253     project-type: freestyle
254
255     parameters:
256       - opendaylight-infra-parameters:
257           os-cloud: '{os-cloud}'
258           project: '{project}'
259           branch: '{branch}'
260           refspec: 'refs/heads/{branch}'
261           artifacts: '{archive-artifacts}'
262
263     scm:
264       - integration-gerrit-scm:
265           basedir: 'packaging'
266           refspec: '$GERRIT_REFSPEC'
267           branch: 'master'
268
269     wrappers:
270       - opendaylight-infra-wrappers:
271           build-timeout: '{build-timeout}'
272
273     builders:
274       # Test Carbon SR2 tarball
275       - inject:
276           # yamllint disable-line rule:line-length
277           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'
278       - shell: !include-raw-escape: build-rpm.sh
279       - install-test-uninstall-rpm
280
281       # Test Carbon multipatch zip (no parallel tarball available)
282       # NB: This will need to be updated as old builds expire
283       - inject:
284           # yamllint disable-line rule:line-length
285           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'
286       - shell: !include-raw-escape: build-rpm.sh
287       - install-test-uninstall-rpm
288
289       # Test latest Carbon snapshot
290       - inject:
291           properties-content: 'STREAM=carbon'
292       - shell: !include-raw: build-rpm-snap.sh
293       - install-test-uninstall-rpm
294
295       # Test Nitrogen tarball
296       - inject:
297           # yamllint disable-line rule:line-length
298           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'
299       - shell: !include-raw-escape: build-rpm.sh
300       - install-test-uninstall-rpm
301
302       # Test Nitrogen SR1 tarball
303       - inject:
304           # yamllint disable-line rule:line-length
305           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'
306       - shell: !include-raw-escape: build-rpm.sh
307       - install-test-uninstall-rpm
308
309       # Test Nitrogen multipatch zip (no parallel tarball available)
310       # NB: This will need to be updated as old builds expire
311       - inject:
312           # yamllint disable-line rule:line-length
313           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'
314       - shell: !include-raw-escape: build-rpm.sh
315       - install-test-uninstall-rpm
316
317       # Test latest Nitrogen snapshot
318       - inject:
319           properties-content: 'STREAM=nitrogen'
320       - shell: !include-raw: build-rpm-snap.sh
321       - install-test-uninstall-rpm
322
323       # Test Oxygen pre-release autorelease tarball
324       # FIXME: There aren't any available Oxygen autorelease builds, add one once possible
325       # FIXME: Oxygen tests fail due to jira.opendaylight.org/browse/ODLPARENT-139
326       # NB: This will need to be updated as old builds expire
327       # - inject:
328       # yamllint disable-line rule:line-length
329       #    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'
330       # - shell: !include-raw-escape: build-rpm.sh
331       # - install-test-uninstall-rpm
332
333       # Test Oxygen multipatch zip (no parallel tarball available)
334       # FIXME: Oxygen tests fail due to jira.opendaylight.org/browse/ODLPARENT-139
335       # NB: This will need to be updated as old builds expire
336       # - inject:
337       # yamllint disable-line rule:line-length
338       #     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'
339       # - shell: !include-raw: build-rpm.sh
340       # - install-test-uninstall-rpm
341
342       # Test latest Oxygen snapshot
343       - inject:
344           properties-content: 'STREAM=oxygen'
345       - shell: !include-raw: build-rpm-snap.sh
346       - install-test-uninstall-rpm
347
348     triggers:
349       - timed: '@daily'
350       - gerrit:
351           server-name: '{gerrit-server-name}'
352           trigger-on:
353             - comment-added-contains-event:
354                 comment-contains-value: 'verify-rpm-full'
355           projects:
356             - project-compare-type: ANT
357               project-pattern: '{project}'
358               branches:
359                 - branch-compare-type: ANT
360                   branch-pattern: '**/{branch}'
361
362     publishers:
363       - lf-infra-publish
364
365
366 - job-template:
367     name: 'packaging-test-rpm-master'
368
369     node: centos7-builder-2c-8g
370
371     parameters:
372       - opendaylight-infra-parameters:
373           os-cloud: '{os-cloud}'
374           project: '{project}'
375           branch: '{branch}'
376           refspec: 'refs/heads/{branch}'
377           artifacts: '{archive-artifacts}'
378       - string:
379           name: URL
380           # yamllint disable-line rule:line-length
381           default: 'https://git.opendaylight.org/gerrit/gitweb?p=integration/packaging.git;a=blob_plain;f=packages/rpm/example_repo_configs/opendaylight-8-devel.repo'
382           description: 'Link to .repo or .rpm file'
383
384     scm:
385       - integration-gerrit-scm:
386           basedir: 'packaging'
387           refspec: '$GERRIT_REFSPEC'
388           branch: 'master'
389
390     wrappers:
391       - opendaylight-infra-wrappers:
392           build-timeout: '{build-timeout}'
393
394     builders:
395       - shell: |
396           # Install expect to interact with Karaf shell
397           # Install nmap to check status of ODL's SSH port
398           sudo yum install -y expect nmap
399       - shell: !include-raw-escape: install-rpm.sh
400       - shell: !include-raw: start-odl.sh
401       - shell: !include-raw-escape: test-ports-nofeature.sh
402       - shell: !include-raw: test-karaf-oxygensafe.expect
403       # Disable this test until ODLPARENT-139 is fixed
404       # - shell: !include-raw-escape: test-rest-ok.sh
405       - shell: !include-raw: stop-odl.sh
406       - shell: !include-raw: uninstall-rpm.sh
407
408     publishers:
409       # TODO: Remove the archive publisher
410       #       small data should be stored on logs.opendaylight.org
411       #       large data should be stored on nexus.opendaylight.org
412       - archive:
413           artifacts: '**'
414           allow-empty: true
415           fingerprint: true
416           latest-only: true
417       - lf-infra-publish
418
419
420 - job-template:
421     name: 'packaging-test-rpm-upgrade-master'
422
423     node: centos7-builder-2c-8g
424
425     parameters:
426       - opendaylight-infra-parameters:
427           os-cloud: '{os-cloud}'
428           project: '{project}'
429           branch: '{branch}'
430           refspec: 'refs/heads/{branch}'
431           artifacts: '{archive-artifacts}'
432       - string:
433           name: URL
434           # yamllint disable-line rule:line-length
435           default: 'https://raw.githubusercontent.com/opendaylight/integration-packaging/master/packages/rpm/example_repo_configs/opendaylight-7-release.repo'
436           description: 'Link to .repo or .rpm file'
437       - string:
438           name: UPGRADE_URL
439           # yamllint disable-line rule:line-length
440           default: 'https://raw.githubusercontent.com/opendaylight/integration-packaging/master/packages/rpm/example_repo_configs/opendaylight-7-devel.repo'
441           description: 'Link to .repo or .rpm file'
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-escape: install-rpm.sh
455       - shell: !include-raw: start-odl.sh
456       - shell: |
457           # Install expect to interact with Karaf shell
458           sudo yum install -y expect
459           # Install nmap to check status of ODL's SSH port
460           sudo yum install -y nmap
461       - shell: !include-raw: test-karaf-oxygensafe.expect
462       - shell: !include-raw: stop-odl.sh
463       - shell: !include-raw: test-rpm-upgrade.sh
464       - shell: !include-raw: start-odl.sh
465       - shell: !include-raw: test-karaf-oxygensafe.expect
466       - shell: !include-raw: stop-odl.sh
467       - shell: !include-raw: uninstall-rpm.sh
468
469     publishers:
470       - lf-infra-publish
471
472
473 - job-template:
474     name: 'packaging-test-deb-master'
475
476     node: ubuntu1604-mininet-ovs-25-1c-4g
477
478     parameters:
479       - opendaylight-infra-parameters:
480           os-cloud: '{os-cloud}'
481           project: '{project}'
482           branch: '{branch}'
483           refspec: 'refs/heads/{branch}'
484           artifacts: '{archive-artifacts}'
485       - string:
486           name: PACKAGE
487           default: 'ppa:odl-team/carbon'
488           description: 'Link to .deb package or name of PPA repo'
489
490     scm:
491       - integration-gerrit-scm:
492           basedir: 'packaging'
493           refspec: '$GERRIT_REFSPEC'
494           branch: 'master'
495
496     wrappers:
497       - opendaylight-infra-wrappers:
498           build-timeout: '{build-timeout}'
499
500     builders:
501       - shell: !include-raw: install-deb.sh
502       - shell: !include-raw: start-odl.sh
503       - shell: |
504           # Install expect to interact with Karaf shell
505           sudo apt-get install -y expect
506           # Install nmap to check status of ODL's SSH port
507           sudo apt-get install -y nmap
508       - shell: !include-raw: test-karaf-oxygensafe.expect
509       - shell: !include-raw: stop-odl.sh
510
511     publishers:
512       - lf-infra-publish
513
514
515 - job-template:
516     name: 'packaging-build-deb-{stream}'
517
518     node: ubuntu1604-mininet-ovs-25-1c-4g
519
520     project-type: freestyle
521
522     mvn-opts: ''
523     mvn-params: ''
524     mvn-version: mvn33
525
526     properties:
527       - opendaylight-infra-properties:
528           build-days-to-keep: 7
529
530     parameters:
531       - opendaylight-infra-parameters:
532           os-cloud: '{os-cloud}'
533           project: '{project}'
534           branch: '{branch}'
535           refspec: 'refs/heads/{branch}'
536           artifacts: '{archive-artifacts}'
537       - lf-infra-maven-parameters:
538           mvn-opts: '{mvn-opts}'
539           mvn-params: '{mvn-params}'
540           mvn-version: '{mvn-version}'
541           staging-profile-id: ''
542       - string:
543           name: DOWNLOAD_URL
544           # FIXME: Update the default value to an active stream.
545           # yamllint disable-line rule:line-length
546           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'
547           description: 'URL to ODL tarball artifact to repackage into .deb'
548       - string:
549           name: CHANGELOG_NAME
550           default: 'Jenkins'
551           description: 'Name of person who defined .deb'
552       - string:
553           name: CHANGELOG_EMAIL
554           default: 'jenkins-donotreply@opendaylight.org'
555           description: 'Email of person who defined .deb'
556
557     scm:
558       - integration-gerrit-scm:
559           basedir: 'packaging'
560           refspec: '$GERRIT_REFSPEC'
561           branch: 'master'
562
563     wrappers:
564       - opendaylight-infra-wrappers:
565           build-timeout: '{build-timeout}'
566
567     builders:
568       - shell: !include-raw: build-deb.sh
569       - lf-infra-deploy-maven-file:
570           global-settings-file: 'global-settings'
571           settings-file: 'packaging-settings'
572           mvn-version: '{mvn-version}'
573           repo-id: 'opendaylight-{stream}-ubuntu-1604-x86_64-devel'
574           group-id: '{group-id}'
575           upload-files-dir: '{upload-files-dir}'
576           maven-repo-url: '{maven-repo-url}'
577
578     publishers:
579       - lf-infra-publish