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