Update builds used in RPM tests
[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.4/karaf-0.8.4.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       - lf-infra-pre-build
165       - inject:
166           properties-content: |
167               STREAM={stream}
168               DISTRO={distro}
169       - shell: !include-raw: build-rpm-snap-docker.sh
170       - shell: !include-raw: test-rpm-docker.sh
171       - lf-infra-deploy-maven-file:
172           global-settings-file: 'global-settings'
173           settings-file: 'packaging-settings'
174           mvn-version: '{mvn-version}'
175           repo-id: 'opendaylight-{stream}-{distro}-x86_64-devel'
176           group-id: '{group-id}'
177           upload-files-dir: '{upload-files-dir}'
178           maven-repo-url: '{maven-repo-url}'
179
180     triggers:
181       - timed: '@daily'
182
183     publishers:
184       - lf-infra-publish
185
186
187 - job-template:
188     name: 'packaging-verify-rpm-master'
189
190     node: centos7-builder-2c-2g
191
192     project-type: freestyle
193
194     parameters:
195       - opendaylight-infra-parameters:
196           os-cloud: '{os-cloud}'
197           project: '{project}'
198           branch: '{branch}'
199           refspec: 'refs/heads/{branch}'
200           artifacts: '{archive-artifacts}'
201
202     scm:
203       - integration-gerrit-scm:
204           basedir: 'packaging'
205           refspec: '$GERRIT_REFSPEC'
206           branch: 'master'
207
208     wrappers:
209       - opendaylight-infra-wrappers:
210           build-timeout: '{build-timeout}'
211
212     builders:
213       # Test Oxygen SR4 release tarball
214       - inject:
215           # yamllint disable-line rule:line-length
216           properties-content: 'DOWNLOAD_URL=https://nexus.opendaylight.org/content/repositories/opendaylight.release/org/opendaylight/integration/karaf/0.8.4/karaf-0.8.4.tar.gz'
217       - shell: !include-raw-escape: build-rpm.sh
218       - install-test-uninstall-rpm
219
220       # Test Fluorine ('Managed Release Common Distro') release tarball
221       - inject:
222           # yamllint disable-line rule:line-length
223           properties-content: 'DOWNLOAD_URL=https://nexus.opendaylight.org/content/repositories/public/org/opendaylight/integration/opendaylight/0.9.0/opendaylight-0.9.0.tar.gz'
224       - shell: !include-raw-escape: build-rpm.sh
225       - install-test-uninstall-rpm
226
227       # Test Fluorine SR1 release tarball
228       - inject:
229           # yamllint disable-line rule:line-length
230           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'
231       - shell: !include-raw-escape: build-rpm.sh
232       - install-test-uninstall-rpm
233
234       # Test Neon pre-release autorelease tarball
235       # NB: This will need to be updated as old builds expire
236       - inject:
237           # yamllint disable-line rule:line-length
238           properties-content: 'DOWNLOAD_URL=https://nexus.opendaylight.org/content/repositories/autorelease-2569/org/opendaylight/integration/karaf/0.10.0/karaf-0.10.0.tar.gz'
239       - shell: !include-raw-escape: build-rpm.sh
240       - install-test-uninstall-rpm
241
242       # Test Neon multipatch zip (no parallel tarball available)
243       # NB: This will need to be updated as old builds expire
244       - inject:
245           # yamllint disable-line rule:line-length
246           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-20181208.003609-30.zip'
247       - shell: !include-raw-escape: build-rpm.sh
248       - install-test-uninstall-rpm
249
250       # Test latest Neon snapshot
251       - inject:
252           properties-content: 'STREAM=neon'
253       - shell: !include-raw: build-rpm-snap.sh
254       - install-test-uninstall-rpm
255
256     triggers:
257       - timed: '@weekly'
258       - gerrit-trigger-patch-submitted:
259           gerrit-server-name: '{gerrit-server-name}'
260           project: '{project}'
261           branch: '{branch}'
262           files: 'packages/**'
263           forbidden-files: ''
264
265     publishers:
266       - lf-infra-publish
267
268
269 - job-template:
270     name: 'packaging-verify-full-rpm-master'
271
272     node: centos7-builder-2c-2g
273
274     project-type: freestyle
275
276     parameters:
277       - opendaylight-infra-parameters:
278           os-cloud: '{os-cloud}'
279           project: '{project}'
280           branch: '{branch}'
281           refspec: 'refs/heads/{branch}'
282           artifacts: '{archive-artifacts}'
283
284     scm:
285       - integration-gerrit-scm:
286           basedir: 'packaging'
287           refspec: '$GERRIT_REFSPEC'
288           branch: 'master'
289
290     wrappers:
291       - opendaylight-infra-wrappers:
292           build-timeout: '{build-timeout}'
293
294     builders:
295       # Test Oxygen SR4 release 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.8.4/karaf-0.8.4.tar.gz'
299       - shell: !include-raw-escape: build-rpm.sh
300       - install-test-uninstall-rpm
301
302       # Test Oxygen pre-release autorelease tarball
303       # NB: This will need to be updated as old builds expire
304       - inject:
305           # yamllint disable-line rule:line-length
306           properties-content: 'DOWNLOAD_URL=https://nexus.opendaylight.org/content/repositories/autorelease-2571/org/opendaylight/integration/karaf/0.8.4/karaf-0.8.4.tar.gz'
307       - shell: !include-raw-escape: build-rpm.sh
308       - install-test-uninstall-rpm
309
310       # Test latest Oxygen snapshot
311       - inject:
312           properties-content: 'STREAM=oxygen'
313       - shell: !include-raw: build-rpm-snap.sh
314       - install-test-uninstall-rpm
315
316       # Test Fluorine ('Managed Release Common Distro') release tarball
317       - inject:
318           # yamllint disable-line rule:line-length
319           properties-content: 'DOWNLOAD_URL=https://nexus.opendaylight.org/content/repositories/public/org/opendaylight/integration/opendaylight/0.9.0/opendaylight-0.9.0.tar.gz'
320       - shell: !include-raw-escape: build-rpm.sh
321       - install-test-uninstall-rpm
322
323       # Test Fluorine SR1 release tarball
324       - inject:
325           # yamllint disable-line rule:line-length
326           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'
327       - shell: !include-raw-escape: build-rpm.sh
328       - install-test-uninstall-rpm
329
330       # Test Fluorine pre-release autorelease tarball
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/autorelease-2570/org/opendaylight/integration/karaf/0.9.2/karaf-0.9.2.tar.gz'
335       - shell: !include-raw-escape: build-rpm.sh
336       - install-test-uninstall-rpm
337
338       # Test Fluorine multipatch zip (no parallel tarball available)
339       # NB: This will need to be updated as old builds expire
340       - inject:
341           # yamllint disable-line rule:line-length
342           properties-content: 'DOWNLOAD_URL=https://nexus.opendaylight.org/content/repositories/opendaylight.snapshot/org/opendaylight/integration/integration/distribution/karaf/0.9.2-SNAPSHOT/karaf-0.9.2-20181201.152658-5.zip'
343       - shell: !include-raw-escape: build-rpm.sh
344       - install-test-uninstall-rpm
345
346       # Test latest Fluorine snapshot
347       - inject:
348           properties-content: 'STREAM=fluorine'
349       - shell: !include-raw: build-rpm-snap.sh
350       - install-test-uninstall-rpm
351
352       # Test Neon pre-release autorelease tarball
353       # NB: This will need to be updated as old builds expire
354       - inject:
355           # yamllint disable-line rule:line-length
356           properties-content: 'DOWNLOAD_URL=https://nexus.opendaylight.org/content/repositories/autorelease-2569/org/opendaylight/integration/karaf/0.10.0/karaf-0.10.0.tar.gz'
357       - shell: !include-raw-escape: build-rpm.sh
358       - install-test-uninstall-rpm
359
360       # Test Neon multipatch zip (no parallel tarball available)
361       # NB: This will need to be updated as old builds expire
362       - inject:
363           # yamllint disable-line rule:line-length
364           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-20181208.003609-30.zip'
365       - shell: !include-raw-escape: build-rpm.sh
366       - install-test-uninstall-rpm
367
368       # Test latest Neon snapshot
369       - inject:
370           properties-content: 'STREAM=neon'
371       - shell: !include-raw: build-rpm-snap.sh
372       - install-test-uninstall-rpm
373
374     triggers:
375       - timed: '@weekly'
376       - gerrit:
377           server-name: '{gerrit-server-name}'
378           trigger-on:
379             - comment-added-contains-event:
380                 comment-contains-value: 'verify-rpm-full'
381           projects:
382             - project-compare-type: ANT
383               project-pattern: '{project}'
384               branches:
385                 - branch-compare-type: ANT
386                   branch-pattern: '**/{branch}'
387
388     publishers:
389       - lf-infra-publish
390
391
392 - job-template:
393     name: 'packaging-test-rpm-master'
394
395     node: centos7-builder-2c-2g
396
397     parameters:
398       - opendaylight-infra-parameters:
399           os-cloud: '{os-cloud}'
400           project: '{project}'
401           branch: '{branch}'
402           refspec: 'refs/heads/{branch}'
403           artifacts: '{archive-artifacts}'
404       - string:
405           name: URL
406           # yamllint disable-line rule:line-length
407           default: 'https://git.opendaylight.org/gerrit/gitweb?p=integration/packaging.git;a=blob_plain;f=packages/rpm/example_repo_configs/opendaylight-9-devel.repo'
408           description: 'Link to .repo or .rpm file'
409
410     scm:
411       - integration-gerrit-scm:
412           basedir: 'packaging'
413           refspec: '$GERRIT_REFSPEC'
414           branch: 'master'
415
416     wrappers:
417       - opendaylight-infra-wrappers:
418           build-timeout: '{build-timeout}'
419
420     builders:
421       - shell: |
422           # Install expect to interact with Karaf shell
423           # Install nmap to check status of ODL's SSH port
424           sudo yum install -y expect nmap
425       - shell: !include-raw-escape: install-rpm.sh
426       - shell: !include-raw: start-odl.sh
427       - shell: !include-raw-escape: test-ports-nofeature.sh
428       - shell: !include-raw: test-karaf-oxygensafe.expect
429       # Disable this test until ODLPARENT-139 is fixed
430       # - shell: !include-raw-escape: test-rest-ok.sh
431       - shell: !include-raw: stop-odl.sh
432       - shell: !include-raw: uninstall-rpm.sh
433
434     triggers:
435       - timed: '@monthly'
436
437     publishers:
438       # TODO: Remove the archive publisher
439       #       small data should be stored on logs.opendaylight.org
440       #       large data should be stored on nexus.opendaylight.org
441       - archive:
442           artifacts: '**'
443           allow-empty: true
444           fingerprint: true
445           latest-only: true
446       - lf-infra-publish
447
448
449 - job-template:
450     name: 'packaging-test-rpm-upgrade-master'
451
452     node: centos7-builder-2c-2g
453
454     parameters:
455       - opendaylight-infra-parameters:
456           os-cloud: '{os-cloud}'
457           project: '{project}'
458           branch: '{branch}'
459           refspec: 'refs/heads/{branch}'
460           artifacts: '{archive-artifacts}'
461
462     scm:
463       - integration-gerrit-scm:
464           basedir: 'packaging'
465           refspec: '$GERRIT_REFSPEC'
466           branch: 'master'
467
468     wrappers:
469       - opendaylight-infra-wrappers:
470           build-timeout: '{build-timeout}'
471
472     builders:
473       # Tests (current and future):
474       #   * Install latest release, stop/uninstall, install latest CD
475       #   * Upgrade from latest release latest CD
476       #   * TODO: Upgrade from latest release to proposed packaging/** logic
477       #   * TODO: Upgrade from CD to proposed packaging/** logic
478       #   * TODO: Upgrade from proposed packaging/** logic (older ODL) to
479       #     proposed packaging logic (latest ODL)
480
481       # Test 1: Install latest release, stop/uninstall, install latest CD
482       - inject:
483           # yamllint disable-line rule:line-length
484           properties-content: 'URL=https://raw.githubusercontent.com/opendaylight/integration-packaging/master/packages/rpm/example_repo_configs/opendaylight-90-release.repo'
485       - install-start-test-stop-uninstall-rpm
486       - inject:
487           # yamllint disable-line rule:line-length
488           properties-content: 'URL=https://raw.githubusercontent.com/opendaylight/integration-packaging/master/packages/rpm/example_repo_configs/opendaylight-9-devel.repo'
489       - install-start-test-stop-uninstall-rpm
490
491       # Test 2: Install latest release, stop, upgrade to latest CD
492       - inject:
493           # yamllint disable-line rule:line-length
494           properties-content: 'URL=https://raw.githubusercontent.com/opendaylight/integration-packaging/master/packages/rpm/example_repo_configs/opendaylight-90-release.repo'
495       - install-start-test-stop-rpm
496       - inject:
497           # yamllint disable-line rule:line-length
498           properties-content: 'REPO_CFG_FILE_URL=https://raw.githubusercontent.com/opendaylight/integration-packaging/master/packages/rpm/example_repo_configs/opendaylight-9-devel.repo'
499       - installrepcfg-upgrade-start-test-stop-rpm
500
501     triggers:
502       - timed: '@weekly'
503       - gerrit-trigger-patch-submitted:
504           gerrit-server-name: '{gerrit-server-name}'
505           project: '{project}'
506           branch: '{branch}'
507           files: 'packages/**'
508           forbidden-files: ''
509
510     publishers:
511       - lf-infra-publish
512
513
514 - job-template:
515     name: 'packaging-test-deb-master'
516
517     node: ubuntu1604-mininet-ovs-25-1c-4g
518
519     parameters:
520       - opendaylight-infra-parameters:
521           os-cloud: '{os-cloud}'
522           project: '{project}'
523           branch: '{branch}'
524           refspec: 'refs/heads/{branch}'
525           artifacts: '{archive-artifacts}'
526       - string:
527           name: PACKAGE
528           default: 'ppa:odl-team/oxygen'
529           description: 'Link to .deb package or name of PPA repo'
530
531     scm:
532       - integration-gerrit-scm:
533           basedir: 'packaging'
534           refspec: '$GERRIT_REFSPEC'
535           branch: 'master'
536
537     wrappers:
538       - opendaylight-infra-wrappers:
539           build-timeout: '{build-timeout}'
540
541     builders:
542       - shell: !include-raw-escape: install-deb.sh
543       - shell: !include-raw: start-odl.sh
544       - shell: !include-raw-escape: test-ports-nofeature.sh
545       - shell: |
546           # Install expect to interact with Karaf shell
547           # Install nmap to check status of ODL's SSH port
548           sudo apt-get install -y expect nmap
549       - shell: !include-raw: test-karaf-oxygensafe.expect
550       # Disable this test until ODLPARENT-139 is fixed
551       # - shell: !include-raw-escape: test-rest-ok.sh
552       - shell: !include-raw: stop-odl.sh
553       - shell: !include-raw-escape: uninstall-deb.sh
554
555     triggers:
556       - timed: '@monthly'
557
558     publishers:
559       - lf-infra-publish
560
561
562 - job-template:
563     name: 'packaging-build-deb-{stream}'
564
565     node: ubuntu1604-mininet-ovs-25-1c-4g
566
567     project-type: freestyle
568
569     mvn-opts: ''
570     mvn-params: ''
571     mvn-version: mvn33
572
573     properties:
574       - opendaylight-infra-properties:
575           build-days-to-keep: 7
576
577     parameters:
578       - opendaylight-infra-parameters:
579           os-cloud: '{os-cloud}'
580           project: '{project}'
581           branch: '{branch}'
582           refspec: 'refs/heads/{branch}'
583           artifacts: '{archive-artifacts}'
584       - lf-infra-maven-parameters:
585           mvn-opts: '{mvn-opts}'
586           mvn-params: '{mvn-params}'
587           mvn-version: '{mvn-version}'
588           staging-profile-id: ''
589       - string:
590           name: DOWNLOAD_URL
591           # FIXME: Update the default value to an active stream.
592           # yamllint disable-line rule:line-length
593           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'
594           description: 'URL to ODL tarball artifact to repackage into .deb'
595       - string:
596           name: CHANGELOG_NAME
597           default: 'Jenkins'
598           description: 'Name of person who defined .deb'
599       - string:
600           name: CHANGELOG_EMAIL
601           default: 'jenkins-donotreply@opendaylight.org'
602           description: 'Email of person who defined .deb'
603       - string:
604           name: PKG_VERSION_OVERRIDE
605           default: ''
606           description: 'Override autodetected package component of RPM version (maj.min.pat-pkg)'
607
608     scm:
609       - integration-gerrit-scm:
610           basedir: 'packaging'
611           refspec: '$GERRIT_REFSPEC'
612           branch: 'master'
613
614     wrappers:
615       - opendaylight-infra-wrappers:
616           build-timeout: '{build-timeout}'
617
618     builders:
619       - lf-infra-pre-build
620       - shell: !include-raw: build-deb.sh
621       - install-test-uninstall-deb
622       - lf-infra-deploy-maven-file:
623           global-settings-file: 'global-settings'
624           settings-file: 'packaging-settings'
625           mvn-version: '{mvn-version}'
626           repo-id: 'opendaylight-{stream}-ubuntu-1604-x86_64-devel'
627           group-id: '{group-id}'
628           upload-files-dir: '{upload-files-dir}'
629           maven-repo-url: '{maven-repo-url}'
630
631     triggers:
632       - timed: '@monthly'
633
634     publishers:
635       - lf-infra-publish
636
637 - project:
638     name: packaging-view
639     views:
640       - project-view
641     project-name: packaging