Allow pushing to scratch repos from sandbox
[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-8g
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-8g
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-8g
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-2209/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-20180620.055735-63.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:
243           server-name: '{gerrit-server-name}'
244           trigger-on:
245             - comment-added-contains-event:
246                 comment-contains-value: 'rpm-verify'
247           projects:
248             - project-compare-type: ANT
249               project-pattern: '{project}'
250               branches:
251                 - branch-compare-type: ANT
252                   branch-pattern: '**/{branch}'
253               file-paths:
254                 - compare-type: ANT
255                   pattern: 'packages/**'
256
257     publishers:
258       - lf-infra-publish
259
260
261 - job-template:
262     name: 'packaging-verify-full-rpm-master'
263
264     node: centos7-builder-2c-8g
265
266     project-type: freestyle
267
268     parameters:
269       - opendaylight-infra-parameters:
270           os-cloud: '{os-cloud}'
271           project: '{project}'
272           branch: '{branch}'
273           refspec: 'refs/heads/{branch}'
274           artifacts: '{archive-artifacts}'
275
276     scm:
277       - integration-gerrit-scm:
278           basedir: 'packaging'
279           refspec: '$GERRIT_REFSPEC'
280           branch: 'master'
281
282     wrappers:
283       - opendaylight-infra-wrappers:
284           build-timeout: '{build-timeout}'
285
286     builders:
287       # Test Oxygen SR2 release 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.8.2/karaf-0.8.2.tar.gz'
291       - shell: !include-raw-escape: build-rpm.sh
292       - install-test-uninstall-rpm
293
294       # Test Oxygen pre-release autorelease tarball
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/autorelease-2210/org/opendaylight/integration/karaf/0.8.3/karaf-0.8.3.tar.gz'
299       - shell: !include-raw-escape: build-rpm.sh
300       - install-test-uninstall-rpm
301
302       # Test Oxygen multipatch zip (no parallel tarball available)
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/opendaylight.snapshot/org/opendaylight/integration/integration/distribution/karaf/0.8.3-SNAPSHOT/karaf-0.8.3-20180620.173319-5.zip'
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 pre-release autorelease tarball
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/autorelease-2209/org/opendaylight/integration/karaf/0.9.0/karaf-0.9.0.tar.gz'
321       - shell: !include-raw-escape: build-rpm.sh
322       - install-test-uninstall-rpm
323
324       # Test Fluorine multipatch zip (no parallel tarball available)
325       # NB: This will need to be updated as old builds expire
326       - inject:
327           # yamllint disable-line rule:line-length
328           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-20180620.055735-63.zip'
329       - shell: !include-raw-escape: build-rpm.sh
330       - install-test-uninstall-rpm
331
332       # Test latest Fluorine snapshot
333       - inject:
334           properties-content: 'STREAM=fluorine'
335       - shell: !include-raw: build-rpm-snap.sh
336       - install-test-uninstall-rpm
337
338     triggers:
339       - timed: '@daily'
340       - gerrit:
341           server-name: '{gerrit-server-name}'
342           trigger-on:
343             - comment-added-contains-event:
344                 comment-contains-value: 'verify-rpm-full'
345           projects:
346             - project-compare-type: ANT
347               project-pattern: '{project}'
348               branches:
349                 - branch-compare-type: ANT
350                   branch-pattern: '**/{branch}'
351
352     publishers:
353       - lf-infra-publish
354
355
356 - job-template:
357     name: 'packaging-test-rpm-master'
358
359     node: centos7-builder-2c-8g
360
361     parameters:
362       - opendaylight-infra-parameters:
363           os-cloud: '{os-cloud}'
364           project: '{project}'
365           branch: '{branch}'
366           refspec: 'refs/heads/{branch}'
367           artifacts: '{archive-artifacts}'
368       - string:
369           name: URL
370           # yamllint disable-line rule:line-length
371           default: 'https://git.opendaylight.org/gerrit/gitweb?p=integration/packaging.git;a=blob_plain;f=packages/rpm/example_repo_configs/opendaylight-9-devel.repo'
372           description: 'Link to .repo or .rpm file'
373
374     scm:
375       - integration-gerrit-scm:
376           basedir: 'packaging'
377           refspec: '$GERRIT_REFSPEC'
378           branch: 'master'
379
380     wrappers:
381       - opendaylight-infra-wrappers:
382           build-timeout: '{build-timeout}'
383
384     builders:
385       - shell: |
386           # Install expect to interact with Karaf shell
387           # Install nmap to check status of ODL's SSH port
388           sudo yum install -y expect nmap
389       - shell: !include-raw-escape: install-rpm.sh
390       - shell: !include-raw: start-odl.sh
391       - shell: !include-raw-escape: test-ports-nofeature.sh
392       - shell: !include-raw: test-karaf-oxygensafe.expect
393       # Disable this test until ODLPARENT-139 is fixed
394       # - shell: !include-raw-escape: test-rest-ok.sh
395       - shell: !include-raw: stop-odl.sh
396       - shell: !include-raw: uninstall-rpm.sh
397
398     publishers:
399       # TODO: Remove the archive publisher
400       #       small data should be stored on logs.opendaylight.org
401       #       large data should be stored on nexus.opendaylight.org
402       - archive:
403           artifacts: '**'
404           allow-empty: true
405           fingerprint: true
406           latest-only: true
407       - lf-infra-publish
408
409
410 - job-template:
411     name: 'packaging-test-rpm-upgrade-master'
412
413     node: centos7-builder-2c-8g
414
415     parameters:
416       - opendaylight-infra-parameters:
417           os-cloud: '{os-cloud}'
418           project: '{project}'
419           branch: '{branch}'
420           refspec: 'refs/heads/{branch}'
421           artifacts: '{archive-artifacts}'
422       - string:
423           name: URL
424           # yamllint disable-line rule:line-length
425           default: 'https://raw.githubusercontent.com/opendaylight/integration-packaging/master/packages/rpm/example_repo_configs/opendaylight-8-release.repo'
426           description: 'Link to .repo or .rpm file'
427       - string:
428           name: UPGRADE_URL
429           # yamllint disable-line rule:line-length
430           default: 'https://raw.githubusercontent.com/opendaylight/integration-packaging/master/packages/rpm/example_repo_configs/opendaylight-8-devel.repo'
431           description: 'Link to .repo or .rpm file'
432
433     scm:
434       - integration-gerrit-scm:
435           basedir: 'packaging'
436           refspec: '$GERRIT_REFSPEC'
437           branch: 'master'
438
439     wrappers:
440       - opendaylight-infra-wrappers:
441           build-timeout: '{build-timeout}'
442
443     builders:
444       - shell: !include-raw-escape: install-rpm.sh
445       - shell: !include-raw: start-odl.sh
446       - shell: |
447           # Install expect to interact with Karaf shell
448           sudo yum install -y expect
449           # Install nmap to check status of ODL's SSH port
450           sudo yum install -y nmap
451       - shell: !include-raw: test-karaf-oxygensafe.expect
452       - shell: !include-raw: stop-odl.sh
453       - shell: !include-raw: test-rpm-upgrade.sh
454       - shell: !include-raw: start-odl.sh
455       - shell: !include-raw: test-karaf-oxygensafe.expect
456       - shell: !include-raw: stop-odl.sh
457       - shell: !include-raw: uninstall-rpm.sh
458
459     publishers:
460       - lf-infra-publish
461
462
463 - job-template:
464     name: 'packaging-test-deb-master'
465
466     node: ubuntu1604-mininet-ovs-25-1c-4g
467
468     parameters:
469       - opendaylight-infra-parameters:
470           os-cloud: '{os-cloud}'
471           project: '{project}'
472           branch: '{branch}'
473           refspec: 'refs/heads/{branch}'
474           artifacts: '{archive-artifacts}'
475       - string:
476           name: PACKAGE
477           default: 'ppa:odl-team/oxygen'
478           description: 'Link to .deb package or name of PPA repo'
479
480     scm:
481       - integration-gerrit-scm:
482           basedir: 'packaging'
483           refspec: '$GERRIT_REFSPEC'
484           branch: 'master'
485
486     wrappers:
487       - opendaylight-infra-wrappers:
488           build-timeout: '{build-timeout}'
489
490     builders:
491       - shell: !include-raw-escape: install-deb.sh
492       - shell: !include-raw: start-odl.sh
493       - shell: !include-raw-escape: test-ports-nofeature.sh
494       - shell: |
495           # Install expect to interact with Karaf shell
496           # Install nmap to check status of ODL's SSH port
497           sudo apt-get install -y expect nmap
498       - shell: !include-raw: test-karaf-oxygensafe.expect
499       # Disable this test until ODLPARENT-139 is fixed
500       # - shell: !include-raw-escape: test-rest-ok.sh
501       - shell: !include-raw: stop-odl.sh
502       - shell: !include-raw-escape: uninstall-deb.sh
503
504     publishers:
505       - lf-infra-publish
506
507
508 - job-template:
509     name: 'packaging-build-deb-{stream}'
510
511     node: ubuntu1604-mininet-ovs-25-1c-4g
512
513     project-type: freestyle
514
515     mvn-opts: ''
516     mvn-params: ''
517     mvn-version: mvn33
518
519     properties:
520       - opendaylight-infra-properties:
521           build-days-to-keep: 7
522
523     parameters:
524       - opendaylight-infra-parameters:
525           os-cloud: '{os-cloud}'
526           project: '{project}'
527           branch: '{branch}'
528           refspec: 'refs/heads/{branch}'
529           artifacts: '{archive-artifacts}'
530       - lf-infra-maven-parameters:
531           mvn-opts: '{mvn-opts}'
532           mvn-params: '{mvn-params}'
533           mvn-version: '{mvn-version}'
534           staging-profile-id: ''
535       - string:
536           name: DOWNLOAD_URL
537           # FIXME: Update the default value to an active stream.
538           # yamllint disable-line rule:line-length
539           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'
540           description: 'URL to ODL tarball artifact to repackage into .deb'
541       - string:
542           name: CHANGELOG_NAME
543           default: 'Jenkins'
544           description: 'Name of person who defined .deb'
545       - string:
546           name: CHANGELOG_EMAIL
547           default: 'jenkins-donotreply@opendaylight.org'
548           description: 'Email of person who defined .deb'
549
550     scm:
551       - integration-gerrit-scm:
552           basedir: 'packaging'
553           refspec: '$GERRIT_REFSPEC'
554           branch: 'master'
555
556     wrappers:
557       - opendaylight-infra-wrappers:
558           build-timeout: '{build-timeout}'
559
560     builders:
561       - shell: !include-raw: build-deb.sh
562       - install-test-uninstall-deb
563       - lf-infra-deploy-maven-file:
564           global-settings-file: 'global-settings'
565           settings-file: 'packaging-settings'
566           mvn-version: '{mvn-version}'
567           repo-id: 'opendaylight-{stream}-ubuntu-1604-x86_64-devel'
568           group-id: '{group-id}'
569           upload-files-dir: '{upload-files-dir}'
570           maven-repo-url: '{maven-repo-url}'
571
572     publishers:
573       - lf-infra-publish