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