add-hugo-build #5

Merged
gec merged 18 commits from add-hugo-build into main 2024-03-15 12:02:22 +00:00
5 changed files with 5 additions and 4 deletions
Showing only changes of commit ebca7a3454 - Show all commits

View file

@ -1,8 +1,7 @@
#!/bin/bash #!/bin/bash
# TODO provide GITHOST
function generate-netrc-file() { function generate-netrc-file() {
echo "machine $GITHOST password $AUTHTOKEN" > ~/.netrc echo "machine $GIT_HOST password $AUTHTOKEN" > ~/.netrc
} }
function get-website-data() { function get-website-data() {

View file

@ -78,7 +78,6 @@
(-> unsorted-auth (-> unsorted-auth
(assoc-in [:websiteauths] sorted-auth)))) (assoc-in [:websiteauths] sorted-auth))))
; TODO: Replace this with a function that merges defaults into website config
(defn-spec flatten-and-reduce-config map? (defn-spec flatten-and-reduce-config map?
[config config?] [config config?]
(let (let

View file

@ -115,6 +115,7 @@
(-> (->
(yaml/load-as-edn "website/build-configmap.yaml") (yaml/load-as-edn "website/build-configmap.yaml")
(replace-all-matching-prefixes "NAME" name) (replace-all-matching-prefixes "NAME" name)
(cm/replace-all-matching-values-by-new-value "GITHOST" forgejo-host)
(cm/replace-all-matching-values-by-new-value "REPOURL" (generate-gitrepourl (cm/replace-all-matching-values-by-new-value "REPOURL" (generate-gitrepourl
forgejo-host forgejo-host
repo-user repo-user

View file

@ -6,5 +6,6 @@ metadata:
labels: labels:
app.kubernetes.part-of: NAME-website app.kubernetes.part-of: NAME-website
data: data:
GIT_HOST: GITHOST
GITREPOURL: REPOURL GITREPOURL: REPOURL
GITCOMMITURL: COMMITURL GITCOMMITURL: COMMITURL

View file

@ -236,7 +236,8 @@
:namespace "test-io", :namespace "test-io",
:labels {:app.kubernetes.part-of "test-io-website"}}, :labels {:app.kubernetes.part-of "test-io-website"}},
:data :data
{:GITREPOURL "https://mygit.de/api/v1/repos/someuser/repo/archive/main.zip" {:GIT_HOST "mygit.de"
:GITREPOURL "https://mygit.de/api/v1/repos/someuser/repo/archive/main.zip"
:GITCOMMITURL "https://mygit.de/api/v1/repos/someuser/repo/git/commits/HEAD"}} :GITCOMMITURL "https://mygit.de/api/v1/repos/someuser/repo/git/commits/HEAD"}}
(cut/generate-build-configmap {:issuer "staging" (cut/generate-build-configmap {:issuer "staging"
:build-cpu-request "500m" :build-cpu-request "500m"