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