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