summaryrefslogtreecommitdiffstats
path: root/ci/deploy.sh
diff options
context:
space:
mode:
Diffstat (limited to 'ci/deploy.sh')
-rwxr-xr-xci/deploy.sh35
1 files changed, 17 insertions, 18 deletions
diff --git a/ci/deploy.sh b/ci/deploy.sh
index 4d79ec8d..f92f5032 100755
--- a/ci/deploy.sh
+++ b/ci/deploy.sh
@@ -105,28 +105,25 @@ createresource() {
#copy the files and create extra resources needed for HA deployment
# in case of default VM labs.
deploy() {
-
+ if [ ! -f ./deployment.yaml ] && [ -e ~/.juju/deployment.yaml ]; then
+ cp ~/.juju/deployment.yaml ./deployment.yaml
+ elif [ ! -f ./deployment.yaml ] && [ -e ~/joid_config/deployment.yaml ]; then
+ cp ~/joid_config/deployment.yaml ./deployment.yaml
+ fi
+
+ if [[ "$jujuver" > "2" ]]; then
+ if [ ! -f ./labconfig.yaml ] && [ -e ~/joid_config/labconfig.yaml ]; then
+ cp ~/joid_config/labconfig.yaml ./labconfig.yaml
+ fi
+ if [ ! -f ./deployconfig.yaml ] && [ -e ~/joid_config/deployconfig.yaml ]; then
+ cp ~/joid_config/deployconfig.yaml ./deployconfig.yaml
+ fi
+ else
if [ ! -f ./environments.yaml ] && [ -e ~/.juju/environments.yaml ]; then
cp ~/.juju/environments.yaml ./environments.yaml
elif [ ! -f ./environments.yaml ] && [ -e ~/joid_config/environments.yaml ]; then
cp ~/joid_config/environments.yaml ./environments.yaml
fi
- if [ ! -f ./deployment.yaml ] && [ -e ~/.juju/deployment.yaml ]; then
- cp ~/.juju/deployment.yaml ./deployment.yaml
- elif [ ! -f ./deployment.yaml ] && [ -e ~/joid_config/deployment.yaml ]; then
- cp ~/joid_config/deployment.yaml ./deployment.yaml
- fi
- if [ ! -f ./labconfig.yaml ] && [ -e ~/.juju/labconfig.yaml ]; then
- cp ~/.juju/labconfig.yaml ./labconfig.yaml
- elif [ ! -f ./labconfig.yaml ] && [ -e ~/joid_config/labconfig.yaml ]; then
- cp ~/joid_config/labconfig.yaml ./labconfig.yaml
- fi
- if [ ! -f ./deployconfig.yaml ] && [ -e ~/.juju/deployconfig.yaml ]; then
- cp ~/.juju/deployconfig.yaml ./deployconfig.yaml
- elif [ ! -f ./deployconfig.yaml ] && [ -e ~/joid_config/deployconfig.yaml ]; then
- cp ~/joid_config/deployconfig.yaml ./deployconfig.yaml
- fi
-
#copy the script which needs to get deployed as part of ofnfv release
echo "...... deploying now ......"
echo " " >> environments.yaml
@@ -134,9 +131,11 @@ deploy() {
echo " enable-os-upgrade: false" >> environments.yaml
echo " admin-secret: admin" >> environments.yaml
echo " default-series: $opnfvdistro" >> environments.yaml
-
cp environments.yaml ~/.juju/
cp environments.yaml ~/joid_config/
+ fi
+
+
if [[ "$opnfvtype" = "ha" && "$opnfvlab" = "default" ]]; then
createresource