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