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