From d045def4521d1eea6ffdc2e83d3f8d2864b9f34c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ji=C5=99=C3=AD=20Suchomel?= Date: Thu, 6 Jun 2019 17:15:17 +0200 Subject: [PATCH] Get password for shipyard user for special variable if it exists In case users have OS_PASSWORD set for a different cloud, it may have sense to use different variable just for shiyard user's password. Change-Id: I709df849e1109582917453c9fcec8bed565c2814 --- tools/run_shipyard.sh | 3 ++- tools/set_env | 3 ++- tools/shipyard.sh | 3 ++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/tools/run_shipyard.sh b/tools/run_shipyard.sh index 1647d4ce..9e891c3a 100755 --- a/tools/run_shipyard.sh +++ b/tools/run_shipyard.sh @@ -37,7 +37,8 @@ SHIPYARD_HOSTPATH=${SHIPYARD_HOSTPATH:-"/home/shipyard/host"} # set default value for OS_PASSWORD if it's not set # this doesn't actually get exported to environment # unless the script is sourced -export OS_PASSWORD=${OS_PASSWORD:-password} +OS_SHIPYARD_PASSWORD=${OS_SHIPYARD_PASSWORD:-${OS_PASSWORD}} +export OS_PASSWORD=${OS_SHIPYARD_PASSWORD:-password} # Execute Shipyard CLI # diff --git a/tools/set_env b/tools/set_env index e7532a07..5dd0fdb7 100755 --- a/tools/set_env +++ b/tools/set_env @@ -33,7 +33,8 @@ namespace="${namespace:-ucp}" export max_shipyard_count=${max_shipyard_count:-60} export shipyard_query_time=${shipyard_query_time:-90} export OS_AUTH_URL="${OS_AUTH_URL:-http://keystone.${namespace}.svc.cluster.local:80/v3}" -export OS_PASSWORD="${OS_PASSWORD:-password}" +OS_SHIPYARD_PASSWORD=${OS_SHIPYARD_PASSWORD:-${OS_PASSWORD}} +export OS_PASSWORD=${OS_SHIPYARD_PASSWORD:-password} export OS_PROJECT_DOMAIN_NAME="${OS_PROJECT_DOMAIN_NAME:-default}" export OS_PROJECT_NAME="${OS_PROJECT_NAME:-service}" export OS_USERNAME="${OS_USERNAME:-shipyard}" diff --git a/tools/shipyard.sh b/tools/shipyard.sh index 9ed8e1f6..abdcfef9 100755 --- a/tools/shipyard.sh +++ b/tools/shipyard.sh @@ -42,7 +42,8 @@ SHIPYARD_IMAGE="${SHIPYARD_IMAGE:-quay.io/airshipit/shipyard:master}" # set default value for OS_PASSWORD if it's not set # this doesn't actually get exported to environment # unless the script is sourced -export OS_PASSWORD=${OS_PASSWORD:-password} +OS_SHIPYARD_PASSWORD=${OS_SHIPYARD_PASSWORD:-${OS_PASSWORD}} +export OS_PASSWORD=${OS_SHIPYARD_PASSWORD:-password} # Define Base Docker Command base_docker_command=$(cat << EndOfCommand