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