4002578bd47bdfedcf0c4bddabb95be10abdc3f7
[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       # Packer jobs
9       - 'builder-verify-packer'
10       - 'builder-merge-packer-{platforms}-{templates}'
11       # OpenStack Related
12       - 'builder-cleanup-old-images'
13       - 'builder-delete-stale-nodes'
14       - 'builder-delete-stale-stacks'
15       # Automation for docs and jobs
16       - 'builder-update-csit-tests'
17       - 'builder-update-image-list'
18
19     platforms:
20       - centos
21       - ubuntu-14.04
22       - ubuntu-16.04
23
24     templates:
25       - devstack
26       - devstack-pre-pip-newton
27       - docker
28       - gbp
29       - java-builder
30       - mininet
31       - mininet-ovs-2.5
32       - robot
33
34     exclude:
35       - platforms: centos
36         templates: gbp
37       - platforms: centos
38         templates: mininet
39       - platforms: centos
40         templates: mininet-ovs-2.5
41       - platforms: ubuntu-14.04
42         templates: java-builder
43       - platforms: ubuntu-14.04
44         templates: robot
45       - platforms: ubuntu-14.04
46         templates: devstack-pre-pip-newton
47       - platforms: ubuntu-14.04
48         templates: devstack
49       - platforms: ubuntu-14.04
50         templates: docker
51       - platforms: ubuntu-14.04
52         templates: mininet-ovs-2.5
53       - platforms: ubuntu-16.04
54         templates: java-builder
55       - platforms: ubuntu-16.04
56         templates: robot
57       - platforms: ubuntu-16.04
58         templates: devstack-pre-pip-newton
59       - platforms: ubuntu-16.04
60         templates: devstack
61       - platforms: ubuntu-16.04
62         templates: docker
63       - platforms: ubuntu-16.04
64         templates: mininet
65       - platforms: ubuntu-16.04
66         templates: gbp
67
68
69     project-type: freestyle
70     archive-artifacts: '**/*.log'
71     build-timeout: '60'
72
73     # The following values are only specified here
74     # so that code blocks look similar to other projects.
75     project: 'releng/builder'
76     project-name: builder
77     stream: master
78     branch: master
79     build-node: centos7-java-builder-2c-4g
80
81 - job-template:
82     name: builder-check-poms
83     node: centos7-java-builder-2c-4g
84
85     project-type: freestyle
86
87     properties:
88       - opendaylight-infra-properties:
89           build-days-to-keep: 14
90
91     parameters:
92       - opendaylight-infra-parameters:
93           os-cloud: '{os-cloud}'
94           project: '{project}'
95           branch: '{branch}'
96           refspec: 'refs/heads/{branch}'
97           artifacts: '{archive-artifacts}'
98
99     wrappers:
100       - opendaylight-infra-wrappers:
101           build-timeout: '{build-timeout}'
102
103     triggers:
104       - timed: 'H H * * 1'
105
106     builders:
107       - shell: !include-raw-escape: include-raw-check-poms.sh
108
109     publishers:
110       - email-notification:
111           email-recipients: '{email-recipients}'
112           email-prefix: '[releng]'
113       - opendaylight-infra-shiplogs:
114           maven-version: 'mvn33'
115
116
117 - job-template:
118     name: 'builder-cleanup-old-images'
119     project-type: freestyle
120     node: centos7-java-builder-2c-4g
121
122     properties:
123       - opendaylight-infra-properties:
124           build-days-to-keep: 7
125
126     parameters:
127       - opendaylight-infra-parameters:
128           os-cloud: '{os-cloud}'
129           project: '{project}'
130           branch: '{branch}'
131           refspec: 'refs/heads/{branch}'
132           artifacts: '{archive-artifacts}'
133
134     scm:
135       - git-scm:
136           branch: '{branch}'
137
138     wrappers:
139       - opendaylight-infra-wrappers:
140           build-timeout: '{build-timeout}'
141       # Listed after to override openstack-infra-wrappers clouds.yaml definition
142       - config-file-provider:
143           files:
144             - file-id: opendaylight-private-clouds-yaml
145               target: '$HOME/.config/openstack/clouds.yaml'
146
147     triggers:
148       # Cleanup images on a weekly schedule
149       - timed: '@weekly'
150
151     builders:
152       - shell: !include-raw-escape:
153           - global-jjb/shell/lftools-install.sh
154           - opendaylight-infra-cleanup-old-images.sh
155
156     publishers:
157       - email-notification:
158           email-recipients: '{email-recipients}'
159           email-prefix: '[releng]'
160       - opendaylight-infra-shiplogs:
161           maven-version: 'mvn33'
162
163
164 - job-template:
165     name: 'builder-delete-stale-nodes'
166     project-type: freestyle
167     node: centos7-java-builder-2c-4g
168
169     properties:
170       - opendaylight-infra-properties:
171           build-days-to-keep: 7
172
173     parameters:
174       - opendaylight-infra-parameters:
175           os-cloud: '{os-cloud}'
176           project: '{project}'
177           branch: '{branch}'
178           refspec: 'refs/heads/{branch}'
179           artifacts: '{archive-artifacts}'
180
181     wrappers:
182       - opendaylight-infra-wrappers:
183           build-timeout: '{build-timeout}'
184
185     triggers:
186       # Attempt to clear up stacks every 30 mins in case we have orphaned stacks
187       - timed: '0,30 * * * *'
188
189     builders:
190       - shell: !include-raw-escape:
191           - global-jjb/shell/lftools-install.sh
192           - opendaylight-infra-cleanup-stale-nodes.sh
193
194     publishers:
195       - email-notification:
196           email-recipients: '{email-recipients}'
197           email-prefix: '[releng]'
198       - opendaylight-infra-shiplogs:
199           maven-version: 'mvn33'
200
201
202 - job-template:
203     name: 'builder-delete-stale-stacks'
204     project-type: freestyle
205     node: centos7-java-builder-2c-4g
206
207     properties:
208       - opendaylight-infra-properties:
209           build-days-to-keep: 7
210
211     parameters:
212       - opendaylight-infra-parameters:
213           os-cloud: '{os-cloud}'
214           project: '{project}'
215           branch: '{branch}'
216           refspec: 'refs/heads/{branch}'
217           artifacts: '{archive-artifacts}'
218
219     wrappers:
220       - opendaylight-infra-wrappers:
221           build-timeout: '{build-timeout}'
222
223     triggers:
224       # Attempt to clear up stacks every 30 mins in case we have orphaned stacks
225       - timed: '0,30 * * * *'
226
227     builders:
228       - shell: !include-raw-escape: opendaylight-infra-cleanup-stale-stacks.sh
229
230     publishers:
231       - email-notification:
232           email-recipients: '{email-recipients}'
233           email-prefix: '[releng]'
234       - opendaylight-infra-shiplogs:
235           maven-version: 'mvn33'
236
237
238 - job-template:
239     name: 'builder-update-image-list'
240     project-type: freestyle
241     node: centos7-java-builder-2c-4g
242
243     properties:
244       - opendaylight-infra-properties:
245           build-days-to-keep: 7
246
247     parameters:
248       - opendaylight-infra-parameters:
249           os-cloud: odlpriv
250           project: '{project}'
251           branch: '{branch}'
252           refspec: 'refs/heads/{branch}'
253           artifacts: '{archive-artifacts}'
254
255     scm:
256       - git-scm:
257           branch: '{branch}'
258
259     wrappers:
260       - opendaylight-infra-wrappers:
261           build-timeout: '{build-timeout}'
262       # Listed after to override openstack-infra-wrappers clouds.yaml definition
263       - config-file-provider:
264           files:
265             - file-id: opendaylight-private-clouds-yaml
266               target: '$HOME/.config/openstack/clouds.yaml'
267
268     triggers:
269       # Update image list every Monday to Friday at 11:00 UTC
270       - timed: '0 11 * * 1-5'
271
272     builders:
273       - shell: !include-raw-escape: opendaylight-infra-update-image-list.sh
274       - opendaylight-infra-push-gerrit-patch:
275           project: '{project}'
276           gerrit-topic: 'releng-update-cloud-image-list'
277           gerrit-commit-message: 'Update cloud image list docs'
278
279     publishers:
280       - email-notification:
281           email-recipients: '{email-recipients}'
282           email-prefix: '[releng]'
283       - opendaylight-infra-shiplogs:
284           maven-version: 'mvn33'
285
286 - job-template:
287     name: 'builder-verify-packer'
288     project-type: freestyle
289     node: centos7-java-builder-2c-4g
290     concurrent: true
291
292     properties:
293       - opendaylight-infra-properties:
294           build-days-to-keep: 14
295
296     parameters:
297       - opendaylight-infra-parameters:
298           os-cloud: '{os-cloud}'
299           project: '{project}'
300           branch: '{branch}'
301           refspec: 'refs/heads/{branch}'
302           artifacts: '{archive-artifacts}'
303
304     scm:
305       - gerrit-trigger-scm:
306           refspec: '$GERRIT_REFSPEC'
307           choosing-strategy: 'gerrit'
308
309     wrappers:
310       - opendaylight-infra-wrappers:
311           build-timeout: '{build-timeout}'
312
313     triggers:
314       - gerrit-trigger-patch-submitted:
315           server: '{server-name}'
316           project: '{project}'
317           branch: '{branch}'
318           files: 'packer/**'
319
320     builders:
321       - packer-validate:
322
323     publishers:
324       - email-notification:
325           email-recipients: '{email-recipients}'
326           email-prefix: '[{project}]'
327       - opendaylight-infra-shiplogs:
328           maven-version: 'mvn33'
329
330 - job-template:
331     name: 'builder-merge-packer-{platforms}-{templates}'
332     project-type: freestyle
333     node: centos7-java-builder-2c-4g
334
335     properties:
336       - opendaylight-infra-properties:
337           build-days-to-keep: 14
338
339     parameters:
340       - opendaylight-infra-parameters:
341           os-cloud: '{os-cloud}'
342           project: '{project}'
343           branch: '{branch}'
344           refspec: 'refs/heads/{branch}'
345           artifacts: '{archive-artifacts}'
346
347     scm:
348       - gerrit-trigger-scm:
349           refspec: '$GERRIT_REFSPEC'
350           branches:
351             - '$GERRIT_BRANCH'
352           choosing-strategy: 'default'
353
354     wrappers:
355       - opendaylight-infra-wrappers:
356           build-timeout: '{build-timeout}'
357
358     triggers:
359       - timed: '00 10 1 * *'
360       - gerrit:
361           server-name: '{server-name}'
362           trigger-on:
363             - change-merged-event
364             - comment-added-contains-event:
365                 comment-contains-value: 'remerge'
366           projects:
367             - project-compare-type: 'ANT'
368               project-pattern: 'releng/builder'
369               branches:
370                 - branch-compare-type: 'ANT'
371                   branch-pattern: '**/{branch}'
372               file-paths:
373                 - compare-type: ANT
374                   pattern: 'packer/vars/{platforms}.json'
375                 - compare-type: ANT
376                   pattern: 'packer/templates/{templates}.json'
377                 - compare-type: ANT
378                   pattern: 'packer/provision/{templates}.sh'
379                 - compare-type: ANT
380                   pattern: 'packer/provision/system_reseal.sh'
381                 - compare-type: ANT
382                   pattern: 'packer/provision/rh-user_data.sh'
383                 - compare-type: ANT
384                   pattern: 'packer/provision/devstack-pre-pip.sh'
385                 - compare-type: ANT
386                   pattern: 'packer/provision/baseline.sh'
387
388     builders:
389       - packer-validate:
390       - packer-build:
391           platform: '{platforms}'
392           template: '{templates}'
393
394     publishers:
395       - email-notification:
396           email-recipients: '{email-recipients}'
397           email-prefix: '[{project}]'
398       - opendaylight-infra-shiplogs:
399           maven-version: 'mvn33'
400
401 - job-template:
402     name: 'builder-update-csit-tests'
403     node: centos7-java-builder-2c-8g
404
405     # builder-update-csit-tests job
406     #
407     # This job's purpose is to update csit
408     # tests to run in integration-distribution-test-{stream}
409     # by updating releng-defaults variables: csit-list-carbon,
410     # csit-list-boron, csit-list-beryllium
411
412     project-type: freestyle
413
414     properties:
415       - opendaylight-infra-properties:
416           build-days-to-keep: 14
417
418     parameters:
419       - opendaylight-infra-parameters:
420           os-cloud: '{os-cloud}'
421           project: '{project}'
422           branch: '{branch}'
423           refspec: 'refs/heads/{branch}'
424           artifacts: '{archive-artifacts}'
425
426     scm:
427       - gerrit-trigger-scm:
428           refspec: ''
429           choosing-strategy: 'default'
430
431     wrappers:
432       - opendaylight-infra-wrappers:
433           build-timeout: '{build-timeout}'
434
435     triggers:
436       - reverse:
437           jobs: 'builder-jjb-merge'
438
439     builders:
440       - shell: |
441           git checkout -b auto-update-csit-jobs
442       - integration-list-jobs:
443           blacklist: '{csit-list-blacklist}'
444           search_string: "csit"
445           stream: "nitrogen"
446           jobs-filename: "csit_jobs_nitrogen.lst"
447       - integration-list-jobs:
448           blacklist: '{csit-list-blacklist}'
449           search_string: "csit"
450           stream: "carbon"
451           jobs-filename: "csit_jobs_carbon.lst"
452       - integration-list-jobs:
453           blacklist: '{csit-list-blacklist}'
454           search_string: "csit"
455           stream: "boron"
456           jobs-filename: "csit_jobs_boron.lst"
457       - integration-list-jobs:
458           blacklist: '{csit-list-blacklist}'
459           search_string: "csit"
460           stream: "beryllium"
461           jobs-filename: "csit_jobs_beryllium.lst"
462       - integration-replace-block-text:
463           starting-regex: "'csit-list-nitrogen: >'"
464           ending-regex: "'csit-list-carbon: >'"
465           file-with-changes-to-insert: "'csit_jobs_nitrogen.lst'"
466           file-to-change: "'jjb/releng-defaults.yaml'"
467       - integration-replace-block-text:
468           starting-regex: "'csit-list-carbon: >'"
469           ending-regex: "'csit-list-boron: >'"
470           file-with-changes-to-insert: "'csit_jobs_carbon.lst'"
471           file-to-change: "'jjb/releng-defaults.yaml'"
472       - integration-replace-block-text:
473           starting-regex: "'csit-list-boron: >'"
474           ending-regex: "'csit-list-beryllium: >'"
475           file-with-changes-to-insert: "'csit_jobs_boron.lst'"
476           file-to-change: "'jjb/releng-defaults.yaml'"
477       - integration-replace-block-text:
478           starting-regex: "'csit-list-beryllium: >'"
479           ending-regex: "'# CSIT TESTS END SED MARKER'"
480           file-with-changes-to-insert: "'csit_jobs_beryllium.lst'"
481           file-to-change: "'jjb/releng-defaults.yaml'"
482       - shell: |
483           git status
484           git add jjb/releng-defaults.yaml
485       - opendaylight-infra-push-gerrit-patch:
486           project: "releng/builder"
487           gerrit-topic: "auto-update-csit-jobs"
488           gerrit-commit-message: "Auto Update CSIT Jobs to run"
489
490     publishers:
491       - email-notification:
492           email-recipients: '{email-recipients}'
493           email-prefix: '[releng]'
494       - opendaylight-infra-shiplogs:
495           maven-version: 'mvn33'