summaryrefslogtreecommitdiffstats
path: root/ci
diff options
context:
space:
mode:
authorZhijiang Hu <hu.zhijiang@zte.com.cn>2017-09-24 22:11:05 -0400
committerZhijiang Hu <hu.zhijiang@zte.com.cn>2017-09-24 22:16:26 -0400
commit02e1f1c8ab3f3857ca2370f98575ccbf41f12a01 (patch)
tree2e7e98d4acc55661f0e647d4838b49edd0c7c08e /ci
parent8f655e59dbd5a5ed3ebb7de6e504503c84722fb2 (diff)
Support passing securelab dir as a optional param
Change-Id: I5caadb42b3890858e7642a5fd260392370dbbfc8 Signed-off-by: Zhijiang Hu <hu.zhijiang@zte.com.cn>
Diffstat (limited to 'ci')
-rwxr-xr-xci/deploy/deploy.sh14
1 files changed, 10 insertions, 4 deletions
diff --git a/ci/deploy/deploy.sh b/ci/deploy/deploy.sh
index b73c80f9..c89b17b7 100755
--- a/ci/deploy/deploy.sh
+++ b/ci/deploy/deploy.sh
@@ -26,6 +26,7 @@ OPTIONS:
-B PXE Bridge for booting Daisy Master, optional
-d Configuration yaml file of DHA, optional, will be deleted later
-D Dry-run, does not perform deployment, will be deleted later
+ -L Securelab repo dir
-l LAB name, necessary
-p POD name, necessary
-r Remote workspace in target server, optional
@@ -76,7 +77,7 @@ VALID_DEPLOY_SCENARIO=("os-nosdn-nofeature-noha" "os-nosdn-nofeature-ha" "os-odl
############################################################################
# BEGIN of main
#
-while getopts "b:B:Dd:n:l:p:r:w:s:Sh" OPTION
+while getopts "b:B:Dd:n:L:l:p:r:w:s:Sh" OPTION
do
case $OPTION in
b)
@@ -91,6 +92,9 @@ do
D)
DRY_RUN=1
;;
+ L)
+ SECURELABDIR=${OPTARG}
+ ;;
l)
LAB_NAME=${OPTARG}
;;
@@ -147,6 +151,8 @@ NETWORK=$REMOTE_SPACE/labs/$LAB_NAME/$POD_NAME/daisy/config/network.yml
# set temporay workdir
WORKDIR=${WORKDIR:-/tmp/workdir/daisy}
+SECURELABDIR=${SECURELABDIR:-./securedlab}
+
[[ $POD_NAME =~ (virtual) ]] && IS_BARE=0
# set extra ssh paramters
@@ -180,9 +186,9 @@ BMDEPLOY_DAISY_SERVER_VM=$WORKSPACE/templates/physical_environment/vms/daisy.xml
function update_dha_by_pdf()
{
- local pdf_yaml=securedlab/labs/$LAB_NAME/${POD_NAME}.yaml
- local jinja2_template=securedlab/installers/daisy/pod_config.yaml.j2
- local generate_config=securedlab/utils/generate_config.py
+ local pdf_yaml=${SECURELABDIR}/labs/$LAB_NAME/${POD_NAME}.yaml
+ local jinja2_template=${SECURELABDIR}/installers/daisy/pod_config.yaml.j2
+ local generate_config=${SECURELABDIR}/utils/generate_config.py
if [ ! -f ${generate_config} ] || [ ! -f ${pdf_yaml} ] || [ ! -f ${jinja2_template} ]; then
return
fi