Add job to cleanup stale stacks
[releng/builder.git] / jjb / releng-jobs.yaml
1 - project:
2     name: builder-jobs
3     jobs:
4         - 'builder-verify-jjb'
5         - 'builder-verify-python'
6         - 'builder-merge'
7         - 'builder-weekly'
8         - 'builder-check-poms'
9         - 'builder-verify-packer'
10         - 'builder-merge-packer-{platforms}-{templates}'
11         - 'builder-delete-stale-stacks'
12
13     platforms:
14         - centos
15         - ubuntu-14.04
16
17     templates:
18         - devstack
19         - devstack-pre-pip-mitaka
20         - devstack-pre-pip-newton
21         - docker
22         - gbp
23         - java-builder
24         - mininet
25         - mininet-ovs-2.3
26         - mininet-ovs-2.5
27         - robot
28
29     exclude:
30         - platforms: centos
31           templates: gbp
32         - platforms: centos
33           templates: mininet
34         - platforms: centos
35           templates: mininet-ovs-2.3
36         - platforms: centos
37           templates: mininet-ovs-2.5
38         - platforms: ubuntu-14.04
39           templates: java-builder
40         - platforms: ubuntu-14.04
41           templates: robot
42         - platforms: ubuntu-14.04
43           templates: devstack-pre-pip-mitaka
44         - platforms: ubuntu-14.04
45           templates: devstack-pre-pip-newton
46
47     project-type: freestyle
48     archive-artifacts: '**/*.log'
49     build-timeout: '60'
50     # The following two values are only specified here
51     # so that code blocks look similar to other projects.
52     project: 'releng/builder'
53     branch: 'master'
54
55 - job-template:
56     name: builder-verify-jjb
57     node: jjbuilder
58
59     project-type: freestyle
60
61     properties:
62         - opendaylight-infra-properties:
63             build-days-to-keep: 14
64
65     parameters:
66         - opendaylight-infra-parameters:
67             project: '{project}'
68             branch: '{branch}'
69             refspec: 'refs/heads/{branch}'
70             artifacts: '{archive-artifacts}'
71
72     scm:
73         - gerrit-trigger-scm:
74             refspec: '$GERRIT_REFSPEC'
75             choosing-strategy: 'gerrit'
76
77     wrappers:
78         - opendaylight-infra-wrappers:
79             build-timeout: '{build-timeout}'
80
81     triggers:
82         - gerrit-trigger-patch-submitted:
83             server: '{server-name}'
84             project: '{project}'
85             branch: '{branch}'
86             files: 'jjb/**'
87
88     builders:
89         - shell: |
90             pip freeze
91             jenkins-jobs -l DEBUG test --recursive -o archives/job_output jjb/
92             gzip archives/job_output/*
93
94         - releng-check-unicode
95         - verify-gpg-signature
96
97     publishers:
98         - email-notification:
99             email-recipients: '{email-recipients}'
100             email-prefix: '[releng]'
101         - opendaylight-infra-shiplogs:
102             maven-version: 'mvn33'
103
104 # FIXME: Migrate to {project-name}-verify-python-{stream} or delete this entirely,
105 #        as there are zero python files (aside docs/conf.py) in releng/builder.
106 - job-template:
107     name: builder-verify-python
108     node: centos7-java-builder-2c-8g
109
110     project-type: freestyle
111
112     properties:
113         - opendaylight-infra-properties:
114             build-days-to-keep: 14
115
116     parameters:
117         - opendaylight-infra-parameters:
118             project: '{project}'
119             branch: '{branch}'
120             refspec: 'refs/heads/{branch}'
121             artifacts: '{archive-artifacts}'
122
123     scm:
124         - gerrit-trigger-scm:
125             refspec: '$GERRIT_REFSPEC'
126             choosing-strategy: 'gerrit'
127
128     wrappers:
129         - opendaylight-infra-wrappers:
130             build-timeout: '{build-timeout}'
131
132     triggers:
133         - gerrit-trigger-patch-submitted:
134             server: '{server-name}'
135             project: '{project}'
136             branch: '{branch}'
137             files: 'scripts/**'
138
139     builders:
140         - verify-gpg-signature
141         - shell: |
142             virtualenv $WORKSPACE/venv
143             source $WORKSPACE/venv/bin/activate
144             pip install --upgrade pip
145             pip freeze
146             pip install flake8
147             flake8 scripts/
148
149     publishers:
150         - email-notification:
151             email-recipients: '{email-recipients}'
152             email-prefix: '[releng]'
153         - opendaylight-infra-shiplogs:
154             maven-version: 'mvn33'
155
156 - job-template:
157     name: 'builder-merge'
158     node: jjbuilder
159
160     # builder-merge job to run JJB update
161     #
162     # This job's purpose is to update all the JJB
163
164     project-type: freestyle
165
166     properties:
167         - opendaylight-infra-properties:
168             build-days-to-keep: 14
169
170     parameters:
171         - opendaylight-infra-parameters:
172             project: '{project}'
173             branch: '{branch}'
174             refspec: 'refs/heads/{branch}'
175             artifacts: '{archive-artifacts}'
176
177     scm:
178         - gerrit-trigger-scm:
179             refspec: ''
180             choosing-strategy: 'default'
181
182     wrappers:
183         - opendaylight-infra-wrappers:
184             build-timeout: '{build-timeout}'
185
186     triggers:
187         - gerrit:
188             server-name: '{server-name}'
189             trigger-on:
190                 - change-merged-event
191                 - comment-added-contains-event:
192                     comment-contains-value: 'remerge'
193             projects:
194               - project-compare-type: 'ANT'
195                 project-pattern: 'releng/builder'
196                 branches:
197                     - branch-compare-type: 'ANT'
198                       branch-pattern: '**/{branch}'
199                 file-paths:
200                     - compare-type: ANT
201                       pattern: jjb/**
202
203     builders:
204         - shell: |
205             pip freeze
206             jenkins-jobs --version
207             jenkins-jobs update --recursive --delete-old --workers 4 jjb/
208
209     publishers:
210         - email-notification:
211             email-recipients: '{email-recipients}'
212             email-prefix: '[releng]'
213         - opendaylight-infra-shiplogs:
214             maven-version: 'mvn33'
215
216 - job-template:
217     name: 'builder-weekly'
218     disabled: false
219     node: jjbuilder
220
221     # builder-weekly job to run JJB update weekly
222     #
223     # This job's purpose is to update all the JJB on a weekly (Sunday)
224     # basis with --flush-cache enabled to ensure jobs are okay
225
226     project-type: freestyle
227
228     properties:
229         - opendaylight-infra-properties:
230             build-days-to-keep: 14
231
232     parameters:
233         - opendaylight-infra-parameters:
234             project: '{project}'
235             branch: '{branch}'
236             refspec: 'refs/heads/{branch}'
237             artifacts: '{archive-artifacts}'
238
239     scm:
240         - git-scm:
241             branch: '{branch}'
242
243     wrappers:
244         - opendaylight-infra-wrappers:
245             build-timeout: '{build-timeout}'
246
247     triggers:
248         - timed: 'H H * * 0'
249
250     builders:
251         - shell: |
252             jenkins-jobs --flush-cache update --recursive --workers 4 jjb/
253
254     publishers:
255         - email-notification:
256             email-recipients: '{email-recipients}'
257             email-prefix: '[releng]'
258         - opendaylight-infra-shiplogs:
259             maven-version: 'mvn33'
260
261 - job-template:
262     name: builder-check-poms
263     node: centos7-java-builder-2c-8g
264
265     project-type: freestyle
266
267     properties:
268         - opendaylight-infra-properties:
269             build-days-to-keep: 14
270
271     parameters:
272         - opendaylight-infra-parameters:
273             project: '{project}'
274             branch: '{branch}'
275             refspec: 'refs/heads/{branch}'
276             artifacts: '{archive-artifacts}'
277
278     wrappers:
279         - opendaylight-infra-wrappers:
280             build-timeout: '{build-timeout}'
281
282     triggers:
283         - timed: 'H H * * 1'
284
285     builders:
286         - shell:
287             !include-raw-escape:
288                 - include-raw-check-poms.sh
289
290     publishers:
291         - email-notification:
292             email-recipients: '{email-recipients}'
293             email-prefix: '[releng]'
294         - opendaylight-infra-shiplogs:
295             maven-version: 'mvn33'
296
297 - job-template:
298     name: 'builder-delete-stale-stacks'
299     project-type: freestyle
300     node: centos7-java-builder-2c-4g
301
302     properties:
303         - opendaylight-infra-properties:
304             build-days-to-keep: 7
305
306     wrappers:
307         - opendaylight-infra-wrappers:
308             build-timeout: '{build-timeout}'
309
310     triggers:
311         - timed: 'H H/6 * * *'
312
313     builders:
314         - shell: !include-raw-escape: opendaylight-infra-cleanup-stale-stacks.sh
315
316     publishers:
317         - email-notification:
318             email-recipients: '{email-recipients}'
319             email-prefix: '[releng]'
320         - opendaylight-infra-shiplogs:
321             maven-version: 'mvn33'
322
323 - job-template:
324     name: 'builder-verify-packer'
325     project-type: freestyle
326     node: centos7-java-builder-2c-8g
327     concurrent: true
328
329     properties:
330         - opendaylight-infra-properties:
331             build-days-to-keep: 14
332
333     parameters:
334         - opendaylight-infra-parameters:
335             project: '{project}'
336             branch: '{branch}'
337             refspec: 'refs/heads/{branch}'
338             artifacts: '{archive-artifacts}'
339
340     scm:
341         - gerrit-trigger-scm:
342             refspec: '$GERRIT_REFSPEC'
343             choosing-strategy: 'gerrit'
344
345     wrappers:
346         - opendaylight-infra-wrappers:
347             build-timeout: '{build-timeout}'
348
349     triggers:
350         - gerrit-trigger-patch-submitted:
351             server: '{server-name}'
352             project: '{project}'
353             branch: '{branch}'
354             files: 'packer/**'
355
356     builders:
357         - packer-validate:
358             platform: '{platforms}'
359             template: '{templates}'
360
361     publishers:
362         - email-notification:
363             email-recipients: '{email-recipients}'
364             email-prefix: '[{project}]'
365         - opendaylight-infra-shiplogs:
366             maven-version: 'mvn33'
367
368 - job-template:
369     name: 'builder-merge-packer-{platforms}-{templates}'
370     project-type: freestyle
371     node: centos7-java-builder-2c-8g
372     concurrent: true
373
374     properties:
375         - opendaylight-infra-properties:
376             build-days-to-keep: 14
377
378     parameters:
379         - opendaylight-infra-parameters:
380             project: '{project}'
381             branch: '{branch}'
382             refspec: 'refs/heads/{branch}'
383             artifacts: '{archive-artifacts}'
384
385     scm:
386         - gerrit-trigger-scm:
387             refspec: ''
388             choosing-strategy: 'default'
389
390     wrappers:
391         - opendaylight-infra-wrappers:
392             build-timeout: '{build-timeout}'
393
394     triggers:
395         - timed: '00 10 1 * *'
396         - gerrit:
397             server-name: '{server-name}'
398             trigger-on:
399                 - change-merged-event
400                 - comment-added-contains-event:
401                     comment-contains-value: 'remerge'
402             projects:
403               - project-compare-type: 'ANT'
404                 project-pattern: 'releng/builder'
405                 branches:
406                     - branch-compare-type: 'ANT'
407                       branch-pattern: '**/{branch}'
408                 file-paths:
409                     - compare-type: ANT
410                       pattern: 'packer/**'
411
412     builders:
413         - packer-validate:
414             platform: '{platforms}'
415             template: '{templates}'
416         - packer-build:
417             platform: '{platforms}'
418             template: '{templates}'
419
420     publishers:
421         - email-notification:
422             email-recipients: '{email-recipients}'
423             email-prefix: '[{project}]'
424         - opendaylight-infra-shiplogs:
425             maven-version: 'mvn33'