add-hugo-build #5
5 changed files with 5 additions and 4 deletions
|
@ -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() {
|
||||||
|
|
|
@ -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
|
||||||
|
|
|
@ -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
|
||||||
|
|
|
@ -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
|
|
@ -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"
|
||||||
|
|
Loading…
Reference in a new issue