[Skip-CI] Add test for hashfile-vol
Add resource file for cljs. Formatting in entrypoint.sh
This commit is contained in:
parent
9e18e99d0e
commit
cb06b081ba
3 changed files with 19 additions and 13 deletions
|
@ -14,18 +14,6 @@ source /usr/local/bin/functions.sh
|
|||
filename="website.zip"
|
||||
hashfilename="hashfile"
|
||||
|
||||
# download website data
|
||||
# create empty hashfile
|
||||
# compare current hash to hashfile
|
||||
# same?
|
||||
# do nothing
|
||||
# not same?
|
||||
# overwrite hashfile with new hash
|
||||
# unzip website
|
||||
# execute scripts (if applicable)
|
||||
# build website
|
||||
# move files
|
||||
|
||||
echo "Downloading website data"
|
||||
get-website-data $filename
|
||||
|
||||
|
|
|
@ -139,6 +139,7 @@
|
|||
"website/website-build-cron.yaml" (rc/inline "website/website-build-cron.yaml")
|
||||
"website/website-build-secret.yaml" (rc/inline "website/website-build-secret.yaml")
|
||||
"website/website-content-volume.yaml" (rc/inline "website/website-content-volume.yaml")
|
||||
"website/hashfile-volume.yaml" (rc/inline "website/hashfile-volume.yaml")
|
||||
(throw (js/Error. "Undefined Resource!")))))
|
||||
|
||||
(defn-spec generate-website-ingress pred/map-or-seq?
|
||||
|
@ -187,7 +188,7 @@
|
|||
|
||||
(defn-spec generate-hashfile-volume pred/map-or-seq?
|
||||
[config flattened-and-reduced-config?]
|
||||
(replace-common-data "website/website-content-volume.yaml" config))
|
||||
(replace-common-data "website/hashfile-volume.yaml" config))
|
||||
|
||||
(defn-spec generate-website-build-cron pred/map-or-seq?
|
||||
[config flattened-and-reduced-config?]
|
||||
|
|
|
@ -12,6 +12,7 @@
|
|||
(st/instrument `cut/generate-nginx-deployment)
|
||||
(st/instrument `cut/generate-nginx-service)
|
||||
(st/instrument `cut/generate-website-content-volume)
|
||||
(st/instrument `cut/generate-hashfile-volume)
|
||||
(st/instrument `cut/generate-website-ingress)
|
||||
(st/instrument `cut/generate-website-certificate)
|
||||
(st/instrument `cut/generate-website-build-cron)
|
||||
|
@ -259,3 +260,19 @@
|
|||
:fqdns ["test.de" "www.test.de" "test-it.de" "www.test-it.de"]
|
||||
:username "someuser"
|
||||
:authtoken "abedjgbasdodj"})))))
|
||||
|
||||
(deftest should-generate-hashfile-volume
|
||||
(is (= {:apiVersion "v1",
|
||||
:kind "PersistentVolumeClaim",
|
||||
:metadata
|
||||
{:name "test-io-hashfile-volume",
|
||||
:namespace "default",
|
||||
:labels {:app "test-io-nginx", :app.kubernetes.part-of "test-io-website"}},
|
||||
:spec {:storageClassName "local-path", :accessModes ["ReadWriteOnce"], :resources {:requests {:storage "16Mi"}}}}
|
||||
(cut/generate-hashfile-volume {:unique-name "test.io",
|
||||
:gitea-host "gitea.evilorg",
|
||||
:gitea-repo "none",
|
||||
:branchname "mablain",
|
||||
:fqdns ["test.de" "www.test.de" "test-it.de" "www.test-it.de"]
|
||||
:username "someuser"
|
||||
:authtoken "abedjgbasdodj"}))))
|
||||
|
|
Loading…
Reference in a new issue