X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=blobdiff_plain;f=jjb%2Farmband%2Farmband-deploy.sh;h=4df9acfd837229caeca442afa8a0bfd1348ee3a8;hb=refs%2Fchanges%2F93%2F25193%2F1;hp=4041a6b1474bf0a1f8d11b0a8b76e72dd3b52b1e;hpb=9c2378d22524f96cd63454fa17ad8fc93ddf8bd9;p=releng.git diff --git a/jjb/armband/armband-deploy.sh b/jjb/armband/armband-deploy.sh index 4041a6b14..4df9acfd8 100755 --- a/jjb/armband/armband-deploy.sh +++ b/jjb/armband/armband-deploy.sh @@ -12,6 +12,8 @@ set -o errexit set -o nounset set -o pipefail +export TERM="vt220" + # source the file so we get OPNFV vars source latest.properties @@ -47,7 +49,7 @@ mkdir -p $TMPDIR cd $WORKSPACE if [[ $LAB_CONFIG_URL =~ ^(git|ssh):// ]]; then - echo "cloning $LAB_CONFIG_URL" + echo "Cloning securedlab repo ${GIT_BRANCH##origin/}" git clone --quiet --branch ${GIT_BRANCH##origin/} $LAB_CONFIG_URL lab-config LAB_CONFIG_URL=file://${WORKSPACE}/lab-config @@ -59,16 +61,33 @@ if [[ $LAB_CONFIG_URL =~ ^(git|ssh):// ]]; then fi fi +if [[ "$NODE_NAME" =~ "virtual" ]]; then + POD_NAME="virtual_kvm" +fi + # releng wants us to use nothing else but opnfv.iso for now. We comply. ISO_FILE=$WORKSPACE/opnfv.iso # log file name FUEL_LOG_FILENAME="${JOB_NAME}_${BUILD_NUMBER}.log.tar.gz" +# Deploy Cache (to enable just create the deploy-cache subdir) +# NOTE: Only available when ISO files are cached using ISOSTORE mechanism +DEPLOY_CACHE=${ISOSTORE:-/iso_mount/opnfv_ci}/${GIT_BRANCH##*/}/deploy-cache +if [[ -d "${DEPLOY_CACHE}" ]]; then + echo "Deploy cache dir present." + echo "--------------------------------------------------------" + echo "Fuel@OPNFV deploy cache: ${DEPLOY_CACHE}" + DEPLOY_CACHE="-C ${DEPLOY_CACHE}" +else + DEPLOY_CACHE="" +fi + # construct the command DEPLOY_COMMAND="$WORKSPACE/ci/deploy.sh -b ${LAB_CONFIG_URL} \ -l $LAB_NAME -p $POD_NAME -s $DEPLOY_SCENARIO -i file://${ISO_FILE} \ - -H -B ${DEFAULT_BRIDGE:-pxebr} -S $TMPDIR -L $WORKSPACE/$FUEL_LOG_FILENAME" + -H -B ${DEFAULT_BRIDGE:-pxebr} -S $TMPDIR -L $WORKSPACE/$FUEL_LOG_FILENAME \ + ${DEPLOY_CACHE}" # log info to console echo "Deployment parameters"