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
10 # http://www.apache.org/licenses/LICENSE-2.0
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.
18 # SPDX-License-Identifier: Apache-2.0
19 # ============LICENSE_END=========================================================
21 #--------------------------------------------------------------------------------------
22 # The jobs declared in this JJB configuration file are used for verifying patches
23 # that are sent to the repositories below
24 # - cloud-infra/engine
26 # These jobs verify changes that
27 # - implement new features or fix bugs for the deployment framework, engine, itself
28 # - implement new features or fix bugs to the playbooks and roles used for utilizing
29 # open source components such as bifrost, kubespray, and kolla-ansible
30 # - bump versions of open source components or the scenarios
32 # These jobs are set to run on slaves with label vpod-deploy-ubuntu1604.
34 # - Ubuntu1604 as the base distro
35 # - nested virtualization
38 # - 16 CPUs/32GB RAM/200 GB Disk
39 # - docker, git vim curl wget zip unzip chrony apt-transport-https ca-certificates curl
40 # gnupg-agent software-properties-common docker-ce docker-ce-cli containerd.io openjdk-8-jre
42 # The slaves should not have a cloud infra scenario deployed on them.
43 #--------------------------------------------------------------------------------------
46 name: 'cloud-infra-verify-engine'
48 project: 'infra/engine'
69 slave-label: 'city-jumphost-onap-ubuntu1804'
70 openrc-credentials-file: 'est-jenkins-openrcfile-city-karlskrona-onap'
74 provisioner-type: 'bifrost'
76 provisioner-type: 'heat'
85 - 'cloud-infra-verify-engine-{distro}-{cloud}-{type}-{stream}'
86 - 'cloud-infra-verify-engine-{distro}-{phase}-{type}-{stream}'
89 name: 'cloud-infra-verify-engine-{distro}-{cloud}-{type}-{stream}'
91 project-type: multijob
93 disabled: '{obj:disabled}'
101 - nordix-gerrit-parameters
104 default: '{slave-label}'
105 description: 'Slave label to schedule this job on. All slaves have Ubuntu1604 no matter what distro target nodes use'
109 description: 'Distribution to use for configuring target nodes (networking etc.)'
111 name: PROVISIONER_TYPE
112 default: '{provisioner-type}'
113 description: 'Provisioner type to use'
117 description: 'Type of the deployment'
119 name: HEAT_ENVIRONMENT_FILENAME
120 default: 'heat-environment-{cloud}-{distro}.yaml'
121 description: 'Name of heat-environment file to use.'
124 default: "nordix-cicd-verify-engine-{distro}-$BUILD_NUMBER"
125 description: 'Name of the created stack'
127 name: USE_PREBUILT_DEPLOYMENT_IMAGE
129 description: 'Use prebuilt deployment image while running as part of CI/CD'
132 default: 'healthcheck'
133 description: 'Test suite to run'
135 name: YARDSTICK_DISPATCHER
137 description: 'Dispatcher to use for Yardstick reporting'
141 description: 'Delete the stack upon completion of the build'
145 description: 'Cleanup leftovers of the previous run'
150 use-build-blocker: true
152 - 'cloud-infra-verify-engine-.*'
153 - 'cloud-infra-verify-scenario-.*'
154 - 'cloud-infra-periodic-engine-.*'
164 - credentials-binding:
166 credential-id: '{openrc-credentials-file}'
167 variable: OPENRC_FILE
171 - fix-workspace-permissions
177 ssh-credentials-id: nordixinfra-nordix-gerrit-ssh
179 refspec: $GERRIT_REFSPEC
185 server-name: 'Nordix Gerrit'
187 - patchset-created-event:
188 exclude-drafts: 'false'
189 exclude-trivial-rebase: 'false'
190 exclude-no-code-change: 'false'
191 - draft-published-event
192 - comment-added-contains-event:
193 comment-contains-value: 'recheck'
194 - comment-added-contains-event:
195 comment-contains-value: 'reverify'
197 - project-compare-type: 'REG_EXP'
198 project-pattern: 'infra\/engine'
200 - branch-compare-type: 'ANT'
201 branch-pattern: '**/{branch}'
203 - compare-type: 'ANT'
206 successful: '{obj:successful}'
207 failed: '{obj:failed}'
208 unstable: '{obj:unstable}'
209 notbuilt: '{obj:notbuilt}'
210 custom-url: '* $JOB_NAME $BUILD_URL'
215 cp $OPENRC_FILE /tmp/openrc
216 - 'cloud-infra-determine-scenario-macro'
219 condition: SUCCESSFUL
221 - name: 'cloud-infra-verify-engine-{distro}-deploy-{type}-{stream}'
222 current-parameters: true
223 predefined-parameters: |
225 DEPLOY_TYPE=$DEPLOY_TYPE
226 PROVISIONER_TYPE=$PROVISIONER_TYPE
227 STACK_NAME=$STACK_NAME
228 HEAT_ENVIRONMENT_FILENAME=$HEAT_ENVIRONMENT_FILENAME
229 USE_PREBUILT_DEPLOYMENT_IMAGE=$USE_PREBUILT_DEPLOYMENT_IMAGE
231 GERRIT_PROJECT=$GERRIT_PROJECT
232 GERRIT_BRANCH=$GERRIT_BRANCH
233 GERRIT_REFSPEC=$GERRIT_REFSPEC
234 GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER
235 GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE
236 node-parameters: true
237 kill-phase-on: FAILURE
241 condition: SUCCESSFUL
243 - name: 'cloud-infra-verify-engine-{distro}-functest-{type}-{stream}'
244 current-parameters: true
245 predefined-parameters: |
247 DEPLOY_TYPE=$DEPLOY_TYPE
248 PROVISIONER_TYPE=$PROVISIONER_TYPE
249 STACK_NAME=$STACK_NAME
250 HEAT_ENVIRONMENT_FILENAME=$HEAT_ENVIRONMENT_FILENAME
251 USE_PREBUILT_DEPLOYMENT_IMAGE=$USE_PREBUILT_DEPLOYMENT_IMAGE
252 TEST_SUITE=$TEST_SUITE
253 YARDSTICK_DISPATCHER=$YARDSTICK_DISPATCHER
255 GERRIT_PROJECT=$GERRIT_PROJECT
256 GERRIT_BRANCH=$GERRIT_BRANCH
257 GERRIT_REFSPEC=$GERRIT_REFSPEC
258 GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER
259 GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE
260 node-parameters: true
261 kill-phase-on: FAILURE
276 !include-raw-escape: ./wait-for-pkg-manager.sh
278 !include-raw: ./delete-heat-stack.sh
281 name: 'cloud-infra-verify-engine-{distro}-{phase}-{type}-{stream}'
293 default: $GERRIT_PROJECT
296 default: 'ubuntu1804'
297 description: 'Distribution to use for configuring target nodes (networking etc.). Overriden by upstream job.'
301 description: 'Type of the deployment. Overriden by upstream job.'
303 name: PROVISIONER_TYPE
305 description: 'Provisioner type to use. Overriden by upstream job.'
307 name: HEAT_ENVIRONMENT_FILENAME
308 default: "heat-environment-city-ubuntu1804.yaml"
309 description: 'Name of heat-environment file to use.'
311 name: HEAT_ENVIRONMENT_FILE
312 default: "file://$WORKSPACE/engine/provisioner/heat/playbooks/roles/install-configure-heat/files/$HEAT_ENVIRONMENT_FILENAME"
313 description: 'Location of heat-environment file to use.'
316 default: "nordix-cicd-verify-engine-{distro}-$BUILD_NUMBER"
317 description: 'Name of the created stack'
319 name: USE_PREBUILT_DEPLOYMENT_IMAGE
321 description: 'Use prebuilt deployment image while running as part of CI/CD'
325 description: 'Test framework to use'
328 default: 'healthcheck'
329 description: 'Test suite to run'
332 default: 'https://gerrit.nordix.org/infra/test.git'
333 description: 'URL to Nordix Cloud Infra test repository'
335 name: YARDSTICK_DISPATCHER
337 description: 'Dispatcher to use for Yardstick reporting'
345 timeout: '{build-timeout}'
346 - fix-workspace-permissions
350 ssh-credentials-id: nordixinfra-nordix-gerrit-ssh
352 refspec: $GERRIT_REFSPEC
357 - 'cloud-infra-determine-scenario-macro'
358 - 'cloud-infra-{phase}-macro'
360 # vim: set ts=2 sw=2 expandtab: