Move cleanup-old-images job into openstack-cron
[releng/builder.git] / jjb / releng-jobs.yaml
1 ---
2 - project:
3     name: builder-jobs
4     jobs:
5       - '{project-name}-ci-jobs':
6           build-node: centos7-builder-2c-2g
7       - builder-check-poms
8       - builder-copy-sandbox-logs
9       - builder-openstack-cron
10       - gerrit-tox-verify
11       # OpenStack Related
12       - 'builder-delete-orphaned-nodes'
13       - 'builder-delete-stale-nodes'
14       - 'builder-delete-stale-stacks'
15       # Automation for docs and jobs
16       - 'builder-update-image-list'
17
18     # The following values are only specified here
19     # so that code blocks look similar to other projects.
20     project: 'releng/builder'
21     project-name: builder
22     stream: master
23     branch: master
24     build-node: centos7-builder-2c-1g
25     archive-artifacts: '**/*.log'
26     build-timeout: 30
27     jjb-version: 2.0.0
28
29 - project:
30     name: packer-jobs
31     # packer jobs templates are defined in global-jjb
32     jobs:
33       - '{project-name}-packer-jobs'
34     project: 'releng/builder'
35     project-name: builder
36     branch: master
37     archive-artifacts: '**/*.log'
38     build-node: centos7-builder-2c-1g
39
40     platforms:
41       - centos
42       - ubuntu-14.04
43       - ubuntu-16.04
44
45     templates:
46       - devstack
47       - devstack-pre-pip-newton:
48           build-timeout: 75
49       - devstack-pre-pip-ocata:
50           build-timeout: 75
51       - devstack-pre-pip-pike:
52           build-timeout: 75
53       - gbp
54       - mininet-ovs-2.5:
55           build-timeout: 60
56       - mininet-ovs-2.6:
57           build-timeout: 75
58
59     exclude:
60       - platforms: centos
61         templates: gbp
62       - platforms: centos
63         templates: mininet-ovs-2.5
64       - platforms: centos
65         templates: mininet-ovs-2.6
66       - platforms: ubuntu-14.04
67         templates: devstack-pre-pip-newton
68       - platforms: ubuntu-14.04
69         templates: devstack-pre-pip-ocata
70       - platforms: ubuntu-14.04
71         templates: devstack-pre-pip-pike
72       - platforms: ubuntu-14.04
73         templates: devstack
74       - platforms: ubuntu-14.04
75         templates: mininet-ovs-2.5
76       - platforms: ubuntu-14.04
77         templates: mininet-ovs-2.6
78       - platforms: ubuntu-16.04
79         templates: devstack-pre-pip-newton
80       - platforms: ubuntu-16.04
81         templates: devstack-pre-pip-ocata
82       - platforms: ubuntu-16.04
83         templates: devstack-pre-pip-pike
84       - platforms: ubuntu-16.04
85         templates: devstack
86
87 - job-template:
88     name: builder-check-poms
89     node: centos7-builder-2c-1g
90
91     project-type: freestyle
92
93     properties:
94       - opendaylight-infra-properties:
95           build-days-to-keep: 14
96
97     parameters:
98       - opendaylight-infra-parameters:
99           os-cloud: '{os-cloud}'
100           project: '{project}'
101           branch: '{branch}'
102           refspec: 'refs/heads/{branch}'
103           artifacts: '{archive-artifacts}'
104
105     wrappers:
106       - opendaylight-infra-wrappers:
107           build-timeout: '{build-timeout}'
108
109     triggers:
110       - timed: 'H H * * 1'
111
112     builders:
113       - shell: !include-raw-escape: check-poms.sh
114
115     publishers:
116       - email-notification:
117           email-recipients: '{email-recipients}'
118           email-prefix: '[releng]'
119       - lf-infra-publish
120
121 - job-template:
122     name: builder-copy-sandbox-logs
123     node: centos7-builder-2c-1g
124
125     project-type: freestyle
126
127     properties:
128       - opendaylight-infra-properties:
129           build-days-to-keep: 1
130
131     parameters:
132       - opendaylight-infra-parameters:
133           os-cloud: ''
134           project: ''
135           branch: ''
136           refspec: ''
137           artifacts: ''
138
139     wrappers:
140       - opendaylight-infra-wrappers:
141           build-timeout: 10
142
143     triggers:
144       - gerrit:
145           server-name: '{gerrit-server-name}'
146           trigger-on:
147             - comment-added-contains-event:
148                 comment-contains-value: 'copy-logs:'
149           projects:
150             - project-compare-type: ANT
151               project-pattern: '**'
152               branches:
153                 - branch-compare-type: ANT
154                   branch-pattern: '**'
155
156     builders:
157       - shell: !include-raw-escape: copy-sandbox-logs.sh
158
159     publishers:
160       - lf-infra-publish
161
162
163 - job-template:
164     name: builder-openstack-cron
165     project-type: freestyle
166     node: '{build-node}'
167
168     properties:
169       - lf-infra-properties:
170           build-days-to-keep: 7
171
172     parameters:
173       - lf-infra-parameters:
174           project: '{project}'
175           stream: '{stream}'
176           branch: '{branch}'
177           lftools-version: '{lftools-version}'
178       - string:
179           name: OS_CLOUD
180           default: '{os-cloud}'
181           description: Artifacts to archive to the logs server.
182       - string:
183           name: ARCHIVE_ARTIFACTS
184           default: '{archive-artifacts}'
185           description: Artifacts to archive to the logs server.
186
187     scm:
188       - git-scm:
189           branch: '{branch}'
190
191     wrappers:
192       - lf-infra-wrappers:
193           build-timeout: '{build-timeout}'
194           jenkins-ssh-credential: '{jenkins-ssh-credential}'
195       # Listed after to override openstack-infra-wrappers clouds.yaml definition
196       - config-file-provider:
197           files:
198             - file-id: clouds-yaml
199               target: '$HOME/.config/openstack/clouds.yaml'
200
201     triggers:
202       - timed: '0,30 * * * *'
203
204     builders:
205       - odl-openstack-install
206       - shell: !include-raw-escape: global-jjb/shell/lftools-install.sh
207       - odl-openstack-check-image-protection
208       - odl-openstack-cleanup-old-images
209
210     publishers:
211       - lf-infra-publish
212
213
214 - job-template:
215     name: builder-delete-orphaned-nodes
216     project-type: freestyle
217     node: centos7-builder-2c-1g
218
219     properties:
220       - opendaylight-infra-properties:
221           build-days-to-keep: 7
222
223     parameters:
224       - opendaylight-infra-parameters:
225           os-cloud: '{os-cloud}'
226           project: '{project}'
227           branch: '{branch}'
228           refspec: 'refs/heads/{branch}'
229           artifacts: '{archive-artifacts}'
230       - string:
231           name: JENKINS_URLS
232           default: 'https://jenkins.opendaylight.org/releng https://jenkins.opendaylight.org/sandbox'
233           description: 'Space separated list of Jenkins URLs to check for active builds'
234
235     wrappers:
236       - opendaylight-infra-wrappers:
237           build-timeout: '{build-timeout}'
238
239     triggers:
240       # Attempt to clear up servers every 30 mins in case we have orphaned servers
241       - timed: '0,30 * * * *'
242
243     builders:
244       - shell: !include-raw-escape: opendaylight-infra-cleanup-orphaned-nodes.sh
245
246     publishers:
247       - email-notification:
248           email-recipients: '{email-recipients}'
249           email-prefix: '[releng]'
250       - lf-infra-publish
251
252
253 - job-template:
254     name: 'builder-delete-stale-nodes'
255     project-type: freestyle
256     node: centos7-builder-2c-1g
257
258     properties:
259       - opendaylight-infra-properties:
260           build-days-to-keep: 7
261
262     parameters:
263       - opendaylight-infra-parameters:
264           os-cloud: '{os-cloud}'
265           project: '{project}'
266           branch: '{branch}'
267           refspec: 'refs/heads/{branch}'
268           artifacts: '{archive-artifacts}'
269
270     wrappers:
271       - opendaylight-infra-wrappers:
272           build-timeout: '{build-timeout}'
273
274     triggers:
275       # Attempt to clear up stacks every 30 mins in case we have orphaned stacks
276       - timed: '0,30 * * * *'
277
278     builders:
279       - shell: !include-raw-escape:
280           - global-jjb/shell/lftools-install.sh
281           - opendaylight-infra-cleanup-stale-nodes.sh
282
283     publishers:
284       - email-notification:
285           email-recipients: '{email-recipients}'
286           email-prefix: '[releng]'
287       - lf-infra-publish
288
289
290 - job-template:
291     name: 'builder-delete-stale-stacks'
292     project-type: freestyle
293     node: centos7-builder-2c-1g
294
295     properties:
296       - opendaylight-infra-properties:
297           build-days-to-keep: 7
298
299     parameters:
300       - opendaylight-infra-parameters:
301           os-cloud: '{os-cloud}'
302           project: '{project}'
303           branch: '{branch}'
304           refspec: 'refs/heads/{branch}'
305           artifacts: '{archive-artifacts}'
306       - string:
307           name: JENKINS_URLS
308           default: 'https://jenkins.opendaylight.org/releng https://jenkins.opendaylight.org/sandbox'
309           description: 'Space separated list of Jenkins URLs to check for active builds'
310
311     wrappers:
312       - opendaylight-infra-wrappers:
313           build-timeout: '{build-timeout}'
314
315     triggers:
316       # Attempt to clear up stacks every 30 mins in case we have orphaned stacks
317       - timed: '0,30 * * * *'
318
319     builders:
320       - shell: !include-raw-escape: opendaylight-infra-cleanup-stale-stacks.sh
321
322     publishers:
323       - email-notification:
324           email-recipients: '{email-recipients}'
325           email-prefix: '[releng]'
326       - lf-infra-publish
327
328
329 - job-template:
330     name: 'builder-update-image-list'
331     project-type: freestyle
332     node: centos7-builder-2c-1g
333
334     properties:
335       - opendaylight-infra-properties:
336           build-days-to-keep: 7
337
338     parameters:
339       - opendaylight-infra-parameters:
340           os-cloud: vex
341           project: '{project}'
342           branch: '{branch}'
343           refspec: 'refs/heads/{branch}'
344           artifacts: '{archive-artifacts}'
345
346     scm:
347       - git-scm:
348           branch: '{branch}'
349
350     wrappers:
351       - opendaylight-infra-wrappers:
352           build-timeout: '{build-timeout}'
353       # Listed after to override openstack-infra-wrappers clouds.yaml definition
354       - config-file-provider:
355           files:
356             - file-id: clouds-yaml
357               target: '$HOME/.config/openstack/clouds.yaml'
358
359     triggers:
360       # Update image list every Monday to Friday at 11:00 UTC
361       - timed: '0 11 * * 1-5'
362
363     builders:
364       - shell: !include-raw-escape: opendaylight-infra-update-image-list.sh
365       - opendaylight-infra-push-gerrit-patch:
366           project: '{project}'
367           gerrit-topic: 'releng-update-cloud-image-list'
368           gerrit-commit-message: 'Update cloud image list docs'
369
370     publishers:
371       - email-notification:
372           email-recipients: '{email-recipients}'
373           email-prefix: '[releng]'
374       - lf-infra-publish