Merge "Fix ubuntu image creation issue"
[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
67     project-type: freestyle
68
69     properties:
70         - opendaylight-infra-properties:
71             build-days-to-keep: 14
72
73     parameters:
74         - opendaylight-infra-parameters:
75             project: '{project}'
76             branch: '{branch}'
77             refspec: 'refs/heads/{branch}'
78             artifacts: '{archive-artifacts}'
79
80     scm:
81         - gerrit-trigger-scm:
82             refspec: '$GERRIT_REFSPEC'
83             choosing-strategy: 'gerrit'
84
85     wrappers:
86         - opendaylight-infra-wrappers:
87             build-timeout: '{build-timeout}'
88
89     triggers:
90         - gerrit-trigger-patch-submitted:
91             server: '{server-name}'
92             project: '{project}'
93             branch: '{branch}'
94             files: 'jjb/**'
95
96     builders:
97         - opendaylight-infra-jjbini
98         - shell: |
99             virtualenv $WORKSPACE/venv
100             source $WORKSPACE/venv/bin/activate
101             pip install --upgrade pip
102             pip freeze
103             pip install jenkins-job-builder
104             jenkins-jobs -l DEBUG test --recursive -o archives/job_output jjb/
105             gzip archives/job_output/*
106         - releng-check-unicode
107         - verify-gpg-signature
108
109     publishers:
110         - email-notification:
111             email-recipients: '{email-recipients}'
112             email-prefix: '[releng]'
113         - opendaylight-infra-shiplogs:
114             maven-version: 'mvn33'
115
116 # FIXME: Migrate to {project-name}-verify-python-{stream} or delete this entirely,
117 #        as there are zero python files (aside docs/conf.py) in releng/builder.
118 - job-template:
119     name: builder-verify-python
120     node: centos7-java-builder-2c-4g
121
122     project-type: freestyle
123
124     properties:
125         - opendaylight-infra-properties:
126             build-days-to-keep: 14
127
128     parameters:
129         - opendaylight-infra-parameters:
130             project: '{project}'
131             branch: '{branch}'
132             refspec: 'refs/heads/{branch}'
133             artifacts: '{archive-artifacts}'
134
135     scm:
136         - gerrit-trigger-scm:
137             refspec: '$GERRIT_REFSPEC'
138             choosing-strategy: 'gerrit'
139
140     wrappers:
141         - opendaylight-infra-wrappers:
142             build-timeout: '{build-timeout}'
143
144     triggers:
145         - gerrit-trigger-patch-submitted:
146             server: '{server-name}'
147             project: '{project}'
148             branch: '{branch}'
149             files: 'scripts/**'
150
151     builders:
152         - verify-gpg-signature
153         - shell: |
154             virtualenv $WORKSPACE/venv
155             source $WORKSPACE/venv/bin/activate
156             pip install --upgrade pip
157             pip freeze
158             pip install flake8
159             flake8 scripts/
160
161     publishers:
162         - email-notification:
163             email-recipients: '{email-recipients}'
164             email-prefix: '[releng]'
165         - opendaylight-infra-shiplogs:
166             maven-version: 'mvn33'
167
168 - job-template:
169     name: 'builder-merge'
170     node: centos7-java-builder-2c-4g
171
172     # builder-merge job to run JJB update
173     #
174     # This job's purpose is to update all the JJB
175
176     project-type: freestyle
177
178     properties:
179         - opendaylight-infra-properties:
180             build-days-to-keep: 14
181
182     parameters:
183         - opendaylight-infra-parameters:
184             project: '{project}'
185             branch: '{branch}'
186             refspec: 'refs/heads/{branch}'
187             artifacts: '{archive-artifacts}'
188
189     scm:
190         - gerrit-trigger-scm:
191             refspec: ''
192             choosing-strategy: 'default'
193
194     wrappers:
195         - opendaylight-infra-wrappers:
196             build-timeout: '{build-timeout}'
197
198     triggers:
199         - gerrit:
200             server-name: '{server-name}'
201             trigger-on:
202                 - change-merged-event
203                 - comment-added-contains-event:
204                     comment-contains-value: 'remerge'
205             projects:
206               - project-compare-type: 'ANT'
207                 project-pattern: 'releng/builder'
208                 branches:
209                     - branch-compare-type: 'ANT'
210                       branch-pattern: '**/{branch}'
211                 file-paths:
212                     - compare-type: ANT
213                       pattern: jjb/**
214
215     builders:
216         - opendaylight-infra-jjbini
217         - shell: |
218             virtualenv $WORKSPACE/venv
219             source $WORKSPACE/venv/bin/activate
220             pip install --upgrade pip
221             pip freeze
222             pip install jenkins-job-builder
223             jenkins-jobs --version
224             jenkins-jobs update --recursive --delete-old --workers 4 jjb/
225
226     publishers:
227         - email-notification:
228             email-recipients: '{email-recipients}'
229             email-prefix: '[releng]'
230         - opendaylight-infra-shiplogs:
231             maven-version: 'mvn33'
232
233 - job-template:
234     name: 'builder-weekly'
235     disabled: false
236     node: centos7-java-builder-2c-4g
237
238     # builder-weekly job to run JJB update weekly
239     #
240     # This job's purpose is to update all the JJB on a weekly (Sunday)
241     # basis with --flush-cache enabled to ensure jobs are okay
242
243     project-type: freestyle
244
245     properties:
246         - opendaylight-infra-properties:
247             build-days-to-keep: 14
248
249     parameters:
250         - opendaylight-infra-parameters:
251             project: '{project}'
252             branch: '{branch}'
253             refspec: 'refs/heads/{branch}'
254             artifacts: '{archive-artifacts}'
255
256     scm:
257         - git-scm:
258             branch: '{branch}'
259
260     wrappers:
261         - opendaylight-infra-wrappers:
262             build-timeout: '{build-timeout}'
263
264     triggers:
265         - timed: 'H H * * 0'
266
267     builders:
268         - opendaylight-infra-jjbini
269         - shell: |
270             virtualenv $WORKSPACE/venv
271             source $WORKSPACE/venv/bin/activate
272             pip install --upgrade pip
273             pip freeze
274             pip install jenkins-job-builder
275             jenkins-jobs --flush-cache update --recursive --workers 4 jjb/
276
277     publishers:
278         - email-notification:
279             email-recipients: '{email-recipients}'
280             email-prefix: '[releng]'
281         - opendaylight-infra-shiplogs:
282             maven-version: 'mvn33'
283
284 - job-template:
285     name: builder-check-poms
286     node: centos7-java-builder-2c-4g
287
288     project-type: freestyle
289
290     properties:
291         - opendaylight-infra-properties:
292             build-days-to-keep: 14
293
294     parameters:
295         - opendaylight-infra-parameters:
296             project: '{project}'
297             branch: '{branch}'
298             refspec: 'refs/heads/{branch}'
299             artifacts: '{archive-artifacts}'
300
301     wrappers:
302         - opendaylight-infra-wrappers:
303             build-timeout: '{build-timeout}'
304
305     triggers:
306         - timed: 'H H * * 1'
307
308     builders:
309         - shell:
310             !include-raw-escape:
311                 - include-raw-check-poms.sh
312
313     publishers:
314         - email-notification:
315             email-recipients: '{email-recipients}'
316             email-prefix: '[releng]'
317         - opendaylight-infra-shiplogs:
318             maven-version: 'mvn33'
319
320 - job-template:
321     name: 'builder-delete-stale-stacks'
322     project-type: freestyle
323     node: centos7-java-builder-2c-4g
324
325     properties:
326         - opendaylight-infra-properties:
327             build-days-to-keep: 7
328
329     wrappers:
330         - opendaylight-infra-wrappers:
331             build-timeout: '{build-timeout}'
332
333     triggers:
334         # Attempt to clear up stacks every 30 mins in case we have orphaned stacks
335         - timed: '0,30 * * * *'
336
337     builders:
338         - shell: !include-raw-escape: opendaylight-infra-cleanup-stale-stacks.sh
339
340     publishers:
341         - email-notification:
342             email-recipients: '{email-recipients}'
343             email-prefix: '[releng]'
344         - opendaylight-infra-shiplogs:
345             maven-version: 'mvn33'
346
347 - job-template:
348     name: 'builder-update-image-list'
349     project-type: freestyle
350     node: centos7-java-builder-2c-4g
351
352     properties:
353         - opendaylight-infra-properties:
354             build-days-to-keep: 7
355
356     parameters:
357         - opendaylight-infra-parameters:
358             project: '{project}'
359             branch: '{branch}'
360             refspec: 'refs/heads/{branch}'
361             artifacts: '{archive-artifacts}'
362
363     scm:
364         - git-scm:
365             branch: '{branch}'
366
367     wrappers:
368         - opendaylight-infra-wrappers:
369             build-timeout: '{build-timeout}'
370         # Listed after to override openstack-infra-wrappers clouds.yaml definition
371         - config-file-provider:
372             files:
373                 - file-id: opendaylight-private-clouds-yaml
374                   target: '$HOME/.config/openstack/clouds.yaml'
375
376     triggers:
377         # Update image list every Monday to Friday at 11:00 UTC
378         - timed: '0 11 * * 1-5'
379
380     builders:
381         - shell: !include-raw-escape: opendaylight-infra-update-image-list.sh
382         - opendaylight-infra-push-gerrit-patch:
383             project: '{project}'
384             gerrit-topic: 'releng-update-cloud-image-list'
385             gerrit-commit-message: 'Update cloud image list docs'
386
387     publishers:
388         - email-notification:
389             email-recipients: '{email-recipients}'
390             email-prefix: '[releng]'
391         - opendaylight-infra-shiplogs:
392             maven-version: 'mvn33'
393
394 - job-template:
395     name: 'builder-verify-packer'
396     project-type: freestyle
397     node: centos7-java-builder-2c-4g
398     concurrent: true
399
400     properties:
401         - opendaylight-infra-properties:
402             build-days-to-keep: 14
403
404     parameters:
405         - opendaylight-infra-parameters:
406             project: '{project}'
407             branch: '{branch}'
408             refspec: 'refs/heads/{branch}'
409             artifacts: '{archive-artifacts}'
410
411     scm:
412         - gerrit-trigger-scm:
413             refspec: '$GERRIT_REFSPEC'
414             choosing-strategy: 'gerrit'
415
416     wrappers:
417         - opendaylight-infra-wrappers:
418             build-timeout: '{build-timeout}'
419
420     triggers:
421         - gerrit-trigger-patch-submitted:
422             server: '{server-name}'
423             project: '{project}'
424             branch: '{branch}'
425             files: 'packer/**'
426
427     builders:
428         - packer-validate:
429
430     publishers:
431         - email-notification:
432             email-recipients: '{email-recipients}'
433             email-prefix: '[{project}]'
434         - opendaylight-infra-shiplogs:
435             maven-version: 'mvn33'
436
437 - job-template:
438     name: 'builder-merge-packer-{platforms}-{templates}'
439     project-type: freestyle
440     node: centos7-java-builder-2c-4g
441     concurrent: true
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'