Merge "Add Cloud configuration for jenkins-cfg job"
[releng/builder.git] / jjb / releng-jobs.yaml
1 ---
2 - project:
3     name: builder-jobs
4     jobs:
5       - '{project-name}-rtd-jobs':
6           project-pattern: releng/builder
7           rtd-project: opendaylight-releng-builder
8       - gerrit-jenkins-cfg-merge:
9           jenkins-silos: releng sandbox
10       - gerrit-jjb-deploy-job
11       - gerrit-jjb-merge:
12           build-node: centos7-builder-4c-4g
13           build-timeout: 90
14       - gerrit-jjb-verify
15       - builder-check-poms
16       - builder-copy-sandbox-logs
17       - builder-openstack-cron
18       - gerrit-tox-verify
19       # Automation for docs and jobs
20       - 'builder-update-image-list'
21
22     # The following values are only specified here
23     # so that code blocks look similar to other projects.
24     project: 'releng/builder'
25     project-name: builder
26     stream: master
27     branch: master
28     build-node: centos7-builder-2c-2g
29     archive-artifacts: '**/*.log'
30     build-timeout: 30
31     jjb-version: 2.0.0
32     jenkins-urls: >
33       https://jenkins.opendaylight.org/releng
34       https://jenkins.opendaylight.org/sandbox
35
36 - project:
37     name: packer-jobs
38     # packer jobs templates are defined in global-jjb
39     jobs:
40       - '{project-name}-packer-jobs'
41     project: 'releng/builder'
42     project-name: builder
43     branch: master
44     archive-artifacts: '**/*.log'
45     build-node: centos7-builder-2c-1g
46
47     platforms:
48       - centos
49       - ubuntu-14.04
50       - ubuntu-16.04
51
52     templates:
53       - devstack
54       - devstack-pre-pip-newton:
55           build-timeout: 75
56       - devstack-pre-pip-ocata:
57           build-timeout: 75
58       - devstack-pre-pip-pike:
59           build-timeout: 75
60       - gbp
61       - mininet-ovs-2.5:
62           build-timeout: 60
63       - mininet-ovs-2.6:
64           build-timeout: 75
65
66     exclude:
67       - platforms: centos
68         templates: gbp
69       - platforms: centos
70         templates: mininet-ovs-2.5
71       - platforms: centos
72         templates: mininet-ovs-2.6
73       - platforms: ubuntu-14.04
74         templates: devstack-pre-pip-newton
75       - platforms: ubuntu-14.04
76         templates: devstack-pre-pip-ocata
77       - platforms: ubuntu-14.04
78         templates: devstack-pre-pip-pike
79       - platforms: ubuntu-14.04
80         templates: devstack
81       - platforms: ubuntu-14.04
82         templates: mininet-ovs-2.5
83       - platforms: ubuntu-14.04
84         templates: mininet-ovs-2.6
85       - platforms: ubuntu-16.04
86         templates: devstack-pre-pip-newton
87       - platforms: ubuntu-16.04
88         templates: devstack-pre-pip-ocata
89       - platforms: ubuntu-16.04
90         templates: devstack-pre-pip-pike
91       - platforms: ubuntu-16.04
92         templates: devstack
93
94 - job-template:
95     name: builder-check-poms
96     node: centos7-builder-2c-1g
97
98     project-type: freestyle
99
100     properties:
101       - opendaylight-infra-properties:
102           build-days-to-keep: 14
103
104     parameters:
105       - opendaylight-infra-parameters:
106           os-cloud: '{os-cloud}'
107           project: '{project}'
108           branch: '{branch}'
109           refspec: 'refs/heads/{branch}'
110           artifacts: '{archive-artifacts}'
111
112     wrappers:
113       - opendaylight-infra-wrappers:
114           build-timeout: '{build-timeout}'
115
116     triggers:
117       - timed: 'H H * * 1'
118
119     builders:
120       - shell: !include-raw-escape: check-poms.sh
121
122     publishers:
123       - email-notification:
124           email-recipients: '{email-recipients}'
125           email-prefix: '[releng]'
126       - lf-infra-publish
127
128 - job-template:
129     name: builder-copy-sandbox-logs
130     node: centos7-builder-2c-1g
131
132     project-type: freestyle
133
134     properties:
135       - opendaylight-infra-properties:
136           build-days-to-keep: 1
137
138     parameters:
139       - opendaylight-infra-parameters:
140           os-cloud: ''
141           project: ''
142           branch: ''
143           refspec: ''
144           artifacts: ''
145
146     wrappers:
147       - opendaylight-infra-wrappers:
148           build-timeout: 10
149
150     triggers:
151       - gerrit:
152           server-name: '{gerrit-server-name}'
153           trigger-on:
154             - comment-added-contains-event:
155                 comment-contains-value: 'copy-logs:'
156           projects:
157             - project-compare-type: ANT
158               project-pattern: '**'
159               branches:
160                 - branch-compare-type: ANT
161                   branch-pattern: '**'
162
163     builders:
164       - shell: !include-raw-escape: copy-sandbox-logs.sh
165
166     publishers:
167       - lf-infra-publish
168
169
170 - job-template:
171     name: builder-openstack-cron
172     project-type: freestyle
173     node: '{build-node}'
174
175     properties:
176       - lf-infra-properties:
177           build-days-to-keep: 7
178
179     parameters:
180       - lf-infra-parameters:
181           project: '{project}'
182           stream: '{stream}'
183           branch: '{branch}'
184           lftools-version: '{lftools-version}'
185       - string:
186           name: OS_CLOUD
187           default: '{os-cloud}'
188           description: Artifacts to archive to the logs server.
189       - string:
190           name: ARCHIVE_ARTIFACTS
191           default: '{archive-artifacts}'
192           description: Artifacts to archive to the logs server.
193       - string:
194           name: JENKINS_URLS
195           default: '{jenkins-urls}'
196           description: 'Space separated list of Jenkins URLs to check for active builds'
197
198     scm:
199       - git-scm:
200           branch: '{branch}'
201
202     wrappers:
203       - lf-infra-wrappers:
204           build-timeout: '{build-timeout}'
205           jenkins-ssh-credential: '{jenkins-ssh-credential}'
206       # Listed after to override openstack-infra-wrappers clouds.yaml definition
207       - config-file-provider:
208           files:
209             - file-id: clouds-yaml
210               target: '$HOME/.config/openstack/clouds.yaml'
211
212     triggers:
213       - timed: '0,30 * * * *'
214
215     builders:
216       - odl-openstack-install
217       - shell: !include-raw-escape: global-jjb/shell/lftools-install.sh
218       # Servers
219       - odl-openstack-cleanup-stale-stacks
220       - odl-openstack-cleanup-stale-nodes
221       - odl-openstack-cleanup-orphaned-nodes
222       # Images
223       - odl-openstack-check-image-protection
224       - odl-openstack-cleanup-old-images
225
226     publishers:
227       - lf-infra-publish
228
229 - job-template:
230     name: 'builder-update-image-list'
231     project-type: freestyle
232     node: centos7-builder-2c-1g
233
234     properties:
235       - opendaylight-infra-properties:
236           build-days-to-keep: 7
237
238     parameters:
239       - opendaylight-infra-parameters:
240           os-cloud: vex
241           project: '{project}'
242           branch: '{branch}'
243           refspec: 'refs/heads/{branch}'
244           artifacts: '{archive-artifacts}'
245
246     scm:
247       - git-scm:
248           branch: '{branch}'
249
250     wrappers:
251       - opendaylight-infra-wrappers:
252           build-timeout: '{build-timeout}'
253       # Listed after to override openstack-infra-wrappers clouds.yaml definition
254       - config-file-provider:
255           files:
256             - file-id: clouds-yaml
257               target: '$HOME/.config/openstack/clouds.yaml'
258
259     triggers:
260       # Update image list every Monday to Friday at 11:00 UTC
261       - timed: '0 11 * * 1-5'
262
263     builders:
264       - shell: !include-raw-escape: opendaylight-infra-update-image-list.sh
265       - opendaylight-infra-push-gerrit-patch:
266           project: '{project}'
267           gerrit-topic: 'releng-update-cloud-image-list'
268           gerrit-commit-message: 'Update cloud image list docs'
269
270     publishers:
271       - email-notification:
272           email-recipients: '{email-recipients}'
273           email-prefix: '[releng]'
274       - lf-infra-publish