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