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