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