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