2 # SPDX-license-identifier: Apache-2.0
3 ##############################################################################
4 # Copyright (c) 2019 Enea Software AB and others.
5 # All rights reserved. This program and the accompanying materials
6 # are made available under the terms of the Apache License, Version 2.0
7 # which accompanies this distribution, and is available at
8 # http://www.apache.org/licenses/LICENSE-2.0
9 ##############################################################################
14 # set deployment parameters
15 export TMPDIR=${HOME}/tmpdir
16 if [ "$(uname -m)" = 'aarch64' ]; then
18 # shellcheck disable=SC2153
19 POD_NAME=${NODE_NAME/*ubuntu1604-dev-48c-256g-/virtual}
21 echo "Unavailable hardware. Cannot continue!"
25 echo "Using configuration for ${LAB_NAME}"
27 # create TMPDIR if it doesn't exist, change permissions
29 sudo chmod a+x "${HOME}" "${TMPDIR}"
31 cd "${WORKSPACE}" || exit 1
34 # shellcheck disable=SC2153
35 FUEL_LOG_FILENAME="${JOB_NAME}_${BUILD_NUMBER}.log.tar.gz"
38 [ "${CI_DEBUG,,}" == 'true' ] && EXTRA_ARGS="-D ${EXTRA_ARGS:-}"
40 # construct the command
41 git clone https://github.com/opnfv/fuel.git
43 DEPLOY_COMMAND="fuel/ci/deploy.sh \
44 -l ${LAB_NAME} -p ${POD_NAME} -s ${DEPLOY_SCENARIO} \
45 -S ${TMPDIR} ${EXTRA_ARGS:-} \
46 -b file://${WORKSPACE}/ci
47 -L ${WORKSPACE}/${FUEL_LOG_FILENAME}"
50 echo "Deployment parameters"
51 echo "--------------------------------------------------------"
52 echo "Scenario: ${DEPLOY_SCENARIO}"
53 echo "Lab: ${LAB_NAME}"
54 echo "POD: ${POD_NAME}"
56 echo "Starting the deployment using Fuel. This could take some time..."
57 echo "--------------------------------------------------------"
60 # start the deployment
61 echo "Issuing command"
62 echo "${DEPLOY_COMMAND}"
68 echo "--------------------------------------------------------"
69 echo "Deployment is done!"
71 if [ "${exit_code}" -ne 0 ]; then
72 echo "Deployment failed!"
76 echo "Deployment is successful!"