summaryrefslogtreecommitdiffstats
path: root/jjb/daisy4nfv/daisy-deploy.sh
diff options
context:
space:
mode:
authorJulien <zhang.jun3g@zte.com.cn>2017-02-12 01:28:35 +0800
committerAric Gardner <agardner@linuxfoundation.org>2017-02-17 19:08:12 +0000
commit29e6f295e3fb59f775c616977f7e104db508499c (patch)
tree0f4e373aa624e016fdb35e16f90e1a864d01e81f /jjb/daisy4nfv/daisy-deploy.sh
parent07764a378e72107e57c415a7c7a099d9469acf02 (diff)
Use securedlab for daisy configuration
pass configuration path, lab and pod info JIRA:DAISY-40 Change-Id: I0f5dc1427cc33478bdecb8cf9c5f493b90993b7e Signed-off-by: Julien <zhang.jun3g@zte.com.cn>
Diffstat (limited to 'jjb/daisy4nfv/daisy-deploy.sh')
-rwxr-xr-xjjb/daisy4nfv/daisy-deploy.sh60
1 files changed, 60 insertions, 0 deletions
diff --git a/jjb/daisy4nfv/daisy-deploy.sh b/jjb/daisy4nfv/daisy-deploy.sh
new file mode 100755
index 000000000..b303c2c05
--- /dev/null
+++ b/jjb/daisy4nfv/daisy-deploy.sh
@@ -0,0 +1,60 @@
+#!/bin/bash
+set -o nounset
+set -o pipefail
+
+echo "--------------------------------------------------------"
+echo "This is $INSTALLER_TYPE deploy job!"
+echo "--------------------------------------------------------"
+
+DEPLOY_SCENARIO=${DEPLOY_SCENARIO:-"os-nosdn-nofeature-ha"}
+BRIDGE=${BRIDGE:-pxebr}
+LAB_NAME=${NODE_NAME/-*}
+POD_NAME=${NODE_NAME/*-}
+deploy_ret=0
+
+if [[ ! "$NODE_NAME" =~ "-virtual" ]] && [[ ! "$LAB_NAME" =~ (zte) ]]; then
+ echo "Unsupported lab $LAB_NAME for now, Cannot continue!"
+ exit $deploy_ret
+fi
+
+# clone the securedlab repo
+cd $WORKSPACE
+BASE_DIR=$(cd ./;pwd)
+
+echo "Cloning securedlab repo $BRANCH"
+git clone ssh://jenkins-ericsson@gerrit.opnfv.org:29418/securedlab --quiet \
+ --branch $BRANCH
+
+DEPLOY_COMMAND="sudo ./ci/deploy/deploy.sh -b $BASE_DIR \
+ -l $LAB_NAME -p $POD_NAME -B $BRIDGE"
+
+# log info to console
+echo """
+Deployment parameters
+--------------------------------------------------------
+Scenario: $DEPLOY_SCENARIO
+LAB: $LAB_NAME
+POD: $POD_NAME
+BRIDGE: $BRIDGE
+BASE_DIR: $BASE_DIR
+
+Starting the deployment using $INSTALLER_TYPE. This could take some time...
+--------------------------------------------------------
+Issuing command
+$DEPLOY_COMMAND
+"""
+
+# start the deployment
+#$DEPLOY_COMMAND
+
+if [ $? -ne 0 ]; then
+ echo
+ echo "Depolyment failed!"
+ deploy_ret=1
+else
+ echo
+ echo "--------------------------------------------------------"
+ echo "Deployment done!"
+fi
+
+exit $deploy_ret