From 11d12bc7d0cdda88abf124328b81205c0e438e76 Mon Sep 17 00:00:00 2001 From: erik Date: Fri, 9 Dec 2022 10:49:57 +0100 Subject: [PATCH] Set up correct test for build image --- .../c4k-website-build/image/resources/entrypoint.sh | 4 ++-- infrastructure/c4k-website-build/test/Dockerfile | 2 +- infrastructure/c4k-website-build/test/serverspec.edn | 7 +++---- 3 files changed, 6 insertions(+), 7 deletions(-) diff --git a/infrastructure/c4k-website-build/image/resources/entrypoint.sh b/infrastructure/c4k-website-build/image/resources/entrypoint.sh index 871a00d..f18d5bd 100755 --- a/infrastructure/c4k-website-build/image/resources/entrypoint.sh +++ b/infrastructure/c4k-website-build/image/resources/entrypoint.sh @@ -18,8 +18,8 @@ newHash=$( get-hash-data ) if [[ $currentHash == $newHash ]] then echo "Nothing to do" - else - write-hash-data $currentHash $hashfilename + else + echo $currentHash > $HASHFILEDIR/$hashfilename echo "Downloading website data" get-website-data $filename unzip-website-data $filename diff --git a/infrastructure/c4k-website-build/test/Dockerfile b/infrastructure/c4k-website-build/test/Dockerfile index 47c3702..41aadf5 100644 --- a/infrastructure/c4k-website-build/test/Dockerfile +++ b/infrastructure/c4k-website-build/test/Dockerfile @@ -1,4 +1,4 @@ -FROM clojure:lein +FROM c4k-website-build RUN apt update RUN apt -yqq --no-install-recommends --yes install curl default-jre-headless diff --git a/infrastructure/c4k-website-build/test/serverspec.edn b/infrastructure/c4k-website-build/test/serverspec.edn index 000622f..87038f9 100644 --- a/infrastructure/c4k-website-build/test/serverspec.edn +++ b/infrastructure/c4k-website-build/test/serverspec.edn @@ -1,5 +1,4 @@ -{:file [{:path "/usr/local/bin/install.sh" :mod "700"} +{:file [{:path "/entrypoint.sh" :mod "700"} {:path "/usr/local/bin/functions.sh" :mod "700"} - {:path "/usr/local/bin/exclude.pattern" :mod "700"} - {:path "/usr/local/bin/project.clj" :mod "700"} - {:path "/entrypoint.sh" :mod "700"}]} + {:path "/etc/exclude.pattern" :mod "700"} + {:path "/etc/lein/project.clj" :mod "700"}]}