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