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-sdc-nofeature'
33 deploy-scenario: 'onap-sdc-nofeature'
37 deploy-scenario: 'onap-sdc-nofeature'
42 execution-mode: offline-deployment
43 # just deploy phase for now and ONAP testing isn't defined yet
50 provisioner-type: 'heat'
51 slave-type: 'jumphost'
52 gated-projects: 'infra/stack/onap|infra/installer/oom'
53 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"
54 idf: "https://gerrit.nordix.org/gitweb?p=infra/provisioner/heat.git;a=blob_plain;f=playbooks/roles/create-stack/files/heat-idf.yaml"
61 openrc-credentials-file: 'est-jenkins-openrcfile-city-frankfurt-cicd'
63 - 'onap-release-{environment-type}-deploy-test-{distro}-{cloud}-{type}-{stream}'
64 - 'onap-release-{environment-type}-deploy-{distro}-{cloud}-{type}-{stream}'
65 - 'onap-release-{environment-type}-deployk8s-{distro}-{cloud}-{type}-{stream}'
68 name: 'onap-release-{environment-type}-deploy-test-{distro}-{cloud}-{type}-{stream}'
70 project-type: multijob
72 disabled: '{obj:disabled}'
79 default: '{deploy-scenario}'
80 description: 'Scenario to test change with.'
83 default: '{k8s-version}'
84 description: 'K8S version to use for this deployment'
87 default: /tmp/inventory.ini
88 description: 'Location of the inventory file. Copied from k8s install'
92 description: 'Distribution to use for configuring target nodes (networking etc.)'
95 default: 'engine-{slave-type}-{environment-type}-{distro}-fra'
96 description: 'Slave label to schedule this job on.'
100 description: 'Hardware type - could be virtual, cloud, or baremetal'
103 default: '{execution-mode}'
104 description: 'Execution mode to run in'
108 description: 'PDF file to use for deployment'
112 description: 'IDF file to use for deployment'
114 name: HEAT_STACK_NAME
115 default: "nordix-cicd-verify-onap-{environment-type}-{distro}-{stream}"
116 description: 'Name of the created stack'
119 default: "keypair-nordix-cicd-verify-onap-{environment-type}-{distro}-{stream}"
120 description: 'Name of the created keypair'
122 name: USE_PREBUILT_DEPLOYMENT_IMAGE
124 description: 'Use prebuilt deployment image while running as part of CI/CD'
127 default: 'https://gerrit.nordix.org/infra/test.git'
128 description: 'URL to clone the test repo from'
132 description: 'Test framework to use'
135 default: 'healthcheck'
136 description: 'Test suite to run'
138 name: YARDSTICK_DISPATCHER
140 description: 'Dispatcher to use for Yardstick reporting'
144 description: 'Delete the stack upon completion of the build'
148 description: 'Verbosity setting for the engine - true or false - default is false'
152 description: 'CI loop the job belongs to'
153 - project-parameters:
154 project: $GERRIT_PROJECT
156 description: 'The project and branch which the change is proposed for'
157 - nordix-gerrit-parameters
161 # NOTE (fdegir): throttle categories are controlled in jenkins global configuration
168 - engine-verify-deploy-test
172 url: https://gerrit.nordix.org/infra/engine.git
180 - credentials-binding:
182 credential-id: '{openrc-credentials-file}'
183 variable: OPENRC_FILE
184 - username-password-separated:
185 credential-id: 'nordix-cicd-arm-credentials'
186 username: NORDIX_ARM_USERNAME
187 password: NORDIX_ARM_TOKEN
196 sudo chown -R $USER:$USER $WORKSPACE || exit 1
197 # offline nodes can not resolve Nordix Artifactory and Gerrit
198 if [[ "$EXECUTION_MODE" == "offline-deployment" ]]; then
199 echo "Info : Offline deployment. Adding City OpenStack Endpoint, Nordix Artifactory and Gerrit Public IP to /etc/hosts"
200 sudo sed -i 's/^search/# search/' /etc/resolv.conf
201 sudo bash -c "cat << EOF >> /etc/hosts
203 91.106.198.25 artifactory.nordix.org
204 91.106.198.142 gerrit.nordix.org
205 86.107.242.50 fra1.citycloud.com
208 # we need to get rid of search domain as well
209 sudo sed -i 's/^search/# search/' /etc/resolv.conf
213 - 'generate-release-metadata-macro'
214 - 'generate-k8sdeployment-environment-macro'
216 name: "{environment-type} deployment on {type} instances"
217 condition: SUCCESSFUL
218 execution-type: SEQUENTIALLY
220 - name: 'onap-release-{environment-type}-deployk8s-{distro}-{cloud}-{type}-{stream}'
221 current-parameters: true
223 node-parameters: true
224 kill-phase-on: FAILURE
226 property-file: $WORKSPACE/k8s.properties
227 - name: 'onap-release-{environment-type}-deploy-{distro}-{cloud}-{type}-{stream}'
228 current-parameters: true
230 node-parameters: true
231 kill-phase-on: FAILURE
233 property-file: $WORKSPACE/release.properties
245 - 'wait-pkg-mgr-macro'
246 - 'delete-stack-macro'
249 name: 'onap-release-{environment-type}-deploy-{distro}-{cloud}-{type}-{stream}'
251 disabled: '{obj:disabled}'
265 - credentials-binding:
267 credential-id: '{openrc-credentials-file}'
268 variable: OPENRC_FILE
269 - username-password-separated:
270 credential-id: 'nordix-cicd-arm-credentials'
271 username: NORDIX_ARM_USERNAME
272 password: NORDIX_ARM_TOKEN
274 - fix-workspace-permissions
277 - 'generate-ssh-keypair-macro'
278 - 'wait-pkg-mgr-macro'
279 - 'download-deploy-artifact-macro'
283 name: 'onap-release-{environment-type}-deployk8s-{distro}-{cloud}-{type}-{stream}'
285 disabled: '{obj:disabled}'
298 - credentials-binding:
300 credential-id: '{openrc-credentials-file}'
301 variable: OPENRC_FILE
302 - username-password-separated:
303 credential-id: 'nordix-cicd-arm-credentials'
304 username: NORDIX_ARM_USERNAME
305 password: NORDIX_ARM_TOKEN
307 - fix-workspace-permissions
310 - 'generate-ssh-keypair-macro'
311 - 'wait-pkg-mgr-macro'
312 - 'download-deploy-artifact-macro'