Migrate releng job templates to lf-infra-publish
[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       - lf-infra-publish
114
115
116 - job-template:
117     name: 'builder-cleanup-old-images'
118     project-type: freestyle
119     node: centos7-java-builder-2c-4g
120
121     properties:
122       - opendaylight-infra-properties:
123           build-days-to-keep: 7
124
125     parameters:
126       - opendaylight-infra-parameters:
127           os-cloud: '{os-cloud}'
128           project: '{project}'
129           branch: '{branch}'
130           refspec: 'refs/heads/{branch}'
131           artifacts: '{archive-artifacts}'
132
133     scm:
134       - git-scm:
135           branch: '{branch}'
136
137     wrappers:
138       - opendaylight-infra-wrappers:
139           build-timeout: '{build-timeout}'
140       # Listed after to override openstack-infra-wrappers clouds.yaml definition
141       - config-file-provider:
142           files:
143             - file-id: opendaylight-private-clouds-yaml
144               target: '$HOME/.config/openstack/clouds.yaml'
145
146     triggers:
147       # Cleanup images on a weekly schedule
148       - timed: '@weekly'
149
150     builders:
151       - shell: !include-raw-escape:
152           - global-jjb/shell/lftools-install.sh
153           - opendaylight-infra-cleanup-old-images.sh
154
155     publishers:
156       - email-notification:
157           email-recipients: '{email-recipients}'
158           email-prefix: '[releng]'
159       - lf-infra-publish
160
161
162 - job-template:
163     name: 'builder-delete-stale-nodes'
164     project-type: freestyle
165     node: centos7-java-builder-2c-4g
166
167     properties:
168       - opendaylight-infra-properties:
169           build-days-to-keep: 7
170
171     parameters:
172       - opendaylight-infra-parameters:
173           os-cloud: '{os-cloud}'
174           project: '{project}'
175           branch: '{branch}'
176           refspec: 'refs/heads/{branch}'
177           artifacts: '{archive-artifacts}'
178
179     wrappers:
180       - opendaylight-infra-wrappers:
181           build-timeout: '{build-timeout}'
182
183     triggers:
184       # Attempt to clear up stacks every 30 mins in case we have orphaned stacks
185       - timed: '0,30 * * * *'
186
187     builders:
188       - shell: !include-raw-escape:
189           - global-jjb/shell/lftools-install.sh
190           - opendaylight-infra-cleanup-stale-nodes.sh
191
192     publishers:
193       - email-notification:
194           email-recipients: '{email-recipients}'
195           email-prefix: '[releng]'
196       - lf-infra-publish
197
198
199 - job-template:
200     name: 'builder-delete-stale-stacks'
201     project-type: freestyle
202     node: centos7-java-builder-2c-4g
203
204     properties:
205       - opendaylight-infra-properties:
206           build-days-to-keep: 7
207
208     parameters:
209       - opendaylight-infra-parameters:
210           os-cloud: '{os-cloud}'
211           project: '{project}'
212           branch: '{branch}'
213           refspec: 'refs/heads/{branch}'
214           artifacts: '{archive-artifacts}'
215
216     wrappers:
217       - opendaylight-infra-wrappers:
218           build-timeout: '{build-timeout}'
219
220     triggers:
221       # Attempt to clear up stacks every 30 mins in case we have orphaned stacks
222       - timed: '0,30 * * * *'
223
224     builders:
225       - shell: !include-raw-escape: opendaylight-infra-cleanup-stale-stacks.sh
226
227     publishers:
228       - email-notification:
229           email-recipients: '{email-recipients}'
230           email-prefix: '[releng]'
231       - lf-infra-publish
232
233
234 - job-template:
235     name: 'builder-update-image-list'
236     project-type: freestyle
237     node: centos7-java-builder-2c-4g
238
239     properties:
240       - opendaylight-infra-properties:
241           build-days-to-keep: 7
242
243     parameters:
244       - opendaylight-infra-parameters:
245           os-cloud: odlpriv
246           project: '{project}'
247           branch: '{branch}'
248           refspec: 'refs/heads/{branch}'
249           artifacts: '{archive-artifacts}'
250
251     scm:
252       - git-scm:
253           branch: '{branch}'
254
255     wrappers:
256       - opendaylight-infra-wrappers:
257           build-timeout: '{build-timeout}'
258       # Listed after to override openstack-infra-wrappers clouds.yaml definition
259       - config-file-provider:
260           files:
261             - file-id: opendaylight-private-clouds-yaml
262               target: '$HOME/.config/openstack/clouds.yaml'
263
264     triggers:
265       # Update image list every Monday to Friday at 11:00 UTC
266       - timed: '0 11 * * 1-5'
267
268     builders:
269       - shell: !include-raw-escape: opendaylight-infra-update-image-list.sh
270       - opendaylight-infra-push-gerrit-patch:
271           project: '{project}'
272           gerrit-topic: 'releng-update-cloud-image-list'
273           gerrit-commit-message: 'Update cloud image list docs'
274
275     publishers:
276       - email-notification:
277           email-recipients: '{email-recipients}'
278           email-prefix: '[releng]'
279       - lf-infra-publish
280
281 - job-template:
282     name: 'builder-verify-packer'
283     project-type: freestyle
284     node: centos7-java-builder-2c-4g
285     concurrent: true
286
287     properties:
288       - opendaylight-infra-properties:
289           build-days-to-keep: 14
290
291     parameters:
292       - opendaylight-infra-parameters:
293           os-cloud: '{os-cloud}'
294           project: '{project}'
295           branch: '{branch}'
296           refspec: 'refs/heads/{branch}'
297           artifacts: '{archive-artifacts}'
298
299     scm:
300       - gerrit-trigger-scm:
301           refspec: '$GERRIT_REFSPEC'
302           choosing-strategy: 'gerrit'
303
304     wrappers:
305       - opendaylight-infra-wrappers:
306           build-timeout: '{build-timeout}'
307
308     triggers:
309       - gerrit-trigger-patch-submitted:
310           server: '{server-name}'
311           project: '{project}'
312           branch: '{branch}'
313           files: 'packer/**'
314
315     builders:
316       - packer-validate:
317
318     publishers:
319       - email-notification:
320           email-recipients: '{email-recipients}'
321           email-prefix: '[{project}]'
322       - lf-infra-publish
323
324 - job-template:
325     name: 'builder-merge-packer-{platforms}-{templates}'
326     project-type: freestyle
327     node: centos7-java-builder-2c-4g
328
329     properties:
330       - opendaylight-infra-properties:
331           build-days-to-keep: 14
332
333     parameters:
334       - opendaylight-infra-parameters:
335           os-cloud: '{os-cloud}'
336           project: '{project}'
337           branch: '{branch}'
338           refspec: 'refs/heads/{branch}'
339           artifacts: '{archive-artifacts}'
340
341     scm:
342       - gerrit-trigger-scm:
343           refspec: '$GERRIT_REFSPEC'
344           branches:
345             - '$GERRIT_BRANCH'
346           choosing-strategy: 'default'
347
348     wrappers:
349       - opendaylight-infra-wrappers:
350           build-timeout: '{build-timeout}'
351
352     triggers:
353       - timed: '00 10 1 * *'
354       - gerrit:
355           server-name: '{server-name}'
356           trigger-on:
357             - change-merged-event
358             - comment-added-contains-event:
359                 comment-contains-value: 'remerge'
360           projects:
361             - project-compare-type: 'ANT'
362               project-pattern: 'releng/builder'
363               branches:
364                 - branch-compare-type: 'ANT'
365                   branch-pattern: '**/{branch}'
366               file-paths:
367                 - compare-type: ANT
368                   pattern: 'packer/vars/{platforms}.json'
369                 - compare-type: ANT
370                   pattern: 'packer/templates/{templates}.json'
371                 - compare-type: ANT
372                   pattern: 'packer/provision/{templates}.sh'
373                 - compare-type: ANT
374                   pattern: 'packer/provision/system_reseal.sh'
375                 - compare-type: ANT
376                   pattern: 'packer/provision/rh-user_data.sh'
377                 - compare-type: ANT
378                   pattern: 'packer/provision/devstack-pre-pip.sh'
379                 - compare-type: ANT
380                   pattern: 'packer/provision/baseline.sh'
381
382     builders:
383       - packer-validate:
384       - packer-build:
385           platform: '{platforms}'
386           template: '{templates}'
387
388     publishers:
389       - email-notification:
390           email-recipients: '{email-recipients}'
391           email-prefix: '[{project}]'
392       - lf-infra-publish
393
394 - job-template:
395     name: 'builder-update-csit-tests'
396     node: centos7-java-builder-2c-8g
397
398     # builder-update-csit-tests job
399     #
400     # This job's purpose is to update csit
401     # tests to run in integration-distribution-test-{stream}
402     # by updating releng-defaults variables: csit-list-carbon,
403     # csit-list-boron, csit-list-beryllium
404
405     project-type: freestyle
406
407     properties:
408       - opendaylight-infra-properties:
409           build-days-to-keep: 14
410
411     parameters:
412       - opendaylight-infra-parameters:
413           os-cloud: '{os-cloud}'
414           project: '{project}'
415           branch: '{branch}'
416           refspec: 'refs/heads/{branch}'
417           artifacts: '{archive-artifacts}'
418
419     scm:
420       - gerrit-trigger-scm:
421           refspec: ''
422           choosing-strategy: 'default'
423
424     wrappers:
425       - opendaylight-infra-wrappers:
426           build-timeout: '{build-timeout}'
427
428     triggers:
429       - reverse:
430           jobs: 'builder-jjb-merge'
431
432     builders:
433       - shell: |
434           git checkout -b auto-update-csit-jobs
435       - integration-list-jobs:
436           blacklist: '{csit-list-blacklist}'
437           search_string: "csit"
438           stream: "nitrogen"
439           jobs-filename: "csit_jobs_nitrogen.lst"
440       - integration-list-jobs:
441           blacklist: '{csit-list-blacklist}'
442           search_string: "csit"
443           stream: "carbon"
444           jobs-filename: "csit_jobs_carbon.lst"
445       - integration-list-jobs:
446           blacklist: '{csit-list-blacklist}'
447           search_string: "csit"
448           stream: "boron"
449           jobs-filename: "csit_jobs_boron.lst"
450       - integration-list-jobs:
451           blacklist: '{csit-list-blacklist}'
452           search_string: "csit"
453           stream: "beryllium"
454           jobs-filename: "csit_jobs_beryllium.lst"
455       - integration-replace-block-text:
456           starting-regex: "'csit-list-nitrogen: >'"
457           ending-regex: "'csit-list-carbon: >'"
458           file-with-changes-to-insert: "'csit_jobs_nitrogen.lst'"
459           file-to-change: "'jjb/releng-defaults.yaml'"
460       - integration-replace-block-text:
461           starting-regex: "'csit-list-carbon: >'"
462           ending-regex: "'csit-list-boron: >'"
463           file-with-changes-to-insert: "'csit_jobs_carbon.lst'"
464           file-to-change: "'jjb/releng-defaults.yaml'"
465       - integration-replace-block-text:
466           starting-regex: "'csit-list-boron: >'"
467           ending-regex: "'csit-list-beryllium: >'"
468           file-with-changes-to-insert: "'csit_jobs_boron.lst'"
469           file-to-change: "'jjb/releng-defaults.yaml'"
470       - integration-replace-block-text:
471           starting-regex: "'csit-list-beryllium: >'"
472           ending-regex: "'# CSIT TESTS END SED MARKER'"
473           file-with-changes-to-insert: "'csit_jobs_beryllium.lst'"
474           file-to-change: "'jjb/releng-defaults.yaml'"
475       - shell: |
476           git status
477           git add jjb/releng-defaults.yaml
478       - opendaylight-infra-push-gerrit-patch:
479           project: "releng/builder"
480           gerrit-topic: "auto-update-csit-jobs"
481           gerrit-commit-message: "Auto Update CSIT Jobs to run"
482
483     publishers:
484       - email-notification:
485           email-recipients: '{email-recipients}'
486           email-prefix: '[releng]'
487       - lf-infra-publish