Enable fuel virtual deploys on Ericsson blade 81/5681/6
authorFatih Degirmenci <fatih.degirmenci@ericsson.com>
Wed, 6 Jan 2016 21:00:20 +0000 (22:00 +0100)
committerFatih Degirmenci <fatih.degirmenci@ericsson.com>
Thu, 7 Jan 2016 08:47:55 +0000 (08:47 +0000)
Change-Id: I6ea07728a9ab467ea01fdb6b0c45de16bf10ab1b
Signed-off-by: Fatih Degirmenci <fatih.degirmenci@ericsson.com>
jjb/fuel/fuel-deploy-virtual.sh
jjb/opnfv/slave-params.yml

index 1b64435..7c25812 100755 (executable)
@@ -11,14 +11,24 @@ echo "Using $(echo $OPNFV_ARTIFACT_URL | cut -d'/' -f3) for deployment"
 
 # 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
index 576f605..43edcc2 100644 (file)
             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