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