added git host as env var

pull/5/head
Clemens 2 months ago
parent 548dd14091
commit ebca7a3454

@ -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() {

@ -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

@ -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

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

@ -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"

Loading…
Cancel
Save