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