# 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=${{SLAVE_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
description: 'Slave name on Jenkins'
allowed-slaves:
- intel-us-deploy-virtual-1
-# ericsson slave has been excluded until the issues are identified and solved
-# - ericsson-ca-deploy-virtual-1
+ - ericsson-ca-deploy-virtual-1
default-slaves:
- intel-us-deploy-virtual-1
-# ericsson slave has been excluded until the issues are identified and solved
-# - ericsson-ca-deploy-virtual-1
+ - ericsson-ca-deploy-virtual-1
- string:
name: GIT_BASE
default: https://gerrit.opnfv.org/gerrit/$PROJECT