Use pharos repo in daisy master branch 61/49161/2
authorAlex Yang <yangyang1@zte.com.cn>
Mon, 18 Dec 2017 02:42:33 +0000 (10:42 +0800)
committerAlex Yang <yangyang1@zte.com.cn>
Wed, 3 Jan 2018 07:35:06 +0000 (15:35 +0800)
There are no PDFs in euphrates branch of pharos repo.
Securedlab is still used in euphrates branch. In master branch,
pharos repo will be used.

Change-Id: Ifbdeed26f938025aae56d2d263abf3d8620b31ba
Signed-off-by: Alex Yang <yangyang1@zte.com.cn>
jjb/daisy4nfv/daisy-deploy.sh

index 803ff5b..1723fd1 100755 (executable)
@@ -19,14 +19,22 @@ fi
 
 # clone the securedlab repo
 cd $WORKSPACE
-SECURELAB_DIR=/var/tmp/opnfv-securedlab
 
-echo "Cloning securedlab repo $BRANCH to $SECURELAB_DIR"
-rm -rf $SECURELAB_DIR
-git clone ssh://jenkins-zte@gerrit.opnfv.org:29418/securedlab --quiet \
-    --branch $BRANCH $SECURELAB_DIR
+# There are no PDFs in euphrates branch of pharos repo.
+if [[  "$BRANCH" =~ "euphrates" ]]; then
+    CONFIG_REPO_NAME=securedlab
+else
+    CONFIG_REPO_NAME=pharos
+fi
+
+LABS_DIR=/var/tmp/opnfv-${CONFIG_REPO_NAME}
+
+echo "Cloning ${CONFIG_REPO_NAME} repo $BRANCH to $LABS_DIR"
+rm -rf $LABS_DIR
+git clone ssh://jenkins-zte@gerrit.opnfv.org:29418/${CONFIG_REPO_NAME} \
+    --quiet --branch $BRANCH $LABS_DIR
 
-DEPLOY_COMMAND="sudo -E ./ci/deploy/deploy.sh -L $SECURELAB_DIR \
+DEPLOY_COMMAND="sudo -E ./ci/deploy/deploy.sh -L $LABS_DIR \
                 -l $LAB_NAME -p $POD_NAME -B $BRIDGE -s $DEPLOY_SCENARIO"
 
 # log info to console