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
226 execution-type: SEQUENTIALLY
228 - name: 'onap-release-{environment-type}-xtesting-infra-healthcheck-{distro}-{cloud}-{type}-{stream}'
229 current-parameters: true
231 node-parameters: true
232 kill-phase-on: FAILURE
234 - name: 'onap-release-{environment-type}-xtesting-healthcheck-{distro}-{cloud}-{type}-{stream}'
235 current-parameters: true
237 node-parameters: true
238 kill-phase-on: FAILURE
251 - 'wait-pkg-mgr-macro'
252 - 'delete-stack-macro'
255 name: 'onap-release-{environment-type}-deploy-{distro}-{cloud}-{type}-{stream}'
257 disabled: '{obj:disabled}'
271 - credentials-binding:
273 credential-id: '{openrc-credentials-file}'
274 variable: OPENRC_FILE
275 - username-password-separated:
276 credential-id: 'nordix-cicd-arm-credentials'
277 username: NORDIX_ARM_USERNAME
278 password: NORDIX_ARM_TOKEN
280 - fix-workspace-permissions
283 - 'generate-ssh-keypair-macro'
284 - 'wait-pkg-mgr-macro'
285 - 'download-deploy-artifact-macro'
289 name: 'onap-release-{environment-type}-deployk8s-{distro}-{cloud}-{type}-{stream}'
291 disabled: '{obj:disabled}'
304 - credentials-binding:
306 credential-id: '{openrc-credentials-file}'
307 variable: OPENRC_FILE
308 - username-password-separated:
309 credential-id: 'nordix-cicd-arm-credentials'
310 username: NORDIX_ARM_USERNAME
311 password: NORDIX_ARM_TOKEN
313 - fix-workspace-permissions
316 - 'generate-ssh-keypair-macro'
317 - 'wait-pkg-mgr-macro'
318 - 'download-deploy-artifact-macro'
322 name: 'onap-release-{environment-type}-xtesting-infra-healthcheck-{distro}-{cloud}-{type}-{stream}'
324 disabled: '{obj:disabled}'
329 default: '{execution-mode}'
330 description: 'Execution mode'
333 default: 'https://gerrit.nordix.org/infra/test.git'
334 description: 'URL to clone the test repo from'
338 description: 'Test framework to use'
341 default: 'infra-healthcheck'
342 description: 'Test suite to run'
355 - fix-workspace-permissions
358 - 'generate-ssh-keypair-macro'
359 - 'wait-pkg-mgr-macro'
360 - 'download-xtesting-artifact-macro'
361 - 'xtesting-infra-healthcheck-macro'
364 name: 'onap-release-{environment-type}-xtesting-healthcheck-{distro}-{cloud}-{type}-{stream}'
366 disabled: '{obj:disabled}'
371 default: '{execution-mode}'
372 description: 'Execution mode'
375 default: 'https://gerrit.nordix.org/infra/test.git'
376 description: 'URL to clone the test repo from'
380 description: 'Test framework to use'
383 default: 'healthcheck'
384 description: 'Test suite to run'
396 - fix-workspace-permissions
399 - 'xtesting-healthcheck-macro'