Strip include-raw prefix for script files
[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: packer-jobs
28     # packer jobs templates are defined in global-jjb
29     jobs:
30       - '{project-name}-packer-jobs'
31     project: 'releng/builder'
32     project-name: builder
33     branch: master
34     archive-artifacts: '**/*.log'
35
36     platforms:
37       - centos
38       - ubuntu-14.04
39       - ubuntu-16.04
40
41     templates:
42       - devstack
43       - devstack-pre-pip-newton:
44           build-timeout: 75
45       - devstack-pre-pip-ocata:
46           build-timeout: 60
47       - docker
48       - gbp
49       - java-builder:
50           build-timeout: 75
51       - mininet
52       - mininet-ovs-2.5:
53           build-timeout: 60
54       - robot
55
56     exclude:
57       - platforms: centos
58         templates: gbp
59       - platforms: centos
60         templates: mininet
61       - platforms: centos
62         templates: mininet-ovs-2.5
63       - platforms: ubuntu-14.04
64         templates: java-builder
65       - platforms: ubuntu-14.04
66         templates: robot
67       - platforms: ubuntu-14.04
68         templates: devstack-pre-pip-newton
69       - platforms: ubuntu-14.04
70         templates: devstack-pre-pip-ocata
71       - platforms: ubuntu-14.04
72         templates: devstack
73       - platforms: ubuntu-14.04
74         templates: docker
75       - platforms: ubuntu-14.04
76         templates: mininet-ovs-2.5
77       - platforms: ubuntu-16.04
78         templates: java-builder
79       - platforms: ubuntu-16.04
80         templates: robot
81       - platforms: ubuntu-16.04
82         templates: devstack-pre-pip-newton
83       - platforms: ubuntu-16.04
84         templates: devstack-pre-pip-ocata
85       - platforms: ubuntu-16.04
86         templates: devstack
87       - platforms: ubuntu-16.04
88         templates: docker
89       - platforms: ubuntu-16.04
90         templates: mininet
91       - platforms: ubuntu-16.04
92         templates: gbp
93       - platforms: ubuntu-16.04
94         templates: baseline
95       - platforms: centos
96         templates: baseline
97
98 - job-template:
99     name: builder-check-poms
100     node: centos7-java-builder-2c-4g
101
102     project-type: freestyle
103
104     properties:
105       - opendaylight-infra-properties:
106           build-days-to-keep: 14
107
108     parameters:
109       - opendaylight-infra-parameters:
110           os-cloud: '{os-cloud}'
111           project: '{project}'
112           branch: '{branch}'
113           refspec: 'refs/heads/{branch}'
114           artifacts: '{archive-artifacts}'
115
116     wrappers:
117       - opendaylight-infra-wrappers:
118           build-timeout: '{build-timeout}'
119
120     triggers:
121       - timed: 'H H * * 1'
122
123     builders:
124       - shell: !include-raw-escape: check-poms.sh
125
126     publishers:
127       - email-notification:
128           email-recipients: '{email-recipients}'
129           email-prefix: '[releng]'
130       - lf-infra-publish
131
132
133 - job-template:
134     name: 'builder-cleanup-old-images'
135     project-type: freestyle
136     node: centos7-java-builder-2c-4g
137
138     properties:
139       - opendaylight-infra-properties:
140           build-days-to-keep: 7
141
142     parameters:
143       - opendaylight-infra-parameters:
144           os-cloud: '{os-cloud}'
145           project: '{project}'
146           branch: '{branch}'
147           refspec: 'refs/heads/{branch}'
148           artifacts: '{archive-artifacts}'
149
150     scm:
151       - git-scm:
152           branch: '{branch}'
153
154     wrappers:
155       - opendaylight-infra-wrappers:
156           build-timeout: '{build-timeout}'
157       # Listed after to override openstack-infra-wrappers clouds.yaml definition
158       - config-file-provider:
159           files:
160             - file-id: opendaylight-private-clouds-yaml
161               target: '$HOME/.config/openstack/clouds.yaml'
162
163     triggers:
164       # Cleanup images on a weekly schedule
165       - timed: '@weekly'
166
167     builders:
168       - shell: !include-raw-escape:
169           - global-jjb/shell/lftools-install.sh
170           - opendaylight-infra-cleanup-old-images.sh
171
172     publishers:
173       - email-notification:
174           email-recipients: '{email-recipients}'
175           email-prefix: '[releng]'
176       - lf-infra-publish
177
178
179 - job-template:
180     name: 'builder-delete-stale-nodes'
181     project-type: freestyle
182     node: centos7-java-builder-2c-4g
183
184     properties:
185       - opendaylight-infra-properties:
186           build-days-to-keep: 7
187
188     parameters:
189       - opendaylight-infra-parameters:
190           os-cloud: '{os-cloud}'
191           project: '{project}'
192           branch: '{branch}'
193           refspec: 'refs/heads/{branch}'
194           artifacts: '{archive-artifacts}'
195
196     wrappers:
197       - opendaylight-infra-wrappers:
198           build-timeout: '{build-timeout}'
199
200     triggers:
201       # Attempt to clear up stacks every 30 mins in case we have orphaned stacks
202       - timed: '0,30 * * * *'
203
204     builders:
205       - shell: !include-raw-escape:
206           - global-jjb/shell/lftools-install.sh
207           - opendaylight-infra-cleanup-stale-nodes.sh
208
209     publishers:
210       - email-notification:
211           email-recipients: '{email-recipients}'
212           email-prefix: '[releng]'
213       - lf-infra-publish
214
215
216 - job-template:
217     name: 'builder-delete-stale-stacks'
218     project-type: freestyle
219     node: centos7-java-builder-2c-4g
220
221     properties:
222       - opendaylight-infra-properties:
223           build-days-to-keep: 7
224
225     parameters:
226       - opendaylight-infra-parameters:
227           os-cloud: '{os-cloud}'
228           project: '{project}'
229           branch: '{branch}'
230           refspec: 'refs/heads/{branch}'
231           artifacts: '{archive-artifacts}'
232
233     wrappers:
234       - opendaylight-infra-wrappers:
235           build-timeout: '{build-timeout}'
236
237     triggers:
238       # Attempt to clear up stacks every 30 mins in case we have orphaned stacks
239       - timed: '0,30 * * * *'
240
241     builders:
242       - shell: !include-raw-escape: opendaylight-infra-cleanup-stale-stacks.sh
243
244     publishers:
245       - email-notification:
246           email-recipients: '{email-recipients}'
247           email-prefix: '[releng]'
248       - lf-infra-publish
249
250
251 - job-template:
252     name: 'builder-update-image-list'
253     project-type: freestyle
254     node: centos7-java-builder-2c-4g
255
256     properties:
257       - opendaylight-infra-properties:
258           build-days-to-keep: 7
259
260     parameters:
261       - opendaylight-infra-parameters:
262           os-cloud: odlpriv
263           project: '{project}'
264           branch: '{branch}'
265           refspec: 'refs/heads/{branch}'
266           artifacts: '{archive-artifacts}'
267
268     scm:
269       - git-scm:
270           branch: '{branch}'
271
272     wrappers:
273       - opendaylight-infra-wrappers:
274           build-timeout: '{build-timeout}'
275       # Listed after to override openstack-infra-wrappers clouds.yaml definition
276       - config-file-provider:
277           files:
278             - file-id: opendaylight-private-clouds-yaml
279               target: '$HOME/.config/openstack/clouds.yaml'
280
281     triggers:
282       # Update image list every Monday to Friday at 11:00 UTC
283       - timed: '0 11 * * 1-5'
284
285     builders:
286       - shell: !include-raw-escape: opendaylight-infra-update-image-list.sh
287       - opendaylight-infra-push-gerrit-patch:
288           project: '{project}'
289           gerrit-topic: 'releng-update-cloud-image-list'
290           gerrit-commit-message: 'Update cloud image list docs'
291
292     publishers:
293       - email-notification:
294           email-recipients: '{email-recipients}'
295           email-prefix: '[releng]'
296       - lf-infra-publish
297
298 - job-template:
299     name: 'builder-update-csit-tests'
300     node: centos7-java-builder-2c-8g
301
302     # builder-update-csit-tests job
303     #
304     # This job's purpose is to update csit
305     # tests to run in integration-distribution-test-{stream}
306     # by updating releng-defaults variables: csit-list-carbon,
307     # csit-list-boron, csit-list-beryllium
308
309     project-type: freestyle
310
311     properties:
312       - opendaylight-infra-properties:
313           build-days-to-keep: 14
314
315     parameters:
316       - opendaylight-infra-parameters:
317           os-cloud: '{os-cloud}'
318           project: '{project}'
319           branch: '{branch}'
320           refspec: 'refs/heads/{branch}'
321           artifacts: '{archive-artifacts}'
322
323     scm:
324       - gerrit-trigger-scm:
325           refspec: ''
326           choosing-strategy: 'default'
327
328     wrappers:
329       - opendaylight-infra-wrappers:
330           build-timeout: '{build-timeout}'
331
332     triggers:
333       - reverse:
334           jobs: 'builder-jjb-merge'
335
336     builders:
337       - shell: |
338           git checkout -b auto-update-csit-jobs
339       - integration-list-jobs:
340           blacklist: '{csit-list-blacklist}'
341           search_string: "csit"
342           stream: "oxygen"
343           jobs-filename: "csit_jobs_oxygen.lst"
344       - integration-list-jobs:
345           blacklist: '{csit-list-blacklist}'
346           search_string: "csit"
347           stream: "nitrogen"
348           jobs-filename: "csit_jobs_nitrogen.lst"
349       - integration-list-jobs:
350           blacklist: '{csit-list-blacklist}'
351           search_string: "csit"
352           stream: "carbon"
353           jobs-filename: "csit_jobs_carbon.lst"
354       - integration-list-jobs:
355           blacklist: '{csit-list-blacklist}'
356           search_string: "csit"
357           stream: "boron"
358           jobs-filename: "csit_jobs_boron.lst"
359       - integration-replace-block-text:
360           starting-regex: "'csit-list-oxygen: >'"
361           ending-regex: "'csit-list-nitrogen: >'"
362           file-with-changes-to-insert: "'csit_jobs_oxygen.lst'"
363           file-to-change: "'jjb/releng-defaults.yaml'"
364       - integration-replace-block-text:
365           starting-regex: "'csit-list-nitrogen: >'"
366           ending-regex: "'csit-list-carbon: >'"
367           file-with-changes-to-insert: "'csit_jobs_nitrogen.lst'"
368           file-to-change: "'jjb/releng-defaults.yaml'"
369       - integration-replace-block-text:
370           starting-regex: "'csit-list-carbon: >'"
371           ending-regex: "'csit-list-boron: >'"
372           file-with-changes-to-insert: "'csit_jobs_carbon.lst'"
373           file-to-change: "'jjb/releng-defaults.yaml'"
374       - integration-replace-block-text:
375           starting-regex: "'csit-list-boron: >'"
376           ending-regex: "'# CSIT TESTS END SED MARKER'"
377           file-with-changes-to-insert: "'csit_jobs_boron.lst'"
378           file-to-change: "'jjb/releng-defaults.yaml'"
379       - shell: |
380           git status
381           git add jjb/releng-defaults.yaml
382       - opendaylight-infra-push-gerrit-patch:
383           project: "releng/builder"
384           gerrit-topic: "auto-update-csit-jobs"
385           gerrit-commit-message: "Auto Update CSIT Jobs to run"
386
387     publishers:
388       - email-notification:
389           email-recipients: '{email-recipients}'
390           email-prefix: '[releng]'
391       - lf-infra-publish