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-full-nofeature'
37 deploy-scenario: 'onap-sdc-nofeature'
41 deploy-scenario: 'onap-sdc-nofeature'
46 execution-mode: offline-deployment
55 provisioner-type: 'heat'
56 slave-type: 'jumphost'
57 gated-projects: 'infra/stack/onap|infra/installer/oom'
58 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"
59 idf: "https://gerrit.nordix.org/gitweb?p=infra/provisioner/heat.git;a=blob_plain;f=playbooks/roles/create-stack/files/heat-idf.yaml"
66 openrc-credentials-file: 'est-jenkins-openrcfile-city-frankfurt-cicd'
68 - 'onap-release-{environment-type}-deploy-test-{distro}-{cloud}-{type}-{stream}'
69 - 'onap-release-{environment-type}-deploy-{distro}-{cloud}-{type}-{stream}'
70 - 'onap-release-{environment-type}-deployk8s-{distro}-{cloud}-{type}-{stream}'
71 - 'onap-release-{environment-type}-xtesting-infra-healthcheck-{distro}-{cloud}-{type}-{stream}'
72 - 'onap-release-{environment-type}-xtesting-healthcheck-{distro}-{cloud}-{type}-{stream}'
75 name: 'onap-release-{environment-type}-deploy-test-{distro}-{cloud}-{type}-{stream}'
77 project-type: multijob
79 disabled: '{obj:disabled}'
86 default: '{deploy-scenario}'
87 description: 'Scenario to test change with.'
90 default: '{k8s-version}'
91 description: 'K8S version to use for this deployment'
94 default: /tmp/inventory.ini
95 description: 'Location of the inventory file. Copied from k8s install'
99 description: 'Distribution to use for configuring target nodes (networking etc.)'
102 default: 'engine-{slave-type}-{environment-type}-{distro}-fra'
103 description: 'Slave label to schedule this job on.'
107 description: 'Hardware type - could be virtual, cloud, or baremetal'
110 default: '{execution-mode}'
111 description: 'Execution mode to run in'
115 description: 'PDF file to use for deployment'
119 description: 'IDF file to use for deployment'
121 name: HEAT_STACK_NAME
122 default: "nordix-cicd-verify-onap-{environment-type}-{distro}-{stream}"
123 description: 'Name of the created stack'
126 default: "keypair-nordix-cicd-verify-onap-{environment-type}-{distro}-{stream}"
127 description: 'Name of the created keypair'
129 name: USE_PREBUILT_DEPLOYMENT_IMAGE
131 description: 'Use prebuilt deployment image while running as part of CI/CD'
135 description: 'Delete the stack upon completion of the build'
139 description: 'Verbosity setting for the engine - true or false - default is false'
143 description: 'CI loop the job belongs to'
144 - project-parameters:
145 project: $GERRIT_PROJECT
147 description: 'The project and branch which the change is proposed for'
148 - nordix-gerrit-parameters
152 # NOTE (fdegir): throttle categories are controlled in jenkins global configuration
159 - engine-verify-deploy-test
163 url: https://gerrit.nordix.org/infra/engine.git
171 - credentials-binding:
173 credential-id: '{openrc-credentials-file}'
174 variable: OPENRC_FILE
175 - username-password-separated:
176 credential-id: 'nordix-cicd-arm-credentials'
177 username: NORDIX_ARM_USERNAME
178 password: NORDIX_ARM_TOKEN
187 sudo chown -R $USER:$USER $WORKSPACE || exit 1
188 # offline nodes can not resolve Nordix Artifactory and Gerrit
189 if [[ "$EXECUTION_MODE" == "offline-deployment" ]]; then
190 echo "Info : Offline deployment. Adding City OpenStack Endpoint, Nordix Artifactory and Gerrit Public IP to /etc/hosts"
191 sudo sed -i 's/^search/# search/' /etc/resolv.conf
192 sudo bash -c "cat << EOF >> /etc/hosts
194 91.106.198.25 artifactory.nordix.org
195 91.106.198.142 gerrit.nordix.org
196 86.107.242.50 fra1.citycloud.com
199 # we need to get rid of search domain as well
200 sudo sed -i 's/^search/# search/' /etc/resolv.conf
204 - 'generate-k8sdeployment-environment-macro'
206 name: "{environment-type} deployment on {type} instances"
207 condition: SUCCESSFUL
208 execution-type: SEQUENTIALLY
210 - name: 'onap-release-{environment-type}-deployk8s-{distro}-{cloud}-{type}-{stream}'
211 current-parameters: true
213 node-parameters: true
214 kill-phase-on: FAILURE
216 property-file: $WORKSPACE/k8s.properties
217 - name: 'onap-release-{environment-type}-deploy-{distro}-{cloud}-{type}-{stream}'
218 current-parameters: true
220 node-parameters: true
221 kill-phase-on: FAILURE
224 name: xTesting for infra-healthcheck and healthcheck
227 - name: 'onap-release-{environment-type}-xtesting-infra-healthcheck-{distro}-{cloud}-{type}-{stream}'
228 current-parameters: true
230 node-parameters: true
231 kill-phase-on: FAILURE
233 - name: 'onap-release-{environment-type}-xtesting-healthcheck-{distro}-{cloud}-{type}-{stream}'
234 current-parameters: true
236 node-parameters: true
237 kill-phase-on: FAILURE
250 - 'wait-pkg-mgr-macro'
251 - 'delete-stack-macro'
254 name: 'onap-release-{environment-type}-deploy-{distro}-{cloud}-{type}-{stream}'
256 disabled: '{obj:disabled}'
270 - credentials-binding:
272 credential-id: '{openrc-credentials-file}'
273 variable: OPENRC_FILE
274 - username-password-separated:
275 credential-id: 'nordix-cicd-arm-credentials'
276 username: NORDIX_ARM_USERNAME
277 password: NORDIX_ARM_TOKEN
279 - fix-workspace-permissions
282 - 'generate-ssh-keypair-macro'
283 - 'wait-pkg-mgr-macro'
284 - 'download-deploy-artifact-macro'
288 name: 'onap-release-{environment-type}-deployk8s-{distro}-{cloud}-{type}-{stream}'
290 disabled: '{obj:disabled}'
303 - credentials-binding:
305 credential-id: '{openrc-credentials-file}'
306 variable: OPENRC_FILE
307 - username-password-separated:
308 credential-id: 'nordix-cicd-arm-credentials'
309 username: NORDIX_ARM_USERNAME
310 password: NORDIX_ARM_TOKEN
312 - fix-workspace-permissions
315 - 'generate-ssh-keypair-macro'
316 - 'wait-pkg-mgr-macro'
317 - 'download-deploy-artifact-macro'
321 name: 'onap-release-{environment-type}-xtesting-infra-healthcheck-{distro}-{cloud}-{type}-{stream}'
323 disabled: '{obj:disabled}'
328 default: '{execution-mode}'
329 description: 'Execution mode'
332 default: 'https://gerrit.nordix.org/infra/test.git'
333 description: 'URL to clone the test repo from'
337 description: 'Test framework to use'
340 default: 'infra-healthcheck'
341 description: 'Test suite to run'
354 - fix-workspace-permissions
357 - 'generate-ssh-keypair-macro'
358 - 'wait-pkg-mgr-macro'
359 - 'download-deploy-artifact-macro'
360 - 'xtesting-infra-healthcheck-macro'
363 name: 'onap-release-{environment-type}-xtesting-healthcheck-{distro}-{cloud}-{type}-{stream}'
365 disabled: '{obj:disabled}'
370 default: '{execution-mode}'
371 description: 'Execution mode'
374 default: 'https://gerrit.nordix.org/infra/test.git'
375 description: 'URL to clone the test repo from'
379 description: 'Test framework to use'
382 default: 'healthcheck'
383 description: 'Test suite to run'
395 - fix-workspace-permissions
398 - 'generate-ssh-keypair-macro'
399 - 'wait-pkg-mgr-macro'
400 - 'download-deploy-artifact-macro'
401 - 'xtesting-healthcheck-macro'