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