From 823d8a368ce7bf17cf4dc8bd7b2e9e8992e30d1d Mon Sep 17 00:00:00 2001 From: garciadeblas Date: Tue, 8 Jul 2025 10:41:53 +0200 Subject: [PATCH] Update git env variables to add GIT_BASE_HTTP_URL and GIT_BASE_USERNAME Change-Id: Ia1f89c7680163fbd71ecbd5c4ce6992e880cc207 Signed-off-by: garciadeblas --- installers/40-deploy-osm.sh | 3 ++- installers/full_install_osm.sh | 1 + installers/gitea/05-export-connection-info.sh | 2 ++ 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/installers/40-deploy-osm.sh b/installers/40-deploy-osm.sh index 82dc5d4b..8e1d1eac 100755 --- a/installers/40-deploy-osm.sh +++ b/installers/40-deploy-osm.sh @@ -76,10 +76,11 @@ OSM_HELM_OPTS="${OSM_HELM_OPTS} --set prometheus.server.ingress.hosts={prometheu if [ -z "${OSM_GITOPS_ENABLED}" ]; then OSM_HELM_OPTS="${OSM_HELM_OPTS} --set global.gitops.enabled=false" else + OSM_HELM_OPTS="${OSM_HELM_OPTS} --set global.gitops.gitBaseUrl=${GIT_BASE_HTTP_URL}" OSM_HELM_OPTS="${OSM_HELM_OPTS} --set global.gitops.fleetRepoUrl=${FLEET_REPO_HTTP_URL}" OSM_HELM_OPTS="${OSM_HELM_OPTS} --set global.gitops.swcatalogsRepoUrl=${SW_CATALOGS_REPO_HTTP_URL}" # TODO: evaluate if we need to set two git user names, one for fleet and one for sw-catalogs - OSM_HELM_OPTS="${OSM_HELM_OPTS} --set global.gitops.gitUser=${FLEET_REPO_GIT_USERNAME}" + OSM_HELM_OPTS="${OSM_HELM_OPTS} --set global.gitops.gitUser=${GIT_BASE_USERNAME}" AGE_MGMT_PUBKEY=$(tr -d '\n' < ${CREDENTIALS_DIR}/age.mgmt.pub) OSM_HELM_OPTS="${OSM_HELM_OPTS} --set global.gitops.pubkey=${AGE_MGMT_PUBKEY}" fi diff --git a/installers/full_install_osm.sh b/installers/full_install_osm.sh index b1c523e1..c1169cc8 100755 --- a/installers/full_install_osm.sh +++ b/installers/full_install_osm.sh @@ -207,6 +207,7 @@ else echo "Skipping deployment of auxiliary services." echo "Using existing git credentials and repos defined in ${CREDENTIALS_DIR}/git_environment.rc" # cat << EOF > "${CREDENTIALS_DIR}/git_environment.rc" +# export GIT_BASE_HTTP_URL="${GITEA_HTTP_URL}" # export FLEET_REPO_HTTP_URL="${FLEET_REPO_HTTP_URL}" # export FLEET_REPO_SSH_URL="${FLEET_REPO_SSH_URL}" # export FLEET_REPO_GIT_USERNAME="${FLEET_REPO_GIT_USERNAME}" diff --git a/installers/gitea/05-export-connection-info.sh b/installers/gitea/05-export-connection-info.sh index acd90925..03a40809 100755 --- a/installers/gitea/05-export-connection-info.sh +++ b/installers/gitea/05-export-connection-info.sh @@ -53,6 +53,8 @@ export GITEA_STD_USER_PASS='${GITEA_STD_USER_PASS}' EOF cat << EOF > "${CREDENTIALS_DIR}/git_environment.rc" +export GIT_BASE_HTTP_URL="${GITEA_HTTP_URL}" +export GIT_BASE_USERNAME="${GITEA_STD_USERNAME}" export FLEET_REPO_HTTP_URL="${GITEA_HTTP_URL}/${GITEA_STD_USERNAME}/fleet-osm.git" export FLEET_REPO_SSH_URL="${GITEA_SSH_URL}/${GITEA_STD_USERNAME}/fleet-osm.git" export FLEET_REPO_GIT_USERNAME="${GITEA_STD_USERNAME}" -- 2.25.1