Migrate packer jobs to use global-jjb templates
[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       # OpenStack Related
9       - 'builder-cleanup-old-images'
10       - 'builder-delete-stale-nodes'
11       - 'builder-delete-stale-stacks'
12       # Automation for docs and jobs
13       - 'builder-update-csit-tests'
14       - 'builder-update-image-list'
15
16     # The following values are only specified here
17     # so that code blocks look similar to other projects.
18     project: 'releng/builder'
19     project-name: builder
20     stream: master
21     branch: master
22     build-node: centos7-java-builder-2c-4g
23     archive-artifacts: '**/*.log'
24     build-timeout: 10
25
26 - project:
27     name: packer-jobs
28     # packer jobs templates are defined in global-jjb
29     jobs:
30       - '{project-name}-packer-jobs'
31     project: 'releng/builder'
32     project-name: builder
33     branch: master
34     archive-artifacts: '**/*.log'
35
36     platforms:
37       - centos
38       - ubuntu-14.04
39       - ubuntu-16.04
40
41     templates:
42       - devstack
43       - devstack-pre-pip-newton:
44           build-timeout: 60
45       - devstack-pre-pip-ocata:
46           build-timeout: 60
47       - docker
48       - gbp
49       - java-builder
50       - mininet
51       - mininet-ovs-2.5
52       - robot
53
54     exclude:
55       - platforms: centos
56         templates: gbp
57       - platforms: centos
58         templates: mininet
59       - platforms: centos
60         templates: mininet-ovs-2.5
61       - platforms: ubuntu-14.04
62         templates: java-builder
63       - platforms: ubuntu-14.04
64         templates: robot
65       - platforms: ubuntu-14.04
66         templates: devstack-pre-pip-newton
67       - platforms: ubuntu-14.04
68         templates: devstack-pre-pip-ocata
69       - platforms: ubuntu-14.04
70         templates: devstack
71       - platforms: ubuntu-14.04
72         templates: docker
73       - platforms: ubuntu-14.04
74         templates: mininet-ovs-2.5
75       - platforms: ubuntu-16.04
76         templates: java-builder
77       - platforms: ubuntu-16.04
78         templates: robot
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
85       - platforms: ubuntu-16.04
86         templates: docker
87       - platforms: ubuntu-16.04
88         templates: mininet
89       - platforms: ubuntu-16.04
90         templates: gbp
91       - platforms: ubuntu-16.04
92         templates: baseline
93       - platforms: centos
94         templates: baseline
95
96 - job-template:
97     name: builder-check-poms
98     node: centos7-java-builder-2c-4g
99
100     project-type: freestyle
101
102     properties:
103       - opendaylight-infra-properties:
104           build-days-to-keep: 14
105
106     parameters:
107       - opendaylight-infra-parameters:
108           os-cloud: '{os-cloud}'
109           project: '{project}'
110           branch: '{branch}'
111           refspec: 'refs/heads/{branch}'
112           artifacts: '{archive-artifacts}'
113
114     wrappers:
115       - opendaylight-infra-wrappers:
116           build-timeout: '{build-timeout}'
117
118     triggers:
119       - timed: 'H H * * 1'
120
121     builders:
122       - shell: !include-raw-escape: include-raw-check-poms.sh
123
124     publishers:
125       - email-notification:
126           email-recipients: '{email-recipients}'
127           email-prefix: '[releng]'
128       - lf-infra-publish
129
130
131 - job-template:
132     name: 'builder-cleanup-old-images'
133     project-type: freestyle
134     node: centos7-java-builder-2c-4g
135
136     properties:
137       - opendaylight-infra-properties:
138           build-days-to-keep: 7
139
140     parameters:
141       - opendaylight-infra-parameters:
142           os-cloud: '{os-cloud}'
143           project: '{project}'
144           branch: '{branch}'
145           refspec: 'refs/heads/{branch}'
146           artifacts: '{archive-artifacts}'
147
148     scm:
149       - git-scm:
150           branch: '{branch}'
151
152     wrappers:
153       - opendaylight-infra-wrappers:
154           build-timeout: '{build-timeout}'
155       # Listed after to override openstack-infra-wrappers clouds.yaml definition
156       - config-file-provider:
157           files:
158             - file-id: opendaylight-private-clouds-yaml
159               target: '$HOME/.config/openstack/clouds.yaml'
160
161     triggers:
162       # Cleanup images on a weekly schedule
163       - timed: '@weekly'
164
165     builders:
166       - shell: !include-raw-escape:
167           - global-jjb/shell/lftools-install.sh
168           - opendaylight-infra-cleanup-old-images.sh
169
170     publishers:
171       - email-notification:
172           email-recipients: '{email-recipients}'
173           email-prefix: '[releng]'
174       - lf-infra-publish
175
176
177 - job-template:
178     name: 'builder-delete-stale-nodes'
179     project-type: freestyle
180     node: centos7-java-builder-2c-4g
181
182     properties:
183       - opendaylight-infra-properties:
184           build-days-to-keep: 7
185
186     parameters:
187       - opendaylight-infra-parameters:
188           os-cloud: '{os-cloud}'
189           project: '{project}'
190           branch: '{branch}'
191           refspec: 'refs/heads/{branch}'
192           artifacts: '{archive-artifacts}'
193
194     wrappers:
195       - opendaylight-infra-wrappers:
196           build-timeout: '{build-timeout}'
197
198     triggers:
199       # Attempt to clear up stacks every 30 mins in case we have orphaned stacks
200       - timed: '0,30 * * * *'
201
202     builders:
203       - shell: !include-raw-escape:
204           - global-jjb/shell/lftools-install.sh
205           - opendaylight-infra-cleanup-stale-nodes.sh
206
207     publishers:
208       - email-notification:
209           email-recipients: '{email-recipients}'
210           email-prefix: '[releng]'
211       - lf-infra-publish
212
213
214 - job-template:
215     name: 'builder-delete-stale-stacks'
216     project-type: freestyle
217     node: centos7-java-builder-2c-4g
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     wrappers:
232       - opendaylight-infra-wrappers:
233           build-timeout: '{build-timeout}'
234
235     triggers:
236       # Attempt to clear up stacks every 30 mins in case we have orphaned stacks
237       - timed: '0,30 * * * *'
238
239     builders:
240       - shell: !include-raw-escape: opendaylight-infra-cleanup-stale-stacks.sh
241
242     publishers:
243       - email-notification:
244           email-recipients: '{email-recipients}'
245           email-prefix: '[releng]'
246       - lf-infra-publish
247
248
249 - job-template:
250     name: 'builder-update-image-list'
251     project-type: freestyle
252     node: centos7-java-builder-2c-4g
253
254     properties:
255       - opendaylight-infra-properties:
256           build-days-to-keep: 7
257
258     parameters:
259       - opendaylight-infra-parameters:
260           os-cloud: odlpriv
261           project: '{project}'
262           branch: '{branch}'
263           refspec: 'refs/heads/{branch}'
264           artifacts: '{archive-artifacts}'
265
266     scm:
267       - git-scm:
268           branch: '{branch}'
269
270     wrappers:
271       - opendaylight-infra-wrappers:
272           build-timeout: '{build-timeout}'
273       # Listed after to override openstack-infra-wrappers clouds.yaml definition
274       - config-file-provider:
275           files:
276             - file-id: opendaylight-private-clouds-yaml
277               target: '$HOME/.config/openstack/clouds.yaml'
278
279     triggers:
280       # Update image list every Monday to Friday at 11:00 UTC
281       - timed: '0 11 * * 1-5'
282
283     builders:
284       - shell: !include-raw-escape: opendaylight-infra-update-image-list.sh
285       - opendaylight-infra-push-gerrit-patch:
286           project: '{project}'
287           gerrit-topic: 'releng-update-cloud-image-list'
288           gerrit-commit-message: 'Update cloud image list docs'
289
290     publishers:
291       - email-notification:
292           email-recipients: '{email-recipients}'
293           email-prefix: '[releng]'
294       - lf-infra-publish
295
296 - job-template:
297     name: 'builder-update-csit-tests'
298     node: centos7-java-builder-2c-8g
299
300     # builder-update-csit-tests job
301     #
302     # This job's purpose is to update csit
303     # tests to run in integration-distribution-test-{stream}
304     # by updating releng-defaults variables: csit-list-carbon,
305     # csit-list-boron, csit-list-beryllium
306
307     project-type: freestyle
308
309     properties:
310       - opendaylight-infra-properties:
311           build-days-to-keep: 14
312
313     parameters:
314       - opendaylight-infra-parameters:
315           os-cloud: '{os-cloud}'
316           project: '{project}'
317           branch: '{branch}'
318           refspec: 'refs/heads/{branch}'
319           artifacts: '{archive-artifacts}'
320
321     scm:
322       - gerrit-trigger-scm:
323           refspec: ''
324           choosing-strategy: 'default'
325
326     wrappers:
327       - opendaylight-infra-wrappers:
328           build-timeout: '{build-timeout}'
329
330     triggers:
331       - reverse:
332           jobs: 'builder-jjb-merge'
333
334     builders:
335       - shell: |
336           git checkout -b auto-update-csit-jobs
337       - integration-list-jobs:
338           blacklist: '{csit-list-blacklist}'
339           search_string: "csit"
340           stream: "nitrogen"
341           jobs-filename: "csit_jobs_nitrogen.lst"
342       - integration-list-jobs:
343           blacklist: '{csit-list-blacklist}'
344           search_string: "csit"
345           stream: "carbon"
346           jobs-filename: "csit_jobs_carbon.lst"
347       - integration-list-jobs:
348           blacklist: '{csit-list-blacklist}'
349           search_string: "csit"
350           stream: "boron"
351           jobs-filename: "csit_jobs_boron.lst"
352       - integration-replace-block-text:
353           starting-regex: "'csit-list-nitrogen: >'"
354           ending-regex: "'csit-list-carbon: >'"
355           file-with-changes-to-insert: "'csit_jobs_nitrogen.lst'"
356           file-to-change: "'jjb/releng-defaults.yaml'"
357       - integration-replace-block-text:
358           starting-regex: "'csit-list-carbon: >'"
359           ending-regex: "'csit-list-boron: >'"
360           file-with-changes-to-insert: "'csit_jobs_carbon.lst'"
361           file-to-change: "'jjb/releng-defaults.yaml'"
362       - integration-replace-block-text:
363           starting-regex: "'csit-list-boron: >'"
364           ending-regex: "'# CSIT TESTS END SED MARKER'"
365           file-with-changes-to-insert: "'csit_jobs_boron.lst'"
366           file-to-change: "'jjb/releng-defaults.yaml'"
367       - shell: |
368           git status
369           git add jjb/releng-defaults.yaml
370       - opendaylight-infra-push-gerrit-patch:
371           project: "releng/builder"
372           gerrit-topic: "auto-update-csit-jobs"
373           gerrit-commit-message: "Auto Update CSIT Jobs to run"
374
375     publishers:
376       - email-notification:
377           email-recipients: '{email-recipients}'
378           email-prefix: '[releng]'
379       - lf-infra-publish