e0cb0dd9af9201710918e84cdbc282ad4f9a2b12
[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: 'true'
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
64     deploy-scenario:
65       - os-nosdn-nofeature
66
67     type:
68       - baremetal:
69           pod-name: est-baremetal
70           slave-label: baremetal-deploy
71           provisioner-type: bifrost
72           installer-type: kolla
73           test-suite: smoke
74           yardstick-dispatcher: 'influxdb'
75           ci-loop: daily
76           trigger-on: '@daily'
77       - virtual:
78           pod-name: est-virtual
79           slave-label: vpod
80           provisioner-type: bifrost
81           installer-type: kolla
82           test-suite: healthcheck
83           yardstick-dispatcher: 'influxdb'
84           ci-loop: periodic
85           trigger-on: '0 */8 * * *'
86
87     phase:
88       - deploy:
89           build-timeout: 90
90       - functest:
91           build-timeout: 240
92       - yardstick:
93           build-timeout: 120
94       - promote:
95           build-timeout: 5
96
97     jobs:
98       - '{deploy-scenario}-{distro}-kolla-{type}-{ci-loop}-{stream}'
99       - 'openstack-{phase}-{distro}-kolla-{type}-{ci-loop}-{stream}'
100
101 - job-template:
102     name: '{deploy-scenario}-{distro}-kolla-{type}-{ci-loop}-{stream}'
103
104     project-type: multijob
105
106     disabled: '{obj:disabled}'
107
108     concurrent: true
109
110     parameters:
111       - project-parameters:
112           project: '{project}'
113           branch: '{engine-branch}'
114       - nordix-gerrit-parameters
115       - label:
116           name: SLAVE_LABEL
117           default: '{slave-label}'
118           description: 'Slave label to schedule this job on. All slaves have Ubuntu1604 no matter what distro target nodes use'
119       - string:
120           name: CI_LOOP
121           default: '{ci-loop}'
122           description: 'Type of the deployment'
123       - string:
124           name: DISTRO
125           default: '{distro}'
126           description: 'Distribution to use for configuring target nodes (networking etc.)'
127       - string:
128           name: DEPLOY_TYPE
129           default: '{type}'
130           description: 'Type of the deployment'
131       - string:
132           name: USE_PREBUILT_DEPLOYMENT_IMAGE
133           default: 'true'
134           description: 'Use prebuilt deployment image while running as part of CI/CD'
135       - string:
136           name: OPENSTACK_VERSION
137           default: '{openstack-branch}'
138           description: 'OpenStack Version to deploy and test'
139       - string:
140           name: PROVISIONER_TYPE
141           default: '{provisioner-type}'
142           description: 'Provisioner to use for provisioning nodes'
143       - string:
144           name: INSTALLER_TYPE
145           default: '{installer-type}'
146           description: 'Installer to use for deploying the scenario'
147       - string:
148           name: DEPLOY_SCENARIO
149           default: '{deploy-scenario}'
150           description: 'Scenario to deploy and test'
151       - string:
152           name: TEST_SUITE
153           default: '{test-suite}'
154           description: 'Test suite to run'
155       - string:
156           name: YARDSTICK_DISPATCHER
157           default: '{yardstick-dispatcher}'
158           description: 'Dispatcher to use for Yardstick reporting'
159
160     properties:
161       - logrotate
162       - build-blocker:
163           use-build-blocker: true
164           blocking-jobs:
165             - 'cloud-infra-verify-engine-.*'
166             - 'cloud-infra-verify-scenario-.*'
167             - 'cloud-infra-periodic-engine-.*'
168             - 'onap-.*'
169             - 'k8-.*'
170             - 'os-.*'
171             - 'nolabs-.*'
172           block-level: 'NODE'
173       - throttle:
174           max-per-node: 1
175           max-total: 3
176           option: project
177
178     wrappers:
179       - build-timeout:
180           timeout: 455
181       - fix-workspace-permissions
182
183     scm:
184       - git-scm:
185           ssh-credentials-id: nordixinfra-nordix-gerrit-ssh
186           branch: '{engine-branch}'
187           refspec: ''
188           wipe_workspace: true
189           clean_before: false
190
191     triggers:
192       - timed: '{trigger-on}'
193
194     builders:
195       - description-setter:
196           description: $PROVISIONER_TYPE | $INSTALLER_TYPE | $DEPLOY_SCENARIO
197       - multijob:
198           name: deploy
199           condition: SUCCESSFUL
200           projects:
201             - name: 'openstack-deploy-{distro}-{installer-type}-{type}-{ci-loop}-{stream}'
202               current-parameters: true
203               predefined-parameters: |
204                 CI_LOOP=$CI_LOOP
205                 DISTRO=$DISTRO
206                 DEPLOY_TYPE=$DEPLOY_TYPE
207                 USE_PREBUILT_DEPLOYMENT_IMAGE=$USE_PREBUILT_DEPLOYMENT_IMAGE
208                 OPENSTACK_VERSION=$OPENSTACK_VERSION
209                 PROVISIONER_TYPE=$PROVISIONER_TYPE
210                 INSTALLER_TYPE=$INSTALLER_TYPE
211                 DEPLOY_SCENARIO=$DEPLOY_SCENARIO
212               git-revision: true
213               node-parameters: true
214               kill-phase-on: FAILURE
215               abort-all-job: true
216       - multijob:
217           name: functest
218           condition: ALWAYS
219           projects:
220             - name: 'openstack-functest-{distro}-{installer-type}-{type}-{ci-loop}-{stream}'
221               current-parameters: true
222               predefined-parameters: |
223                 CI_LOOP=$CI_LOOP
224                 DISTRO=$DISTRO
225                 DEPLOY_TYPE=$DEPLOY_TYPE
226                 OPENSTACK_VERSION=$OPENSTACK_VERSION
227                 PROVISIONER_TYPE=$PROVISIONER_TYPE
228                 INSTALLER_TYPE=$INSTALLER_TYPE
229                 DEPLOY_SCENARIO=$DEPLOY_SCENARIO
230                 TEST_SUITE=$TEST_SUITE
231                 YARDSTICK_DISPATCHER=$YARDSTICK_DISPATCHER
232               node-parameters: true
233               kill-phase-on: NEVER
234               abort-all-job: false
235       - multijob:
236           name: yardstick
237           condition: ALWAYS
238           projects:
239             - name: 'openstack-yardstick-{distro}-{installer-type}-{type}-{ci-loop}-{stream}'
240               current-parameters: true
241               predefined-parameters: |
242                 CI_LOOP=$CI_LOOP
243                 DISTRO=$DISTRO
244                 DEPLOY_TYPE=$DEPLOY_TYPE
245                 OPENSTACK_VERSION=$OPENSTACK_VERSION
246                 PROVISIONER_TYPE=$PROVISIONER_TYPE
247                 INSTALLER_TYPE=$INSTALLER_TYPE
248                 DEPLOY_SCENARIO=$DEPLOY_SCENARIO
249                 TEST_SUITE=$TEST_SUITE
250                 YARDSTICK_DISPATCHER=$YARDSTICK_DISPATCHER
251               node-parameters: true
252               kill-phase-on: NEVER
253               abort-all-job: false
254       - multijob:
255           name: promote
256           condition: SUCCESSFUL
257           projects:
258             - name: 'openstack-promote-{distro}-{installer-type}-{type}-{ci-loop}-{stream}'
259               current-parameters: true
260               predefined-parameters: |
261                 CI_LOOP=$CI_LOOP
262                 DISTRO=$DISTRO
263                 DEPLOY_TYPE=$DEPLOY_TYPE
264                 OPENSTACK_VERSION=$OPENSTACK_VERSION
265                 PROVISIONER_TYPE=$PROVISIONER_TYPE
266                 INSTALLER_TYPE=$INSTALLER_TYPE
267                 DEPLOY_SCENARIO=$DEPLOY_SCENARIO
268                 TEST_SUITE=$TEST_SUITE
269                 YARDSTICK_DISPATCHER=$YARDSTICK_DISPATCHER
270               node-parameters: true
271               kill-phase-on: FAILURE
272               abort-all-job: true
273
274 - job-template:
275     name: 'openstack-{phase}-{distro}-kolla-{type}-{ci-loop}-{stream}'
276
277     disabled: false
278
279     concurrent: true
280
281     properties:
282       - logrotate
283
284     parameters:
285       - string:
286           name: PROJECT
287           default: $GERRIT_PROJECT
288       - string:
289           name: DISTRO
290           default: 'ubuntu1804'
291           description: 'Distribution to use for configuring target nodes (networking etc.). Overriden by upstream job.'
292       - string:
293           name: CI_LOOP
294           default: '{ci-loop}'
295           description: 'Type of the deployment'
296       - string:
297           name: DEPLOY_TYPE
298           default: 'virtual'
299           description: 'Type of the deployment. Overriden by upstream job.'
300       - string:
301           name: OPENSTACK_VERSION
302           default: 'stein'
303           description: 'OpenStack Version to deploy and test'
304       - string:
305           name: USE_PREBUILT_DEPLOYMENT_IMAGE
306           default: 'false'
307           description: 'Use prebuilt deployment image while running as part of CI/CD'
308       - string:
309           name: ENGINE_ANSIBLE_PARAMS
310           default: ' -v '
311           description: 'Extra paramters that can be added when run the play books.'
312       - string:
313           name: DEPLOY_SCENARIO
314           default: 'k8-calico-nofeature'
315           description: 'Scenario to deploy and test'
316       - string:
317           name: PROVISIONER_TYPE
318           default: 'bifrost'
319           description: 'Provisioner to use for provisioning nodes'
320       - string:
321           name: INSTALLER_TYPE
322           default: 'kolla'
323           description: 'Installer to use for deploying the scenario'
324       - string:
325           name: TEST_FW
326           default: '{phase}'
327           description: 'Test framework to use'
328       - string:
329           name: TEST_SUITE
330           default: 'smoke'
331           description: 'Test suite to run'
332       - string:
333           name: TEST_REPO_URL
334           default: 'https://gerrit.nordix.org/infra/test.git'
335           description: 'URL to Nordix Cloud Infra test repository'
336       - string:
337           name: YARDSTICK_DISPATCHER
338           default: 'file'
339           description: 'Dispatcher to use for Yardstick reporting'
340
341     wrappers:
342       - build-timeout:
343           timeout: '{build-timeout}'
344       - fix-workspace-permissions
345
346     scm:
347       - git-scm:
348           ssh-credentials-id: nordixinfra-nordix-gerrit-ssh
349           branch: '{engine-branch}'
350           refspec: ''
351           wipe_workspace: true
352           clean_before: false
353
354     builders:
355       - description-setter:
356           description: $PROVISIONER_TYPE | $INSTALLER_TYPE | $DEPLOY_SCENARIO
357       - 'scenario-{phase}-macro'
358
359 # vim: set ts=2 sw=2 expandtab: