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