Reenable yardstick for virtual deployments
[infra/cicd.git] / jjb / cloud-infra / cloud-infra-periodic-engine.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-engine'
40
41     project: 'infra/engine'
42
43     stream:
44       - 'master':
45           branch: '{stream}'
46           disabled: 'false'
47
48     os:
49       - ubuntu1804:
50           disabled: 'false'
51           distribution: 'ubuntu18'
52           ipa_dib_os_element: 'coreos'
53           dib_os_release: 'bionic'
54           dib_os_element: 'ubuntu-minimal'
55       - centos7:
56           disabled: 'true'
57           distribution: 'centos7'
58           ipa_dib_os_element: 'coreos'
59           dib_os_release: '7'
60           dib_os_element: 'centos-minimal'
61
62     type:
63       - virtual
64
65     phase:
66       - deploy
67       - functest
68       - yardstick
69
70     jobs:
71       - 'cloud-infra-periodic-engine-{os}-{type}-{stream}'
72       - 'cloud-infra-periodic-{os}-{phase}-{type}-{stream}'
73
74 - job-template:
75     name: 'cloud-infra-periodic-engine-{os}-{type}-{stream}'
76
77     project-type: multijob
78
79     disabled: '{obj:disabled}'
80
81     concurrent: true
82
83     parameters:
84       - project-parameters:
85           project: '{project}'
86           branch: '{branch}'
87       - nordix-gerrit-parameters
88       - label:
89           name: SLAVE_LABEL
90           default: 'vpod-deploy-{os}'
91           description: 'Slave label to schedule this job on. All slaves have Ubuntu1604 no matter what distro target nodes use'
92       - string:
93           name: DISTRIBUTION
94           default: '{distribution}'
95           description: 'Distribution to use for configuring target nodes (networking etc.)'
96       - string:
97           name: USE_PREBUILT_DEPLOYMENT_IMAGE
98           default: 'true'
99           description: 'Use prebuilt deployment image while running as part of CI/CD'
100       - string:
101           name: IPA_DIB_OS_ELEMENT
102           default: '{ipa_dib_os_element}'
103           description: 'DIB OS Element to use for building the ramdisk image'
104       - string:
105           name: DIB_OS_RELEASE
106           default: '{dib_os_release}'
107           description: 'DIB OS Release to use for building the deployment image to provision target nodes with'
108       - string:
109           name: DIB_OS_ELEMENT
110           default: '{dib_os_element}'
111           description: 'DIB OS Element to use for building the deployment image to provision target nodes with'
112       - string:
113           name: DEPLOY_SCENARIO
114           default: 'k8-calico-nofeature'
115           description: 'Scenario to deploy and test'
116       - string:
117           name: TEST_SUITE
118           default: 'healthcheck'
119           description: 'Test suite to run'
120       - string:
121           name: CLEANUP
122           default: 'true'
123           description: 'Cleanup leftovers of the previous run'
124
125     properties:
126       - logrotate
127       - build-blocker:
128           use-build-blocker: true
129           blocking-jobs:
130             - 'cloud-infra-verify-engine-{os}-.*'
131             - 'cloud-infra-periodic-engine-{os}-.*'
132             - 'cloud-infra-os-.*'
133             - 'cloud-infra-k8-.*'
134           block-level: 'NODE'
135       - throttle:
136           max-per-node: 1
137           max-total: 3
138           option: project
139
140     wrappers:
141       - build-timeout:
142           timeout: 120
143       - fix-workspace-permissions
144       - openstack:
145           single-use: True
146
147     scm:
148       - git-scm:
149           ssh-credentials-id: nordixinfra-nordix-gerrit-ssh
150           branch: '{branch}'
151           refspec: ''
152
153     triggers:
154       - timed: 'H H/2 * * *'
155
156     builders:
157       - multijob:
158           name: deploy
159           condition: SUCCESSFUL
160           projects:
161             - name: 'cloud-infra-periodic-{os}-deploy-{type}-{stream}'
162               current-parameters: true
163               predefined-parameters: |
164                 DISTRIBUTION=$DISTRIBUTION
165                 USE_PREBUILT_DEPLOYMENT_IMAGE=$USE_PREBUILT_DEPLOYMENT_IMAGE
166                 IPA_DIB_OS_ELEMENT=$IPA_DIB_OS_ELEMENT
167                 DIB_OS_RELEASE=$DIB_OS_RELEASE
168                 DIB_OS_ELEMENT=$DIB_OS_ELEMENT
169                 DEPLOY_SCENARIO=$DEPLOY_SCENARIO
170                 CLEANUP=$CLEANUP
171               git-revision: true
172               node-parameters: true
173               kill-phase-on: FAILURE
174               abort-all-job: true
175       - multijob:
176           name: functest
177           condition: ALWAYS
178           projects:
179             - name: 'cloud-infra-periodic-{os}-functest-{type}-{stream}'
180               current-parameters: true
181               predefined-parameters: |
182                 DISTRIBUTION=$DISTRIBUTION
183                 DEPLOY_SCENARIO=$DEPLOY_SCENARIO
184                 TEST_SUITE=$TEST_SUITE
185                 CLEANUP=$CLEANUP
186               node-parameters: true
187               kill-phase-on: NEVER
188               abort-all-job: false
189       - multijob:
190           name: yardstick
191           condition: ALWAYS
192           projects:
193             - name: 'cloud-infra-periodic-{os}-yardstick-{type}-{stream}'
194               current-parameters: true
195               predefined-parameters: |
196                 DISTRIBUTION=$DISTRIBUTION
197                 DEPLOY_SCENARIO=$DEPLOY_SCENARIO
198                 TEST_SUITE=$TEST_SUITE
199                 CLEANUP=$CLEANUP
200               node-parameters: true
201               kill-phase-on: NEVER
202               abort-all-job: false
203
204 - job-template:
205     name: 'cloud-infra-periodic-{os}-{phase}-{type}-{stream}'
206
207     disabled: false
208
209     concurrent: true
210
211     properties:
212       - logrotate
213
214     parameters:
215       - string:
216           name: PROJECT
217           default: $GERRIT_PROJECT
218       - string:
219           name: DISTRIBUTION
220           default: 'ubuntu18'
221           description: 'Distribution to use for configuring target nodes (networking etc.). Overriden by upstream job.'
222       - string:
223           name: USE_PREBUILT_DEPLOYMENT_IMAGE
224           default: 'false'
225           description: 'Use prebuilt deployment image while running as part of CI/CD'
226       - string:
227           name: IPA_DIB_OS_ELEMENT
228           default: 'fedora'
229           description: 'DIB OS Element to use for building the ramdisk image. Overriden by upstream job.'
230       - string:
231           name: DIB_OS_RELEASE
232           default: 'bionic'
233           description: 'DIB OS Release to use for building the deployment image to provision target nodes with. Overriden by upstream job.'
234       - string:
235           name: DIB_OS_ELEMENT
236           default: 'ubuntu-minimal'
237           description: 'DIB OS Element to use for building the deployment image to provision target nodes with. Overriden by upstream job.'
238       - string:
239           name: ENGINE_ANSIBLE_PARAMS
240           default: ' -v '
241           description: 'Extra paramters that can be added when run the play books.'
242       - string:
243           name: DEPLOY_SCENARIO
244           default: 'k8-calico-nofeature'
245           description: 'Scenario to deploy and test'
246       - string:
247           name: TEST_FW
248           default: '{phase}'
249           description: 'Test framework to use'
250       - string:
251           name: TEST_SUITE
252           default: 'healthcheck'
253           description: 'Test suite to run'
254       - string:
255           name: TEST_REPO_URL
256           default: 'https://gerrit.nordix.org/infra/test.git'
257           description: 'URL to Nordix Cloud Infra test repository'
258       - string:
259           name: CLEANUP
260           default: 'false'
261
262     wrappers:
263       - build-timeout:
264           timeout: 120
265       - fix-workspace-permissions
266
267     scm:
268       - git-scm:
269           ssh-credentials-id: nordixinfra-nordix-gerrit-ssh
270           branch: '{branch}'
271           refspec: ''
272
273     builders:
274       - 'cloud-infra-{phase}-macro'
275
276 # vim: set ts=2 sw=2 expandtab: