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