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