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