2 # ============LICENSE_START=======================================================
3 # Copyright (C) 2019 Nordix Foundation.
4 # ================================================================================
5 # Licensed under the Apache License, Version 2.0 (the "License");
6 # you may not use this file except in compliance with the License.
7 # You may obtain a copy of the License at
9 # http://www.apache.org/licenses/LICENSE-2.0
11 # Unless required by applicable law or agreed to in writing, software
12 # distributed under the License is distributed on an "AS IS" BASIS,
13 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 # See the License for the specific language governing permissions and
15 # limitations under the License.
17 # SPDX-License-Identifier: Apache-2.0
18 # ============LICENSE_END=========================================================
21 name: 'onap-release-deploy-test'
23 project: 'onap-release-deploy-test'
29 deploy-scenario: 'onap-full-nofeature'
33 deploy-scenario: 'onap-sdc-nofeature'
37 deploy-scenario: 'onap-sdc-nofeature'
41 deploy-scenario: 'onap-sdc-nofeature'
46 execution-mode: offline-deployment
47 # just deploy phase for now and ONAP testing isn't defined yet
54 provisioner-type: 'heat'
55 slave-type: 'jumphost'
56 gated-projects: 'infra/stack/onap|infra/installer/oom'
57 pdf: "https://gerrit.nordix.org/gitweb?p=infra/provisioner/heat.git;a=blob_plain;f=playbooks/roles/create-stack/files/heat-environment-ci-city-ubuntu1804-onap.yaml"
58 idf: "https://gerrit.nordix.org/gitweb?p=infra/provisioner/heat.git;a=blob_plain;f=playbooks/roles/create-stack/files/heat-idf.yaml"
65 openrc-credentials-file: 'est-jenkins-openrcfile-city-frankfurt-cicd'
67 - 'onap-release-{environment-type}-deploy-test-{distro}-{cloud}-{type}-{stream}'
68 - 'onap-release-{environment-type}-deploy-{distro}-{cloud}-{type}-{stream}'
69 - 'onap-release-{environment-type}-deployk8s-{distro}-{cloud}-{type}-{stream}'
72 name: 'onap-release-{environment-type}-deploy-test-{distro}-{cloud}-{type}-{stream}'
74 project-type: multijob
76 disabled: '{obj:disabled}'
83 default: '{deploy-scenario}'
84 description: 'Scenario to test change with.'
87 default: '{k8s-version}'
88 description: 'K8S version to use for this deployment'
91 default: /tmp/inventory.ini
92 description: 'Location of the inventory file. Copied from k8s install'
96 description: 'Distribution to use for configuring target nodes (networking etc.)'
99 default: 'engine-{slave-type}-{environment-type}-{distro}-fra'
100 description: 'Slave label to schedule this job on.'
104 description: 'Hardware type - could be virtual, cloud, or baremetal'
107 default: '{execution-mode}'
108 description: 'Execution mode to run in'
112 description: 'PDF file to use for deployment'
116 description: 'IDF file to use for deployment'
118 name: HEAT_STACK_NAME
119 default: "nordix-cicd-verify-onap-{environment-type}-{distro}-{stream}"
120 description: 'Name of the created stack'
123 default: "keypair-nordix-cicd-verify-onap-{environment-type}-{distro}-{stream}"
124 description: 'Name of the created keypair'
126 name: USE_PREBUILT_DEPLOYMENT_IMAGE
128 description: 'Use prebuilt deployment image while running as part of CI/CD'
131 default: 'https://gerrit.nordix.org/infra/test.git'
132 description: 'URL to clone the test repo from'
136 description: 'Test framework to use'
139 default: 'healthcheck'
140 description: 'Test suite to run'
142 name: YARDSTICK_DISPATCHER
144 description: 'Dispatcher to use for Yardstick reporting'
148 description: 'Delete the stack upon completion of the build'
152 description: 'Verbosity setting for the engine - true or false - default is false'
156 description: 'CI loop the job belongs to'
157 - project-parameters:
158 project: $GERRIT_PROJECT
160 description: 'The project and branch which the change is proposed for'
161 - nordix-gerrit-parameters
165 # NOTE (fdegir): throttle categories are controlled in jenkins global configuration
172 - engine-verify-deploy-test
176 url: https://gerrit.nordix.org/infra/engine.git
184 - credentials-binding:
186 credential-id: '{openrc-credentials-file}'
187 variable: OPENRC_FILE
188 - username-password-separated:
189 credential-id: 'nordix-cicd-arm-credentials'
190 username: NORDIX_ARM_USERNAME
191 password: NORDIX_ARM_TOKEN
200 sudo chown -R $USER:$USER $WORKSPACE || exit 1
201 # offline nodes can not resolve Nordix Artifactory and Gerrit
202 if [[ "$EXECUTION_MODE" == "offline-deployment" ]]; then
203 echo "Info : Offline deployment. Adding City OpenStack Endpoint, Nordix Artifactory and Gerrit Public IP to /etc/hosts"
204 sudo sed -i 's/^search/# search/' /etc/resolv.conf
205 sudo bash -c "cat << EOF >> /etc/hosts
207 91.106.198.25 artifactory.nordix.org
208 91.106.198.142 gerrit.nordix.org
209 86.107.242.50 fra1.citycloud.com
212 # we need to get rid of search domain as well
213 sudo sed -i 's/^search/# search/' /etc/resolv.conf
217 - 'generate-k8sdeployment-environment-macro'
219 name: "{environment-type} deployment on {type} instances"
220 condition: SUCCESSFUL
221 execution-type: SEQUENTIALLY
223 - name: 'onap-release-{environment-type}-deployk8s-{distro}-{cloud}-{type}-{stream}'
224 current-parameters: true
226 node-parameters: true
227 kill-phase-on: FAILURE
229 property-file: $WORKSPACE/k8s.properties
230 - name: 'onap-release-{environment-type}-deploy-{distro}-{cloud}-{type}-{stream}'
231 current-parameters: true
233 node-parameters: true
234 kill-phase-on: FAILURE
247 - 'wait-pkg-mgr-macro'
248 - 'delete-stack-macro'
251 name: 'onap-release-{environment-type}-deploy-{distro}-{cloud}-{type}-{stream}'
253 disabled: '{obj:disabled}'
267 - credentials-binding:
269 credential-id: '{openrc-credentials-file}'
270 variable: OPENRC_FILE
271 - username-password-separated:
272 credential-id: 'nordix-cicd-arm-credentials'
273 username: NORDIX_ARM_USERNAME
274 password: NORDIX_ARM_TOKEN
276 - fix-workspace-permissions
279 - 'generate-ssh-keypair-macro'
280 - 'wait-pkg-mgr-macro'
281 - 'download-deploy-artifact-macro'
285 name: 'onap-release-{environment-type}-deployk8s-{distro}-{cloud}-{type}-{stream}'
287 disabled: '{obj:disabled}'
300 - credentials-binding:
302 credential-id: '{openrc-credentials-file}'
303 variable: OPENRC_FILE
304 - username-password-separated:
305 credential-id: 'nordix-cicd-arm-credentials'
306 username: NORDIX_ARM_USERNAME
307 password: NORDIX_ARM_TOKEN
309 - fix-workspace-permissions
312 - 'generate-ssh-keypair-macro'
313 - 'wait-pkg-mgr-macro'
314 - 'download-deploy-artifact-macro'