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