Merge "Update packer job to build devstack ocata image"
[releng/builder.git] / jjb / releng-jobs.yaml
1 ---
2 - project:
3     name: builder-jobs
4     jobs:
5       - '{project-name}-ci-jobs'
6       - '{project-name}-verify-tox-{stream}'
7       - 'builder-check-poms'
8       # Packer jobs
9       - 'builder-verify-packer'
10       - 'builder-merge-packer-{platforms}-{templates}'
11       # OpenStack Related
12       - 'builder-cleanup-old-images'
13       - 'builder-delete-stale-nodes'
14       - 'builder-delete-stale-stacks'
15       # Automation for docs and jobs
16       - 'builder-update-csit-tests'
17       - 'builder-update-image-list'
18
19     platforms:
20       - centos
21       - ubuntu-14.04
22       - ubuntu-16.04
23
24     templates:
25       - devstack
26       - devstack-pre-pip-newton
27       - devstack-pre-pip-ocata
28       - docker
29       - gbp
30       - java-builder
31       - mininet
32       - mininet-ovs-2.5
33       - robot
34
35     exclude:
36       - platforms: centos
37         templates: gbp
38       - platforms: centos
39         templates: mininet
40       - platforms: centos
41         templates: mininet-ovs-2.5
42       - platforms: ubuntu-14.04
43         templates: java-builder
44       - platforms: ubuntu-14.04
45         templates: robot
46       - platforms: ubuntu-14.04
47         templates: devstack-pre-pip-newton
48       - platforms: ubuntu-14.04
49         templates: devstack-pre-pip-ocata
50       - platforms: ubuntu-14.04
51         templates: devstack
52       - platforms: ubuntu-14.04
53         templates: docker
54       - platforms: ubuntu-14.04
55         templates: mininet-ovs-2.5
56       - platforms: ubuntu-16.04
57         templates: java-builder
58       - platforms: ubuntu-16.04
59         templates: robot
60       - platforms: ubuntu-16.04
61         templates: devstack-pre-pip-newton
62       - platforms: ubuntu-16.04
63         templates: devstack-pre-pip-ocata
64       - platforms: ubuntu-16.04
65         templates: devstack
66       - platforms: ubuntu-16.04
67         templates: docker
68       - platforms: ubuntu-16.04
69         templates: mininet
70       - platforms: ubuntu-16.04
71         templates: gbp
72
73
74     project-type: freestyle
75     archive-artifacts: '**/*.log'
76     build-timeout: '60'
77
78     # The following values are only specified here
79     # so that code blocks look similar to other projects.
80     project: 'releng/builder'
81     project-name: builder
82     stream: master
83     branch: master
84     build-node: centos7-java-builder-2c-4g
85
86 - job-template:
87     name: builder-check-poms
88     node: centos7-java-builder-2c-4g
89
90     project-type: freestyle
91
92     properties:
93       - opendaylight-infra-properties:
94           build-days-to-keep: 14
95
96     parameters:
97       - opendaylight-infra-parameters:
98           os-cloud: '{os-cloud}'
99           project: '{project}'
100           branch: '{branch}'
101           refspec: 'refs/heads/{branch}'
102           artifacts: '{archive-artifacts}'
103
104     wrappers:
105       - opendaylight-infra-wrappers:
106           build-timeout: '{build-timeout}'
107
108     triggers:
109       - timed: 'H H * * 1'
110
111     builders:
112       - shell: !include-raw-escape: include-raw-check-poms.sh
113
114     publishers:
115       - email-notification:
116           email-recipients: '{email-recipients}'
117           email-prefix: '[releng]'
118       - lf-infra-publish
119
120
121 - job-template:
122     name: 'builder-cleanup-old-images'
123     project-type: freestyle
124     node: centos7-java-builder-2c-4g
125
126     properties:
127       - opendaylight-infra-properties:
128           build-days-to-keep: 7
129
130     parameters:
131       - opendaylight-infra-parameters:
132           os-cloud: '{os-cloud}'
133           project: '{project}'
134           branch: '{branch}'
135           refspec: 'refs/heads/{branch}'
136           artifacts: '{archive-artifacts}'
137
138     scm:
139       - git-scm:
140           branch: '{branch}'
141
142     wrappers:
143       - opendaylight-infra-wrappers:
144           build-timeout: '{build-timeout}'
145       # Listed after to override openstack-infra-wrappers clouds.yaml definition
146       - config-file-provider:
147           files:
148             - file-id: opendaylight-private-clouds-yaml
149               target: '$HOME/.config/openstack/clouds.yaml'
150
151     triggers:
152       # Cleanup images on a weekly schedule
153       - timed: '@weekly'
154
155     builders:
156       - shell: !include-raw-escape:
157           - global-jjb/shell/lftools-install.sh
158           - opendaylight-infra-cleanup-old-images.sh
159
160     publishers:
161       - email-notification:
162           email-recipients: '{email-recipients}'
163           email-prefix: '[releng]'
164       - lf-infra-publish
165
166
167 - job-template:
168     name: 'builder-delete-stale-nodes'
169     project-type: freestyle
170     node: centos7-java-builder-2c-4g
171
172     properties:
173       - opendaylight-infra-properties:
174           build-days-to-keep: 7
175
176     parameters:
177       - opendaylight-infra-parameters:
178           os-cloud: '{os-cloud}'
179           project: '{project}'
180           branch: '{branch}'
181           refspec: 'refs/heads/{branch}'
182           artifacts: '{archive-artifacts}'
183
184     wrappers:
185       - opendaylight-infra-wrappers:
186           build-timeout: '{build-timeout}'
187
188     triggers:
189       # Attempt to clear up stacks every 30 mins in case we have orphaned stacks
190       - timed: '0,30 * * * *'
191
192     builders:
193       - shell: !include-raw-escape:
194           - global-jjb/shell/lftools-install.sh
195           - opendaylight-infra-cleanup-stale-nodes.sh
196
197     publishers:
198       - email-notification:
199           email-recipients: '{email-recipients}'
200           email-prefix: '[releng]'
201       - lf-infra-publish
202
203
204 - job-template:
205     name: 'builder-delete-stale-stacks'
206     project-type: freestyle
207     node: centos7-java-builder-2c-4g
208
209     properties:
210       - opendaylight-infra-properties:
211           build-days-to-keep: 7
212
213     parameters:
214       - opendaylight-infra-parameters:
215           os-cloud: '{os-cloud}'
216           project: '{project}'
217           branch: '{branch}'
218           refspec: 'refs/heads/{branch}'
219           artifacts: '{archive-artifacts}'
220
221     wrappers:
222       - opendaylight-infra-wrappers:
223           build-timeout: '{build-timeout}'
224
225     triggers:
226       # Attempt to clear up stacks every 30 mins in case we have orphaned stacks
227       - timed: '0,30 * * * *'
228
229     builders:
230       - shell: !include-raw-escape: opendaylight-infra-cleanup-stale-stacks.sh
231
232     publishers:
233       - email-notification:
234           email-recipients: '{email-recipients}'
235           email-prefix: '[releng]'
236       - lf-infra-publish
237
238
239 - job-template:
240     name: 'builder-update-image-list'
241     project-type: freestyle
242     node: centos7-java-builder-2c-4g
243
244     properties:
245       - opendaylight-infra-properties:
246           build-days-to-keep: 7
247
248     parameters:
249       - opendaylight-infra-parameters:
250           os-cloud: odlpriv
251           project: '{project}'
252           branch: '{branch}'
253           refspec: 'refs/heads/{branch}'
254           artifacts: '{archive-artifacts}'
255
256     scm:
257       - git-scm:
258           branch: '{branch}'
259
260     wrappers:
261       - opendaylight-infra-wrappers:
262           build-timeout: '{build-timeout}'
263       # Listed after to override openstack-infra-wrappers clouds.yaml definition
264       - config-file-provider:
265           files:
266             - file-id: opendaylight-private-clouds-yaml
267               target: '$HOME/.config/openstack/clouds.yaml'
268
269     triggers:
270       # Update image list every Monday to Friday at 11:00 UTC
271       - timed: '0 11 * * 1-5'
272
273     builders:
274       - shell: !include-raw-escape: opendaylight-infra-update-image-list.sh
275       - opendaylight-infra-push-gerrit-patch:
276           project: '{project}'
277           gerrit-topic: 'releng-update-cloud-image-list'
278           gerrit-commit-message: 'Update cloud image list docs'
279
280     publishers:
281       - email-notification:
282           email-recipients: '{email-recipients}'
283           email-prefix: '[releng]'
284       - lf-infra-publish
285
286 - job-template:
287     name: 'builder-verify-packer'
288     project-type: freestyle
289     node: centos7-java-builder-2c-4g
290     concurrent: true
291
292     properties:
293       - opendaylight-infra-properties:
294           build-days-to-keep: 14
295
296     parameters:
297       - opendaylight-infra-parameters:
298           os-cloud: '{os-cloud}'
299           project: '{project}'
300           branch: '{branch}'
301           refspec: 'refs/heads/{branch}'
302           artifacts: '{archive-artifacts}'
303
304     scm:
305       - gerrit-trigger-scm:
306           refspec: '$GERRIT_REFSPEC'
307           choosing-strategy: 'gerrit'
308
309     wrappers:
310       - opendaylight-infra-wrappers:
311           build-timeout: '{build-timeout}'
312
313     triggers:
314       - gerrit-trigger-patch-submitted:
315           server: '{server-name}'
316           project: '{project}'
317           branch: '{branch}'
318           files: 'packer/**'
319
320     builders:
321       - packer-validate:
322
323     publishers:
324       - email-notification:
325           email-recipients: '{email-recipients}'
326           email-prefix: '[{project}]'
327       - lf-infra-publish
328
329 - job-template:
330     name: 'builder-merge-packer-{platforms}-{templates}'
331     project-type: freestyle
332     node: centos7-java-builder-2c-4g
333
334     properties:
335       - opendaylight-infra-properties:
336           build-days-to-keep: 14
337
338     parameters:
339       - opendaylight-infra-parameters:
340           os-cloud: '{os-cloud}'
341           project: '{project}'
342           branch: '{branch}'
343           refspec: 'refs/heads/{branch}'
344           artifacts: '{archive-artifacts}'
345
346     scm:
347       - gerrit-trigger-scm:
348           refspec: '$GERRIT_REFSPEC'
349           branches:
350             - '$GERRIT_BRANCH'
351           choosing-strategy: 'default'
352
353     wrappers:
354       - opendaylight-infra-wrappers:
355           build-timeout: '{build-timeout}'
356
357     triggers:
358       - timed: '00 10 1 * *'
359       - gerrit:
360           server-name: '{server-name}'
361           trigger-on:
362             - change-merged-event
363             - comment-added-contains-event:
364                 comment-contains-value: 'remerge'
365           projects:
366             - project-compare-type: 'ANT'
367               project-pattern: 'releng/builder'
368               branches:
369                 - branch-compare-type: 'ANT'
370                   branch-pattern: '**/{branch}'
371               file-paths:
372                 - compare-type: ANT
373                   pattern: 'packer/vars/{platforms}.json'
374                 - compare-type: ANT
375                   pattern: 'packer/templates/{templates}.json'
376                 - compare-type: ANT
377                   pattern: 'packer/provision/{templates}.sh'
378                 - compare-type: ANT
379                   pattern: 'packer/provision/system_reseal.sh'
380                 - compare-type: ANT
381                   pattern: 'packer/provision/rh-user_data.sh'
382                 - compare-type: ANT
383                   pattern: 'packer/provision/devstack-pre-pip.sh'
384                 - compare-type: ANT
385                   pattern: 'packer/provision/baseline.sh'
386
387     builders:
388       - packer-validate:
389       - packer-build:
390           platform: '{platforms}'
391           template: '{templates}'
392
393     publishers:
394       - email-notification:
395           email-recipients: '{email-recipients}'
396           email-prefix: '[{project}]'
397       - lf-infra-publish
398
399 - job-template:
400     name: 'builder-update-csit-tests'
401     node: centos7-java-builder-2c-8g
402
403     # builder-update-csit-tests job
404     #
405     # This job's purpose is to update csit
406     # tests to run in integration-distribution-test-{stream}
407     # by updating releng-defaults variables: csit-list-carbon,
408     # csit-list-boron, csit-list-beryllium
409
410     project-type: freestyle
411
412     properties:
413       - opendaylight-infra-properties:
414           build-days-to-keep: 14
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
424     scm:
425       - gerrit-trigger-scm:
426           refspec: ''
427           choosing-strategy: 'default'
428
429     wrappers:
430       - opendaylight-infra-wrappers:
431           build-timeout: '{build-timeout}'
432
433     triggers:
434       - reverse:
435           jobs: 'builder-jjb-merge'
436
437     builders:
438       - shell: |
439           git checkout -b auto-update-csit-jobs
440       - integration-list-jobs:
441           blacklist: '{csit-list-blacklist}'
442           search_string: "csit"
443           stream: "nitrogen"
444           jobs-filename: "csit_jobs_nitrogen.lst"
445       - integration-list-jobs:
446           blacklist: '{csit-list-blacklist}'
447           search_string: "csit"
448           stream: "carbon"
449           jobs-filename: "csit_jobs_carbon.lst"
450       - integration-list-jobs:
451           blacklist: '{csit-list-blacklist}'
452           search_string: "csit"
453           stream: "boron"
454           jobs-filename: "csit_jobs_boron.lst"
455       - integration-replace-block-text:
456           starting-regex: "'csit-list-nitrogen: >'"
457           ending-regex: "'csit-list-carbon: >'"
458           file-with-changes-to-insert: "'csit_jobs_nitrogen.lst'"
459           file-to-change: "'jjb/releng-defaults.yaml'"
460       - integration-replace-block-text:
461           starting-regex: "'csit-list-carbon: >'"
462           ending-regex: "'csit-list-boron: >'"
463           file-with-changes-to-insert: "'csit_jobs_carbon.lst'"
464           file-to-change: "'jjb/releng-defaults.yaml'"
465       - integration-replace-block-text:
466           starting-regex: "'csit-list-boron: >'"
467           ending-regex: "'# CSIT TESTS END SED MARKER'"
468           file-with-changes-to-insert: "'csit_jobs_boron.lst'"
469           file-to-change: "'jjb/releng-defaults.yaml'"
470       - shell: |
471           git status
472           git add jjb/releng-defaults.yaml
473       - opendaylight-infra-push-gerrit-patch:
474           project: "releng/builder"
475           gerrit-topic: "auto-update-csit-jobs"
476           gerrit-commit-message: "Auto Update CSIT Jobs to run"
477
478     publishers:
479       - email-notification:
480           email-recipients: '{email-recipients}'
481           email-prefix: '[releng]'
482       - lf-infra-publish