diff --git a/infrastructure/build/image/resources/entrypoint.sh b/infrastructure/build/image/resources/entrypoint.sh index 05c3610..485a546 100755 --- a/infrastructure/build/image/resources/entrypoint.sh +++ b/infrastructure/build/image/resources/entrypoint.sh @@ -20,6 +20,8 @@ if [[ $currentHash == $newHash ]] echo "Nothing to do" else echo $currentHash > $HASHFILEDIR/$hashfilename + echo "Generate .netrc file" + generate-netrc-file echo "Downloading website data" get-website-data $filename unzip-website-data $filename diff --git a/infrastructure/build/image/resources/functions.sh b/infrastructure/build/image/resources/functions.sh index d105f6a..af2e7f5 100644 --- a/infrastructure/build/image/resources/functions.sh +++ b/infrastructure/build/image/resources/functions.sh @@ -1,5 +1,10 @@ #!/bin/bash +# TODO provide GITHOST +function generate-netrc-file() { + echo "machine $GITHOST password $AUTHTOKEN" > ~/.netrc +} + function get-website-data() { curl -H "Authorization: token $AUTHTOKEN" -o $SOURCEDIR/$1 $GITREPOURL } diff --git a/infrastructure/build/image/resources/install.sh b/infrastructure/build/image/resources/install.sh index 79a1c59..7616996 100755 --- a/infrastructure/build/image/resources/install.sh +++ b/infrastructure/build/image/resources/install.sh @@ -6,7 +6,7 @@ function main() { { upgradeSystem - apt-get install -qqy unzip rsync jq imagemagick curl + apt-get install -qqy unzip rsync jq imagemagick curl hugo install -d /etc/lein/ install -m 0700 /tmp/entrypoint.sh /