X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=blobdiff_plain;f=jjb%2Farmband%2Farmband-deploy.sh;h=901f845bff133d90f957e44cc95f7bc7c7dd190c;hb=43826ac925baab281a77e76f917bcadb978c9a52;hp=97430c1146f38b7f4ec57d8cdd8692f3f3db56ef;hpb=1f713fa10a11d45db6444022f8872d3522e419da;p=releng.git diff --git a/jjb/armband/armband-deploy.sh b/jjb/armband/armband-deploy.sh index 97430c114..901f845bf 100755 --- a/jjb/armband/armband-deploy.sh +++ b/jjb/armband/armband-deploy.sh @@ -30,8 +30,7 @@ else fi # set deployment parameters -export TMPDIR=$HOME/tmpdir -BRIDGE=${DEFAULT_BRIDGE:-pxebr} +export TMPDIR=${WORKSPACE}/tmpdir LAB_NAME=${NODE_NAME/-*} POD_NAME=${NODE_NAME/*-} @@ -39,21 +38,25 @@ POD_NAME=${NODE_NAME/*-} if [[ ! $LAB_NAME =~ (arm|enea) ]]; then echo "Unsupported/unidentified lab $LAB_NAME. Cannot continue!" exit 1 -else - echo "Using configuration for $LAB_NAME" fi +echo "Using configuration for $LAB_NAME" + # create TMPDIR if it doesn't exist mkdir -p $TMPDIR cd $WORKSPACE -if [[ $LAB_CONFIG_URL =~ ^git:// ]]; then +if [[ $LAB_CONFIG_URL =~ ^(git|ssh):// ]]; then + echo "cloning $LAB_CONFIG_URL" git clone --quiet --branch ${GIT_BRANCH##origin/} $LAB_CONFIG_URL lab-config LAB_CONFIG_URL=file://${WORKSPACE}/lab-config fi +# releng wants us to use nothing else but opnfv.iso for now. We comply. +ISO_FILE=$WORKSPACE/opnfv.iso + # construct the command -DEPLOY_COMMAND="$WORKSPACE/ci/deploy.sh -b ${LAB_CONFIG_URL} -l $LAB_NAME -p $POD_NAME -s $DEPLOY_SCENARIO -i file://$WORKSPACE/opnfv.iso -H -B $BRIDGE -S $TMPDIR" +DEPLOY_COMMAND="$WORKSPACE/ci/deploy.sh -l $LAB_NAME -p $POD_NAME -b ${LAB_CONFIG_URL} -s $DEPLOY_SCENARIO -i file://${ISO_FILE} -H -B ${DEFAULT_BRIDGE:-pxebr} -S $TMPDIR" # log info to console echo "Deployment parameters" @@ -72,9 +75,6 @@ echo "Issuing command" echo "$DEPLOY_COMMAND" echo -# FIXME -export TARGET_LAB=${LAB_NAME} -export TARGET_POD=${POD_NAME} $DEPLOY_COMMAND echo