From 0e84d0973ae04aa8cbb9c516a1a5de495f2fb5d5 Mon Sep 17 00:00:00 2001 From: kobi-lemberg Date: Mon, 23 Mar 2020 13:12:07 +0200 Subject: [PATCH] Fix creds --- entrypoint.sh | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/entrypoint.sh b/entrypoint.sh index ba2be7b..9d2268a 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -2,7 +2,9 @@ set -x COMMAND=$1 -IVY_CONF=$2 +IVY_CONF=$(echo $2 | base64 -d) +echo "Printing IVY conf" +echo $IVY_CONF if [[ -z "${3}" || -z "${4}" || -z "${5}" ]]; then echo "One or more variables are not defined, will only run command" else @@ -16,10 +18,11 @@ fi mkdir ~/.ivy2/ || echo "Ivy folder is exists" mkdir /root/.ivy2/ || echo "Ivy folder is exists" -echo ${IVY_CONF} > ~/.ivy2/credentials || echo "Couldn't write ivy into ~/.ivy2/credentials" +echo ${IVY_CONF} > ${HOME}/.ivy2/credentials || echo "Couldn't write ivy into ~/.ivy2/credentials" echo ${IVY_CONF} > /root/.ivy2/credentials || sudo echo ${IVY_CONF} > /root/.ivy2/credentials || echo "Couldn't write ivy into /root/.ivy2/credentials" -echo $(cat ~/.ivy2/credentials) || echo "~/.ivy2/credentials not found" +echo $(cat ${HOME}/.ivy2/credentials) || echo "~/.ivy2/credentials not found" echo $(cat /root/.ivy2/credentials) || echo "/root/.ivy2/credentials" echo "Running command" ${COMMAND} +11.0.5-1.3.8-DOCKER-IVY-CREDS8 \ No newline at end of file