X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=blobdiff_plain;f=jjb%2Ffuel%2Ffuel-deploy.sh;h=aa7b3bbb6b237af8d707cf1c9b3b8ae991f5878a;hb=c04f88ca91b7612c70bcae9c8a70a98d5bd46c6e;hp=9d71f0833ddb636902c5ab46f66cc481b60881a1;hpb=22ab9accbd34c8e5167b4a92510bee82c0cde630;p=releng.git diff --git a/jjb/fuel/fuel-deploy.sh b/jjb/fuel/fuel-deploy.sh index 9d71f0833..aa7b3bbb6 100755 --- a/jjb/fuel/fuel-deploy.sh +++ b/jjb/fuel/fuel-deploy.sh @@ -19,38 +19,34 @@ LAB_NAME=${NODE_NAME/-*} # shellcheck disable=SC2153 POD_NAME=${NODE_NAME/*-} -# Fuel requires deploy script to be ran with sudo, Armband does not -SUDO='sudo -E' -if [ "${PROJECT}" = 'fuel' ]; then - # Fuel currently supports ericsson, intel, lf and zte labs - if [[ ! "${LAB_NAME}" =~ (arm|enea|ericsson|intel|lf|unh|zte) ]]; then - echo "Unsupported/unidentified lab ${LAB_NAME}. Cannot continue!" - exit 1 - fi -else - SUDO= - # Armband currently supports arm, enea, unh labs - if [[ ! "${LAB_NAME}" =~ (arm|enea|unh) ]]; then - echo "Unsupported/unidentified lab ${LAB_NAME}. Cannot continue!" - exit 1 - fi +# Fuel currently supports arm, enea, ericsson, intel, lf, unh and zte labs +if [[ ! "${LAB_NAME}" =~ (arm|enea|ericsson|intel|lf|unh|zte) ]]; then + echo "Unsupported/unidentified lab ${LAB_NAME}. Cannot continue!" + exit 1 fi echo "Using configuration for ${LAB_NAME}" +# Certain labs do not require the deploy script to be ran with sudo +SUDO='sudo -E' +[[ ! "${LAB_NAME}" =~ (arm|enea|unh) ]] || SUDO= + # create TMPDIR if it doesn't exist, change permissions mkdir -p "${TMPDIR}" -chmod a+x "${HOME}" "${TMPDIR}" +sudo chmod a+x "${HOME}" "${TMPDIR}" cd "${WORKSPACE}" || exit 1 # log file name FUEL_LOG_FILENAME="${JOB_NAME}_${BUILD_NUMBER}.log.tar.gz" +# Limited scope for vPOD verify jobs running on armband-virtual +[[ ! "${JOB_NAME}" =~ verify-deploy-virtual-arm64 ]] || EXTRA_ARGS='-e' + # construct the command DEPLOY_COMMAND="${SUDO} ${WORKSPACE}/ci/deploy.sh \ -l ${LAB_NAME} -p ${POD_NAME} -s ${DEPLOY_SCENARIO} \ - -S ${TMPDIR} \ + -S ${TMPDIR} ${EXTRA_ARGS:-} \ -L ${WORKSPACE}/${FUEL_LOG_FILENAME}" # log info to console