Skip to content

Commit

Permalink
Fix creds
Browse files Browse the repository at this point in the history
  • Loading branch information
kobi-lemberg committed Mar 23, 2020
1 parent 5640ccb commit 0e84d09
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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

0 comments on commit 0e84d09

Please sign in to comment.