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
# TODO provide GITHOST
function generate-netrc-file() {
echo "machine $GITHOST password $AUTHTOKEN" > ~/.netrc
echo "machine $GIT_HOST password $AUTHTOKEN" > ~/.netrc
}
function get-website-data() {

View file

@ -78,7 +78,6 @@
(-> unsorted-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?
[config config?]
(let

View file

@ -115,6 +115,7 @@
(->
(yaml/load-as-edn "website/build-configmap.yaml")
(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
forgejo-host
repo-user

View file

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

View file

@ -236,7 +236,8 @@
:namespace "test-io",
:labels {:app.kubernetes.part-of "test-io-website"}},
: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"}}
(cut/generate-build-configmap {:issuer "staging"
:build-cpu-request "500m"