summaryrefslogtreecommitdiffstats
path: root/ci
diff options
context:
space:
mode:
authorZhijiang Hu <hu.zhijiang@zte.com.cn>2017-08-02 09:02:41 +0000
committerGerrit Code Review <gerrit@opnfv.org>2017-08-02 09:02:41 +0000
commit989c92844cf3bc1a1f357277e1f90b72521ce731 (patch)
treebb9de68692cb9efce573690fe2598b67e1b915cd /ci
parentc91f763177b26dc05be4ccc8536f4cd76296d983 (diff)
parent48ec887dcf6d7e37d2bebece3bda357a7752dec2 (diff)
Merge "use template to replace duplicate xml file"
Diffstat (limited to 'ci')
-rwxr-xr-xci/deploy/deploy.sh9
1 files changed, 8 insertions, 1 deletions
diff --git a/ci/deploy/deploy.sh b/ci/deploy/deploy.sh
index 8dbda717..e4a3851b 100755
--- a/ci/deploy/deploy.sh
+++ b/ci/deploy/deploy.sh
@@ -157,8 +157,15 @@ VMDEPLOY_DAISY_SERVER_VM=$WORKSPACE/templates/virtual_environment/vms/daisy.xml
VMDEPLOY_TARGET_NODE_VM=$WORKSPACE/templates/virtual_environment/vms/all_in_one.xml
VMDEPLOY_NODE=[]
-for ((i=0;i<${#VM_MULTINODE[@]};i++));do
+for ((i=0; i < ${#VM_MULTINODE[@]}; i++)); do
+ if [[ ${VM_MULTINODE[$i]} == *controller* ]]; then
+ nodename_prefix="controller"
+ else
+ nodename_prefix="computer"
+ fi
VMDEPLOY_NODE[$i]=$WORKSPACE/templates/virtual_environment/vms/${VM_MULTINODE[$i]}.xml
+ cp $WORKSPACE/templates/virtual_environment/vms/${nodename_prefix}.xml ${VMDEPLOY_NODE[$i]}
+ sed -i "s/nodename/${VM_MULTINODE[$i]}/g" ${VMDEPLOY_NODE[$i]}
echo ${VMDEPLOY_NODE[$i]}
done