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