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