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