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