Create release specific periodic OpenStack jobs
[infra/cicd.git] / jjb / cloud-infra / cloud-infra-periodic-openstack.yml
1 ---
2 #
3 # ============LICENSE_START=======================================================
4 #  Copyright (C) 2019 Nordix Foundation.
5 # ================================================================================
6 # Licensed under the Apache License, Version 2.0 (the "License");
7 # you may not use this file except in compliance with the License.
8 # You may obtain a copy of the License at
9 #
10 #      http://www.apache.org/licenses/LICENSE-2.0
11 #
12 # Unless required by applicable law or agreed to in writing, software
13 # distributed under the License is distributed on an "AS IS" BASIS,
14 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 # See the License for the specific language governing permissions and
16 # limitations under the License.
17 #
18 # SPDX-License-Identifier: Apache-2.0
19 # ============LICENSE_END=========================================================
20
21 #--------------------------------------------------------------------------------------
22 # The jobs declared in this JJB configuration file are used for verifying cloud-infra
23 # engine from the tip of the master branch periodically to check the stability of it.
24 #
25 # These jobs are set to run on slaves with label vpod-deploy-ubuntu1604.
26 # The slaves have
27 #   - Ubuntu1604 as the base distro
28 #   - nested virtualization
29 #   - internet access
30 #   - passwordless sudo
31 #   - 16 CPUs/32GB RAM/200 GB Disk
32 #   - docker, git vim curl wget zip unzip chrony apt-transport-https ca-certificates curl
33 #     gnupg-agent software-properties-common docker-ce docker-ce-cli containerd.io openjdk-8-jre
34 #
35 # The slaves should not have a cloud infra scenario deployed on them.
36 #--------------------------------------------------------------------------------------
37
38 - project:
39     name: 'cloud-infra-periodic-openstack'
40
41     project: 'infra/engine'
42
43     stream:
44       - 'master':
45           disabled: 'true'
46           engine-branch: 'master'
47           openstack-branch: '{stream}'
48       - 'train':
49           disabled: 'true'
50           engine-branch: 'master'
51           openstack-branch: '{stream}'
52       - 'stein':
53           disabled: 'false'
54           engine-branch: 'master'
55           openstack-branch: '{stream}'
56       - 'rocky':
57           disabled: 'true'
58           engine-branch: 'master'
59           openstack-branch: '{stream}'
60
61     distro:
62       - ubuntu1804:
63           disabled: 'false'
64
65     deploy-scenario:
66       - os-nosdn-nofeature
67
68     ci-loop:
69       - daily
70
71     type:
72       - baremetal:
73           pod-name: est-baremetal
74           provisioner-type: bifrost
75           installer-type: kolla
76           slave-label: baremetal-deploy
77           yardstick-dispatcher: 'influxdb'
78
79     phase:
80       - deploy:
81           build-timeout: 90
82       - functest:
83           build-timeout: 240
84       - yardstick:
85           build-timeout: 120
86       - promote:
87           build-timeout: 5
88
89     jobs:
90       - '{deploy-scenario}-{distro}-kolla-{type}-{ci-loop}-{stream}'
91       - 'openstack-{phase}-{distro}-kolla-{type}-{ci-loop}-{stream}'
92
93 - job-template:
94     name: '{deploy-scenario}-{distro}-kolla-{type}-{ci-loop}-{stream}'
95
96     project-type: multijob
97
98     disabled: '{obj:disabled}'
99
100     concurrent: true
101
102     parameters:
103       - project-parameters:
104           project: '{project}'
105           branch: '{engine-branch}'
106       - nordix-gerrit-parameters
107       - label:
108           name: SLAVE_LABEL
109           default: '{slave-label}'
110           description: 'Slave label to schedule this job on. All slaves have Ubuntu1604 no matter what distro target nodes use'
111       - string:
112           name: DISTRO
113           default: '{distro}'
114           description: 'Distribution to use for configuring target nodes (networking etc.)'
115       - string:
116           name: DEPLOY_TYPE
117           default: '{type}'
118           description: 'Type of the deployment'
119       - string:
120           name: USE_PREBUILT_DEPLOYMENT_IMAGE
121           default: 'true'
122           description: 'Use prebuilt deployment image while running as part of CI/CD'
123       - string:
124           name: OPENSTACK_VERSION
125           default: '{openstack-branch}'
126           description: 'OpenStack Version to deploy and test'
127       - string:
128           name: PROVISIONER_TYPE
129           default: '{provisioner-type}'
130           description: 'Provisioner to use for provisioning nodes'
131       - string:
132           name: INSTALLER_TYPE
133           default: '{installer-type}'
134           description: 'Installer to use for deploying the scenario'
135       - string:
136           name: DEPLOY_SCENARIO
137           default: '{deploy-scenario}'
138           description: 'Scenario to deploy and test'
139       - string:
140           name: TEST_SUITE
141           default: 'smoke'
142           description: 'Test suite to run'
143       - string:
144           name: YARDSTICK_DISPATCHER
145           default: '{yardstick-dispatcher}'
146           description: 'Dispatcher to use for Yardstick reporting'
147       - string:
148           name: CLEANUP
149           default: 'true'
150           description: 'Cleanup leftovers of the previous run'
151
152     properties:
153       - logrotate
154       - build-blocker:
155           use-build-blocker: true
156           blocking-jobs:
157             - 'cloud-infra-periodic-engine-.*'
158             - 'k8-.*'
159             - 'os-.*'
160           block-level: 'NODE'
161       - throttle:
162           max-per-node: 1
163           max-total: 3
164           option: project
165
166     wrappers:
167       - build-timeout:
168           timeout: 455
169       - fix-workspace-permissions
170
171     scm:
172       - git-scm:
173           ssh-credentials-id: nordixinfra-nordix-gerrit-ssh
174           branch: '{engine-branch}'
175           refspec: ''
176           wipe_workspace: true
177           clean_before: false
178
179     triggers:
180       - timed: '@daily'
181
182     builders:
183       - description-setter:
184           description: $PROVISIONER_TYPE | $INSTALLER_TYPE | $DEPLOY_SCENARIO
185       - multijob:
186           name: deploy
187           condition: SUCCESSFUL
188           projects:
189             - name: 'openstack-deploy-{distro}-{installer-type}-{type}-{ci-loop}-{stream}'
190               current-parameters: true
191               predefined-parameters: |
192                 DISTRO=$DISTRO
193                 DEPLOY_TYPE=$DEPLOY_TYPE
194                 USE_PREBUILT_DEPLOYMENT_IMAGE=$USE_PREBUILT_DEPLOYMENT_IMAGE
195                 OPENSTACK_VERSION=$OPENSTACK_VERSION
196                 PROVISIONER_TYPE=$PROVISIONER_TYPE
197                 INSTALLER_TYPE=$INSTALLER_TYPE
198                 DEPLOY_SCENARIO=$DEPLOY_SCENARIO
199                 CLEANUP=$CLEANUP
200               git-revision: true
201               node-parameters: true
202               kill-phase-on: FAILURE
203               abort-all-job: true
204       - multijob:
205           name: functest
206           condition: ALWAYS
207           projects:
208             - name: 'openstack-functest-{distro}-{installer-type}-{type}-{ci-loop}-{stream}'
209               current-parameters: true
210               predefined-parameters: |
211                 DISTRO=$DISTRO
212                 DEPLOY_TYPE=$DEPLOY_TYPE
213                 OPENSTACK_VERSION=$OPENSTACK_VERSION
214                 PROVISIONER_TYPE=$PROVISIONER_TYPE
215                 INSTALLER_TYPE=$INSTALLER_TYPE
216                 DEPLOY_SCENARIO=$DEPLOY_SCENARIO
217                 TEST_SUITE=$TEST_SUITE
218                 YARDSTICK_DISPATCHER=$YARDSTICK_DISPATCHER
219                 CLEANUP=$CLEANUP
220               node-parameters: true
221               kill-phase-on: NEVER
222               abort-all-job: false
223       - multijob:
224           name: yardstick
225           condition: ALWAYS
226           projects:
227             - name: 'openstack-yardstick-{distro}-{installer-type}-{type}-{ci-loop}-{stream}'
228               current-parameters: true
229               predefined-parameters: |
230                 DISTRO=$DISTRO
231                 DEPLOY_TYPE=$DEPLOY_TYPE
232                 OPENSTACK_VERSION=$OPENSTACK_VERSION
233                 PROVISIONER_TYPE=$PROVISIONER_TYPE
234                 INSTALLER_TYPE=$INSTALLER_TYPE
235                 DEPLOY_SCENARIO=$DEPLOY_SCENARIO
236                 TEST_SUITE=$TEST_SUITE
237                 YARDSTICK_DISPATCHER=$YARDSTICK_DISPATCHER
238                 CLEANUP=$CLEANUP
239               node-parameters: true
240               kill-phase-on: NEVER
241               abort-all-job: false
242       - multijob:
243           name: promote
244           condition: SUCCESSFUL
245           projects:
246             - name: 'openstack-promote-{distro}-{installer-type}-{type}-{ci-loop}-{stream}'
247               current-parameters: true
248               predefined-parameters: |
249                 DISTRO=$DISTRO
250                 DEPLOY_TYPE=$DEPLOY_TYPE
251                 OPENSTACK_VERSION=$OPENSTACK_VERSION
252                 PROVISIONER_TYPE=$PROVISIONER_TYPE
253                 INSTALLER_TYPE=$INSTALLER_TYPE
254                 DEPLOY_SCENARIO=$DEPLOY_SCENARIO
255                 TEST_SUITE=$TEST_SUITE
256                 YARDSTICK_DISPATCHER=$YARDSTICK_DISPATCHER
257                 CLEANUP=$CLEANUP
258               node-parameters: true
259               kill-phase-on: FAILURE
260               abort-all-job: true
261
262 - job-template:
263     name: 'openstack-{phase}-{distro}-kolla-{type}-{ci-loop}-{stream}'
264
265     disabled: false
266
267     concurrent: true
268
269     properties:
270       - logrotate
271
272     parameters:
273       - string:
274           name: PROJECT
275           default: $GERRIT_PROJECT
276       - string:
277           name: DISTRO
278           default: 'ubuntu1804'
279           description: 'Distribution to use for configuring target nodes (networking etc.). Overriden by upstream job.'
280       - string:
281           name: DEPLOY_TYPE
282           default: 'virtual'
283           description: 'Type of the deployment. Overriden by upstream job.'
284       - string:
285           name: OPENSTACK_VERSION
286           default: 'stein'
287           description: 'OpenStack Version to deploy and test'
288       - string:
289           name: USE_PREBUILT_DEPLOYMENT_IMAGE
290           default: 'false'
291           description: 'Use prebuilt deployment image while running as part of CI/CD'
292       - string:
293           name: ENGINE_ANSIBLE_PARAMS
294           default: ' -v '
295           description: 'Extra paramters that can be added when run the play books.'
296       - string:
297           name: DEPLOY_SCENARIO
298           default: 'k8-calico-nofeature'
299           description: 'Scenario to deploy and test'
300       - string:
301           name: PROVISIONER_TYPE
302           default: 'bifrost'
303           description: 'Provisioner to use for provisioning nodes'
304       - string:
305           name: INSTALLER_TYPE
306           default: 'kolla'
307           description: 'Installer to use for deploying the scenario'
308       - string:
309           name: TEST_FW
310           default: '{phase}'
311           description: 'Test framework to use'
312       - string:
313           name: TEST_SUITE
314           default: 'smoke'
315           description: 'Test suite to run'
316       - string:
317           name: TEST_REPO_URL
318           default: 'https://gerrit.nordix.org/infra/test.git'
319           description: 'URL to Nordix Cloud Infra test repository'
320       - string:
321           name: YARDSTICK_DISPATCHER
322           default: 'file'
323           description: 'Dispatcher to use for Yardstick reporting'
324       - string:
325           name: CLEANUP
326           default: 'false'
327
328     wrappers:
329       - build-timeout:
330           timeout: '{build-timeout}'
331       - fix-workspace-permissions
332
333     scm:
334       - git-scm:
335           ssh-credentials-id: nordixinfra-nordix-gerrit-ssh
336           branch: '{engine-branch}'
337           refspec: ''
338           wipe_workspace: true
339           clean_before: false
340
341     builders:
342       - description-setter:
343           description: $PROVISIONER_TYPE | $INSTALLER_TYPE | $DEPLOY_SCENARIO
344       - 'scenario-{phase}-macro'
345
346 # vim: set ts=2 sw=2 expandtab: