Manage ODL Jenkins views with view-templates
[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 Fluorine ('Managed Release Common Distro') release tarball
219       - inject:
220           # yamllint disable-line rule:line-length
221           properties-content: 'DOWNLOAD_URL=https://nexus.opendaylight.org/content/repositories/public/org/opendaylight/integration/opendaylight/0.9.0/opendaylight-0.9.0.tar.gz'
222       - shell: !include-raw-escape: build-rpm.sh
223       - install-test-uninstall-rpm
224
225       # Test Neon pre-release autorelease tarball
226       # NB: This will need to be updated as old builds expire
227       - inject:
228           # yamllint disable-line rule:line-length
229           properties-content: 'DOWNLOAD_URL=https://nexus.opendaylight.org/content/repositories/autorelease-2473/org/opendaylight/integration/karaf/0.10.0/karaf-0.10.0.tar.gz'
230       - shell: !include-raw-escape: build-rpm.sh
231       - install-test-uninstall-rpm
232
233       # Test Neon multipatch zip (no parallel tarball available)
234       # NB: This will need to be updated as old builds expire
235       - inject:
236           # yamllint disable-line rule:line-length
237           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-20181106.150120-17.zip'
238       - shell: !include-raw-escape: build-rpm.sh
239       - install-test-uninstall-rpm
240
241       # Test latest Neon snapshot
242       - inject:
243           properties-content: 'STREAM=neon'
244       - shell: !include-raw: build-rpm-snap.sh
245       - install-test-uninstall-rpm
246
247     triggers:
248       - gerrit-trigger-patch-submitted:
249           gerrit-server-name: '{gerrit-server-name}'
250           project: '{project}'
251           branch: '{branch}'
252           files: 'packages/**'
253           forbidden-files: ''
254
255     publishers:
256       - lf-infra-publish
257
258
259 - job-template:
260     name: 'packaging-verify-full-rpm-master'
261
262     node: centos7-builder-2c-2g
263
264     project-type: freestyle
265
266     parameters:
267       - opendaylight-infra-parameters:
268           os-cloud: '{os-cloud}'
269           project: '{project}'
270           branch: '{branch}'
271           refspec: 'refs/heads/{branch}'
272           artifacts: '{archive-artifacts}'
273
274     scm:
275       - integration-gerrit-scm:
276           basedir: 'packaging'
277           refspec: '$GERRIT_REFSPEC'
278           branch: 'master'
279
280     wrappers:
281       - opendaylight-infra-wrappers:
282           build-timeout: '{build-timeout}'
283
284     builders:
285       # Test Oxygen SR3 release tarball
286       - inject:
287           # yamllint disable-line rule:line-length
288           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'
289       - shell: !include-raw-escape: build-rpm.sh
290       - install-test-uninstall-rpm
291
292       # Test Oxygen pre-release autorelease tarball
293       # NB: This will need to be updated as old builds expire
294       - inject:
295           # yamllint disable-line rule:line-length
296           properties-content: 'DOWNLOAD_URL=https://nexus.opendaylight.org/content/repositories/autorelease-2472/org/opendaylight/integration/karaf/0.8.4/karaf-0.8.4.tar.gz'
297       - shell: !include-raw-escape: build-rpm.sh
298       - install-test-uninstall-rpm
299
300       # Test latest Oxygen snapshot
301       - inject:
302           properties-content: 'STREAM=oxygen'
303       - shell: !include-raw: build-rpm-snap.sh
304       - install-test-uninstall-rpm
305
306       # Test Fluorine ('Managed Release Common Distro') release tarball
307       - inject:
308           # yamllint disable-line rule:line-length
309           properties-content: 'DOWNLOAD_URL=https://nexus.opendaylight.org/content/repositories/public/org/opendaylight/integration/opendaylight/0.9.0/opendaylight-0.9.0.tar.gz'
310       - shell: !include-raw-escape: build-rpm.sh
311       - install-test-uninstall-rpm
312
313       # Test Fluorine pre-release autorelease tarball
314       # NB: This will need to be updated as old builds expire
315       - inject:
316           # yamllint disable-line rule:line-length
317           properties-content: 'DOWNLOAD_URL=https://nexus.opendaylight.org/content/repositories/autorelease-2474/org/opendaylight/integration/karaf/0.9.1/karaf-0.9.1.tar.gz'
318       - shell: !include-raw-escape: build-rpm.sh
319       - install-test-uninstall-rpm
320
321       # Test Fluorine multipatch zip (no parallel tarball available)
322       # NB: This will need to be updated as old builds expire
323       - inject:
324           # yamllint disable-line rule:line-length
325           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-20181023.120116-10.zip'
326       - shell: !include-raw-escape: build-rpm.sh
327       - install-test-uninstall-rpm
328
329       # Test latest Fluorine snapshot
330       - inject:
331           properties-content: 'STREAM=fluorine'
332       - shell: !include-raw: build-rpm-snap.sh
333       - install-test-uninstall-rpm
334
335       # Test Neon pre-release autorelease tarball
336       # NB: This will need to be updated as old builds expire
337       - inject:
338           # yamllint disable-line rule:line-length
339           properties-content: 'DOWNLOAD_URL=https://nexus.opendaylight.org/content/repositories/autorelease-2473/org/opendaylight/integration/karaf/0.10.0/karaf-0.10.0.tar.gz'
340       - shell: !include-raw-escape: build-rpm.sh
341       - install-test-uninstall-rpm
342
343       # Test Neon multipatch zip (no parallel tarball available)
344       # NB: This will need to be updated as old builds expire
345       - inject:
346           # yamllint disable-line rule:line-length
347           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-20181106.150120-17.zip'
348       - shell: !include-raw-escape: build-rpm.sh
349       - install-test-uninstall-rpm
350
351       # Test latest Neon snapshot
352       - inject:
353           properties-content: 'STREAM=neon'
354       - shell: !include-raw: build-rpm-snap.sh
355       - install-test-uninstall-rpm
356
357     triggers:
358       - timed: '@daily'
359       - gerrit:
360           server-name: '{gerrit-server-name}'
361           trigger-on:
362             - comment-added-contains-event:
363                 comment-contains-value: 'verify-rpm-full'
364           projects:
365             - project-compare-type: ANT
366               project-pattern: '{project}'
367               branches:
368                 - branch-compare-type: ANT
369                   branch-pattern: '**/{branch}'
370
371     publishers:
372       - lf-infra-publish
373
374
375 - job-template:
376     name: 'packaging-test-rpm-master'
377
378     node: centos7-builder-2c-2g
379
380     parameters:
381       - opendaylight-infra-parameters:
382           os-cloud: '{os-cloud}'
383           project: '{project}'
384           branch: '{branch}'
385           refspec: 'refs/heads/{branch}'
386           artifacts: '{archive-artifacts}'
387       - string:
388           name: URL
389           # yamllint disable-line rule:line-length
390           default: 'https://git.opendaylight.org/gerrit/gitweb?p=integration/packaging.git;a=blob_plain;f=packages/rpm/example_repo_configs/opendaylight-9-devel.repo'
391           description: 'Link to .repo or .rpm file'
392
393     scm:
394       - integration-gerrit-scm:
395           basedir: 'packaging'
396           refspec: '$GERRIT_REFSPEC'
397           branch: 'master'
398
399     wrappers:
400       - opendaylight-infra-wrappers:
401           build-timeout: '{build-timeout}'
402
403     builders:
404       - shell: |
405           # Install expect to interact with Karaf shell
406           # Install nmap to check status of ODL's SSH port
407           sudo yum install -y expect nmap
408       - shell: !include-raw-escape: install-rpm.sh
409       - shell: !include-raw: start-odl.sh
410       - shell: !include-raw-escape: test-ports-nofeature.sh
411       - shell: !include-raw: test-karaf-oxygensafe.expect
412       # Disable this test until ODLPARENT-139 is fixed
413       # - shell: !include-raw-escape: test-rest-ok.sh
414       - shell: !include-raw: stop-odl.sh
415       - shell: !include-raw: uninstall-rpm.sh
416
417     publishers:
418       # TODO: Remove the archive publisher
419       #       small data should be stored on logs.opendaylight.org
420       #       large data should be stored on nexus.opendaylight.org
421       - archive:
422           artifacts: '**'
423           allow-empty: true
424           fingerprint: true
425           latest-only: true
426       - lf-infra-publish
427
428
429 - job-template:
430     name: 'packaging-test-rpm-upgrade-master'
431
432     node: centos7-builder-2c-2g
433
434     parameters:
435       - opendaylight-infra-parameters:
436           os-cloud: '{os-cloud}'
437           project: '{project}'
438           branch: '{branch}'
439           refspec: 'refs/heads/{branch}'
440           artifacts: '{archive-artifacts}'
441
442     scm:
443       - integration-gerrit-scm:
444           basedir: 'packaging'
445           refspec: '$GERRIT_REFSPEC'
446           branch: 'master'
447
448     wrappers:
449       - opendaylight-infra-wrappers:
450           build-timeout: '{build-timeout}'
451
452     builders:
453       # Tests (current and future):
454       #   * Install latest release, stop/uninstall, install latest CD
455       #   * Upgrade from latest release latest CD
456       #   * TODO: Upgrade from latest release to proposed packaging/** logic
457       #   * TODO: Upgrade from CD to proposed packaging/** logic
458       #   * TODO: Upgrade from proposed packaging/** logic (older ODL) to
459       #     proposed packaging logic (latest ODL)
460
461       # Test 1: Install latest release, stop/uninstall, install latest CD
462       - inject:
463           # yamllint disable-line rule:line-length
464           properties-content: 'URL=https://raw.githubusercontent.com/opendaylight/integration-packaging/master/packages/rpm/example_repo_configs/opendaylight-90-release.repo'
465       - install-start-test-stop-uninstall-rpm
466       - inject:
467           # yamllint disable-line rule:line-length
468           properties-content: 'URL=https://raw.githubusercontent.com/opendaylight/integration-packaging/master/packages/rpm/example_repo_configs/opendaylight-9-devel.repo'
469       - install-start-test-stop-uninstall-rpm
470
471       # Test 2: Install latest release, stop, upgrade to latest CD
472       - inject:
473           # yamllint disable-line rule:line-length
474           properties-content: 'URL=https://raw.githubusercontent.com/opendaylight/integration-packaging/master/packages/rpm/example_repo_configs/opendaylight-90-release.repo'
475       - install-start-test-stop-rpm
476       - inject:
477           # yamllint disable-line rule:line-length
478           properties-content: 'REPO_CFG_FILE_URL=https://raw.githubusercontent.com/opendaylight/integration-packaging/master/packages/rpm/example_repo_configs/opendaylight-9-devel.repo'
479       - installrepcfg-upgrade-start-test-stop-rpm
480
481     triggers:
482       - gerrit-trigger-patch-submitted:
483           gerrit-server-name: '{gerrit-server-name}'
484           project: '{project}'
485           branch: '{branch}'
486           files: 'packages/**'
487           forbidden-files: ''
488
489     publishers:
490       - lf-infra-publish
491
492
493 - job-template:
494     name: 'packaging-test-deb-master'
495
496     node: ubuntu1604-mininet-ovs-25-1c-4g
497
498     parameters:
499       - opendaylight-infra-parameters:
500           os-cloud: '{os-cloud}'
501           project: '{project}'
502           branch: '{branch}'
503           refspec: 'refs/heads/{branch}'
504           artifacts: '{archive-artifacts}'
505       - string:
506           name: PACKAGE
507           default: 'ppa:odl-team/oxygen'
508           description: 'Link to .deb package or name of PPA repo'
509
510     scm:
511       - integration-gerrit-scm:
512           basedir: 'packaging'
513           refspec: '$GERRIT_REFSPEC'
514           branch: 'master'
515
516     wrappers:
517       - opendaylight-infra-wrappers:
518           build-timeout: '{build-timeout}'
519
520     builders:
521       - shell: !include-raw-escape: install-deb.sh
522       - shell: !include-raw: start-odl.sh
523       - shell: !include-raw-escape: test-ports-nofeature.sh
524       - shell: |
525           # Install expect to interact with Karaf shell
526           # Install nmap to check status of ODL's SSH port
527           sudo apt-get install -y expect nmap
528       - shell: !include-raw: test-karaf-oxygensafe.expect
529       # Disable this test until ODLPARENT-139 is fixed
530       # - shell: !include-raw-escape: test-rest-ok.sh
531       - shell: !include-raw: stop-odl.sh
532       - shell: !include-raw-escape: uninstall-deb.sh
533
534     publishers:
535       - lf-infra-publish
536
537
538 - job-template:
539     name: 'packaging-build-deb-{stream}'
540
541     node: ubuntu1604-mininet-ovs-25-1c-4g
542
543     project-type: freestyle
544
545     mvn-opts: ''
546     mvn-params: ''
547     mvn-version: mvn33
548
549     properties:
550       - opendaylight-infra-properties:
551           build-days-to-keep: 7
552
553     parameters:
554       - opendaylight-infra-parameters:
555           os-cloud: '{os-cloud}'
556           project: '{project}'
557           branch: '{branch}'
558           refspec: 'refs/heads/{branch}'
559           artifacts: '{archive-artifacts}'
560       - lf-infra-maven-parameters:
561           mvn-opts: '{mvn-opts}'
562           mvn-params: '{mvn-params}'
563           mvn-version: '{mvn-version}'
564           staging-profile-id: ''
565       - string:
566           name: DOWNLOAD_URL
567           # FIXME: Update the default value to an active stream.
568           # yamllint disable-line rule:line-length
569           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'
570           description: 'URL to ODL tarball artifact to repackage into .deb'
571       - string:
572           name: CHANGELOG_NAME
573           default: 'Jenkins'
574           description: 'Name of person who defined .deb'
575       - string:
576           name: CHANGELOG_EMAIL
577           default: 'jenkins-donotreply@opendaylight.org'
578           description: 'Email of person who defined .deb'
579       - string:
580           name: PKG_VERSION_OVERRIDE
581           default: ''
582           description: 'Override autodetected package component of RPM version (maj.min.pat-pkg)'
583
584     scm:
585       - integration-gerrit-scm:
586           basedir: 'packaging'
587           refspec: '$GERRIT_REFSPEC'
588           branch: 'master'
589
590     wrappers:
591       - opendaylight-infra-wrappers:
592           build-timeout: '{build-timeout}'
593
594     builders:
595       - shell: !include-raw: build-deb.sh
596       - install-test-uninstall-deb
597       - lf-infra-deploy-maven-file:
598           global-settings-file: 'global-settings'
599           settings-file: 'packaging-settings'
600           mvn-version: '{mvn-version}'
601           repo-id: 'opendaylight-{stream}-ubuntu-1604-x86_64-devel'
602           group-id: '{group-id}'
603           upload-files-dir: '{upload-files-dir}'
604           maven-repo-url: '{maven-repo-url}'
605
606     publishers:
607       - lf-infra-publish
608
609 - project:
610     name: packaging-view
611     views:
612       - project-view
613     project-name: packaging