X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=blobdiff_plain;ds=sidebyside;f=jjb%2Ffuel%2Ffuel-deploy-virtual.sh;h=e7c83b77f810e6f09364bb6298d080d12ca21bde;hb=d56c6ce19cfacaae2ebfdbb1a78d200b9944cadb;hp=626a65060ceaaac37dd017719294901aa68c3921;hpb=74810a83844602e82d4e5d70ac866b53fbdf5d3d;p=releng.git diff --git a/jjb/fuel/fuel-deploy-virtual.sh b/jjb/fuel/fuel-deploy-virtual.sh index 626a65060..e7c83b77f 100755 --- a/jjb/fuel/fuel-deploy-virtual.sh +++ b/jjb/fuel/fuel-deploy-virtual.sh @@ -9,20 +9,35 @@ source latest.properties # echo the info about artifact that is used during the deployment echo "Using $(echo $OPNFV_ARTIFACT_URL | cut -d'/' -f3) for deployment" +# checkout the commit that was used for building the downloaded artifact +# to make sure the ISO and deployment mechanism uses same versions +echo "Checking out $OPNFV_GIT_SHA1" +git checkout $OPNFV_GIT_SHA1 --quiet + # create TMPDIR if it doesn't exist export TMPDIR=$HOME/tmpdir -[[ -d $TMPDIR ]] || mkdir -p $TMPDIR +mkdir -p $TMPDIR # change permissions down to TMPDIR chmod a+x $HOME chmod a+x $TMPDIR +# get the lab name from SLAVE_NAME +# we currently support ericsson and intel labs +LAB_NAME=${NODE_NAME%%-*} +if [[ ! "$LAB_NAME" =~ (ericsson|intel) ]]; then + echo "Unsupported/unidentified lab $LAB_NAME. Cannot continue!" + exit 1 +else + echo "Using configuration for $LAB_NAME" +fi + # set CONFDIR, BRIDGE -CONFDIR=$WORKSPACE/deploy/templates/virtual_environment_noha/conf +CONFDIR=$WORKSPACE/deploy/templates/$LAB_NAME/virtual_environment/noha/conf BRIDGE=pxebr # log info to console -echo "Starting the deployment for a merged change using $INSTALLER. This could take some time..." +echo "Starting the deployment for a merged change using $INSTALLER_TYPE. This could take some time..." echo "--------------------------------------------------------" echo