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