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