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