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