Add quick verify job for RPM building logic
[releng/builder.git] / jjb / packaging / packaging.yaml
1 ---
2 - project:
3     name: packaging
4     project-name: packaging
5
6     jobs:
7       - '{project-name}-verify-tox-master'
8       - 'packaging-build-rpm-{stream}'
9       - 'packaging-build-rpm-snap-{stream}'
10       - 'packaging-build-deb-{stream}'
11       - 'packaging-verify-full-rpm-master'
12       - 'packaging-verify-rpm-master'
13       - 'packaging-test-rpm-master'
14       - 'packaging-test-rpm-upgrade-master'
15       - 'packaging-test-deb-master'
16
17     project: 'integration/packaging'
18
19     stream:
20       - boron
21       - carbon
22       - nitrogen
23       - oxygen
24     branch: 'master'
25
26     # common parameters required for 'lf-infra-deploy-maven-file' builder
27     group-id: 'org.opendaylight.integration-packaging'
28     upload-files-dir: '$WORKSPACE/upload_files'
29     maven-repo-url: '$NEXUS_URL/content/repositories/$REPO_ID'
30
31 - job-template:
32     name: 'packaging-build-rpm-{stream}'
33
34     node: centos7-java-builder-2c-4g
35
36     project-type: freestyle
37
38     mvn-opts: ''
39     mvn-params: ''
40     mvn-version: mvn33
41
42     properties:
43       - opendaylight-infra-properties:
44           build-days-to-keep: 7
45
46     parameters:
47       - opendaylight-infra-parameters:
48           os-cloud: '{os-cloud}'
49           project: '{project}'
50           branch: '{branch}'
51           refspec: 'refs/heads/{branch}'
52           artifacts: '{archive-artifacts}'
53       - lf-infra-maven-parameters:
54           mvn-opts: '{mvn-opts}'
55           mvn-params: '{mvn-params}'
56           mvn-version: '{mvn-version}'
57           staging-profile-id: ''
58       - string:
59           name: DOWNLOAD_URL
60           # yamllint disable-line rule:line-length
61           default: 'https://nexus.opendaylight.org/content/repositories/opendaylight.release/org/opendaylight/integration/distribution-karaf/0.6.0-Carbon/distribution-karaf-0.6.0-Carbon.tar.gz'
62           description: 'URL to ODL tarball artifact to repackage into RPM'
63       - string:
64           name: CHANGELOG_NAME
65           default: 'Jenkins'
66           description: 'Name of person who defined RPM'
67       - string:
68           name: CHANGELOG_EMAIL
69           default: 'jenkins-donotreply@opendaylight.org'
70           description: 'Email of person who defined RPM'
71
72     scm:
73       - integration-gerrit-scm:
74           basedir: 'packaging'
75           refspec: '$GERRIT_REFSPEC'
76           branch: 'master'
77
78     wrappers:
79       - opendaylight-infra-wrappers:
80           build-timeout: '{build-timeout}'
81
82     builders:
83       - shell: !include-raw: build-rpm.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       - shell: !include-raw: build-rpm-snap.sh
145       - lf-infra-deploy-maven-file:
146           global-settings-file: 'global-settings'
147           settings-file: 'packaging-settings'
148           mvn-version: '{mvn-version}'
149           repo-id: 'opendaylight-{stream}-epel-7-x86_64-devel'
150           group-id: '{group-id}'
151           upload-files-dir: '{upload-files-dir}'
152           maven-repo-url: '{maven-repo-url}'
153
154     triggers:
155       - timed: '@daily'
156
157     publishers:
158       - lf-infra-publish
159
160
161 - job-template:
162     name: 'packaging-verify-rpm-master'
163
164     node: centos7-java-builder-2c-4g
165
166     project-type: freestyle
167
168     parameters:
169       - opendaylight-infra-parameters:
170           os-cloud: '{os-cloud}'
171           project: '{project}'
172           branch: '{branch}'
173           refspec: 'refs/heads/{branch}'
174           artifacts: '{archive-artifacts}'
175
176     scm:
177       - integration-gerrit-scm:
178           basedir: 'packaging'
179           refspec: '$GERRIT_REFSPEC'
180           branch: 'master'
181
182     wrappers:
183       - opendaylight-infra-wrappers:
184           build-timeout: '{build-timeout}'
185
186     builders:
187       # TODO: Install/test each RPM? Will require builder script changes.
188       # Test Nitrogen tarball
189       - inject:
190           # yamllint disable-line rule:line-length
191           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'
192       - shell: !include-raw: build-rpm.sh
193
194       # Test Nitrogen multipatch zip (no parallel tarball available)
195       - inject:
196           # yamllint disable-line rule:line-length
197           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-20171003.134117-9.zip'
198       - shell: !include-raw: build-rpm.sh
199
200       # Test latest Nitrogen snapshot
201       - inject:
202           properties-content: 'STREAM=nitrogen'
203       - shell: !include-raw: build-rpm-snap.sh
204
205     triggers:
206       - gerrit:
207           server-name: '{server-name}'
208           projects:
209             - project-compare-type: ANT
210               project-pattern: '{project}'
211               branches:
212                 - branch-compare-type: ANT
213                   branch-pattern: '**/{branch}'
214               file-paths:
215                 - compare-type: ANT
216                   pattern: 'packages/**'
217
218     publishers:
219       - lf-infra-publish
220
221
222 - job-template:
223     name: 'packaging-verify-full-rpm-master'
224
225     node: centos7-java-builder-2c-4g
226
227     project-type: freestyle
228
229     parameters:
230       - opendaylight-infra-parameters:
231           os-cloud: '{os-cloud}'
232           project: '{project}'
233           branch: '{branch}'
234           refspec: 'refs/heads/{branch}'
235           artifacts: '{archive-artifacts}'
236
237     scm:
238       - integration-gerrit-scm:
239           basedir: 'packaging'
240           refspec: '$GERRIT_REFSPEC'
241           branch: 'master'
242
243     wrappers:
244       - opendaylight-infra-wrappers:
245           build-timeout: '{build-timeout}'
246
247     builders:
248       # TODO: Install/test each RPM. Will require builder script changes.
249       # Test Carbon SR1 tarball
250       - inject:
251           # yamllint disable-line rule:line-length
252           properties-content: 'DOWNLOAD_URL=https://nexus.opendaylight.org/content/repositories/opendaylight.release/org/opendaylight/integration/distribution-karaf/0.6.1-Carbon/distribution-karaf-0.6.1-Carbon.tar.gz'
253       - shell: !include-raw: build-rpm.sh
254
255       # Test Carbon multipatch zip (no parallel tarball available)
256       - inject:
257           # yamllint disable-line rule:line-length
258           properties-content: 'DOWNLOAD_URL=https://nexus.opendaylight.org/content/repositories/opendaylight.snapshot/org/opendaylight/integration/integration/distribution/distribution-karaf/0.6.2-SNAPSHOT/distribution-karaf-0.6.2-20171002.113256-59.zip'
259       - shell: !include-raw: build-rpm.sh
260
261       # Test latest Carbon snapshot
262       - inject:
263           properties-content: 'STREAM=carbon'
264       - shell: !include-raw: build-rpm-snap.sh
265
266       # Test Nitrogen tarball
267       - inject:
268           # yamllint disable-line rule:line-length
269           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'
270       - shell: !include-raw: build-rpm.sh
271
272       # Test Nitrogen multipatch zip (no parallel tarball available)
273       - inject:
274           # yamllint disable-line rule:line-length
275           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-20171003.134117-9.zip'
276       - shell: !include-raw: build-rpm.sh
277
278       # Test latest Nitrogen snapshot
279       - inject:
280           properties-content: 'STREAM=nitrogen'
281       - shell: !include-raw: build-rpm-snap.sh
282
283       # Test Oxygen tarball
284       # TODO: Change this to an autorelease build once available
285       - inject:
286           # yamllint disable-line rule:line-length
287           properties-content: 'DOWNLOAD_URL=https://nexus.opendaylight.org/content/repositories/opendaylight.snapshot/org/opendaylight/integration/karaf/0.8.0-SNAPSHOT/karaf-0.8.0-20170928.142221-597.tar.gz'
288       - shell: !include-raw: build-rpm.sh
289
290       # Test Oxygen multipatch zip (no parallel tarball available)
291       - inject:
292           # yamllint disable-line rule:line-length
293           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-20171003.122621-24.zip'
294       - shell: !include-raw: build-rpm.sh
295
296       # Test latest Oxygen snapshot
297       - inject:
298           properties-content: 'STREAM=oxygen'
299       - shell: !include-raw: build-rpm-snap.sh
300
301     triggers:
302       - timed: '@daily'
303       - gerrit:
304           server-name: '{server-name}'
305           trigger-on:
306             - comment-added-contains-event:
307                 comment-contains-value: 'verify-rpm-full'
308           projects:
309             - project-compare-type: ANT
310               project-pattern: '{project}'
311               branches:
312                 - branch-compare-type: ANT
313                   branch-pattern: '**/{branch}'
314
315     publishers:
316       - lf-infra-publish
317
318
319 - job-template:
320     name: 'packaging-test-rpm-master'
321
322     node: centos7-java-builder-2c-4g
323
324     parameters:
325       - opendaylight-infra-parameters:
326           os-cloud: '{os-cloud}'
327           project: '{project}'
328           branch: '{branch}'
329           refspec: 'refs/heads/{branch}'
330           artifacts: '{archive-artifacts}'
331       - string:
332           name: URL
333           # yamllint disable-line rule:line-length
334           default: 'https://raw.githubusercontent.com/opendaylight/integration-packaging/master/packages/rpm/example_repo_configs/opendaylight-60-release.repo'
335           description: 'Link to .repo or .rpm file'
336
337     scm:
338       - integration-gerrit-scm:
339           basedir: 'packaging'
340           refspec: '$GERRIT_REFSPEC'
341           branch: 'master'
342
343     wrappers:
344       - opendaylight-infra-wrappers:
345           build-timeout: '{build-timeout}'
346
347     builders:
348       - shell: !include-raw: install-rpm.sh
349       - shell: !include-raw: start-odl.sh
350       - shell: |
351           # Install expect to interact with Karaf shell
352           sudo yum install -y expect
353           # Install nmap to check status of ODL's SSH port
354           sudo yum install -y nmap
355       - shell: !include-raw: test-karaf.expect
356       - shell: !include-raw: stop-odl.sh
357
358     publishers:
359       # TODO: Remove the archive publisher
360       #       small data should be stored on logs.opendaylight.org
361       #       large data should be stored on nexus.opendaylight.org
362       - archive:
363           artifacts: '**'
364           allow-empty: true
365           fingerprint: true
366           latest-only: true
367       - lf-infra-publish
368
369
370 - job-template:
371     name: 'packaging-test-rpm-upgrade-master'
372
373     node: centos7-java-builder-2c-4g
374
375     parameters:
376       - opendaylight-infra-parameters:
377           os-cloud: '{os-cloud}'
378           project: '{project}'
379           branch: '{branch}'
380           refspec: 'refs/heads/{branch}'
381           artifacts: '{archive-artifacts}'
382       - string:
383           name: URL
384           # yamllint disable-line rule:line-length
385           default: 'https://raw.githubusercontent.com/opendaylight/integration-packaging/master/packages/rpm/example_repo_configs/opendaylight-6-release.repo'
386           description: 'Link to .repo or .rpm file'
387       - string:
388           name: UPGRADE_URL
389           # yamllint disable-line rule:line-length
390           default: 'https://raw.githubusercontent.com/opendaylight/integration-packaging/master/packages/rpm/example_repo_configs/opendaylight-6-testing.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: !include-raw: install-rpm.sh
405       - shell: !include-raw: start-odl.sh
406       - shell: |
407           # Install expect to interact with Karaf shell
408           sudo yum install -y expect
409           # Install nmap to check status of ODL's SSH port
410           sudo yum install -y nmap
411       - shell: !include-raw: test-karaf.expect
412       - shell: !include-raw: stop-odl.sh
413       - shell: !include-raw: test-rpm-upgrade.sh
414       - shell: !include-raw: start-odl.sh
415       - shell: !include-raw: test-karaf.expect
416       - shell: !include-raw: stop-odl.sh
417
418     publishers:
419       - lf-infra-publish
420
421
422 - job-template:
423     name: 'packaging-test-deb-master'
424
425     node: ubuntu1604-mininet-ovs-25-2c-4g
426
427     parameters:
428       - opendaylight-infra-parameters:
429           os-cloud: '{os-cloud}'
430           project: '{project}'
431           branch: '{branch}'
432           refspec: 'refs/heads/{branch}'
433           artifacts: '{archive-artifacts}'
434       - string:
435           name: PACKAGE
436           default: 'ppa:odl-team/carbon'
437           description: 'Link to .deb package or name of PPA repo'
438
439     scm:
440       - integration-gerrit-scm:
441           basedir: 'packaging'
442           refspec: '$GERRIT_REFSPEC'
443           branch: 'master'
444
445     wrappers:
446       - opendaylight-infra-wrappers:
447           build-timeout: '{build-timeout}'
448
449     builders:
450       - shell: !include-raw: install-deb.sh
451       - shell: !include-raw: start-odl.sh
452       - shell: |
453           # Install expect to interact with Karaf shell
454           sudo apt-get install -y expect
455           # Install nmap to check status of ODL's SSH port
456           sudo apt-get install -y nmap
457       - shell: !include-raw: test-karaf.expect
458       - shell: !include-raw: stop-odl.sh
459
460     publishers:
461       - lf-infra-publish
462
463
464 - job-template:
465     name: 'packaging-build-deb-{stream}'
466
467     node: ubuntu1604-mininet-ovs-25-2c-4g
468
469     project-type: freestyle
470
471     mvn-opts: ''
472     mvn-params: ''
473     mvn-version: mvn33
474
475     properties:
476       - opendaylight-infra-properties:
477           build-days-to-keep: 7
478
479     parameters:
480       - opendaylight-infra-parameters:
481           os-cloud: '{os-cloud}'
482           project: '{project}'
483           branch: '{branch}'
484           refspec: 'refs/heads/{branch}'
485           artifacts: '{archive-artifacts}'
486       - lf-infra-maven-parameters:
487           mvn-opts: '{mvn-opts}'
488           mvn-params: '{mvn-params}'
489           mvn-version: '{mvn-version}'
490           staging-profile-id: ''
491       - string:
492           name: DOWNLOAD_URL
493           # yamllint disable-line rule:line-length
494           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'
495           description: 'URL to ODL tarball artifact to repackage into .deb'
496       - string:
497           name: CHANGELOG_NAME
498           default: 'Jenkins'
499           description: 'Name of person who defined .deb'
500       - string:
501           name: CHANGELOG_EMAIL
502           default: 'jenkins-donotreply@opendaylight.org'
503           description: 'Email of person who defined .deb'
504
505     scm:
506       - integration-gerrit-scm:
507           basedir: 'packaging'
508           refspec: '$GERRIT_REFSPEC'
509           branch: 'master'
510
511     wrappers:
512       - opendaylight-infra-wrappers:
513           build-timeout: '{build-timeout}'
514
515     builders:
516       - shell: !include-raw: build-deb.sh
517       - lf-infra-deploy-maven-file:
518           global-settings-file: 'global-settings'
519           settings-file: 'packaging-settings'
520           mvn-version: '{mvn-version}'
521           repo-id: 'opendaylight-{stream}-ubuntu-1604-x86_64-devel'
522           group-id: '{group-id}'
523           upload-files-dir: '{upload-files-dir}'
524           maven-repo-url: '{maven-repo-url}'
525
526     publishers:
527       - lf-infra-publish