Update git env variables to add GIT_BASE_HTTP_URL and GIT_BASE_USERNAME
Change-Id: Ia1f89c7680163fbd71ecbd5c4ce6992e880cc207
Signed-off-by: garciadeblas <gerardo.garciadeblas@telefonica.com>
diff --git a/installers/40-deploy-osm.sh b/installers/40-deploy-osm.sh
index 82dc5d4..8e1d1ea 100755
--- a/installers/40-deploy-osm.sh
+++ b/installers/40-deploy-osm.sh
@@ -76,10 +76,11 @@
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 b1c523e..c1169cc 100755
--- a/installers/full_install_osm.sh
+++ b/installers/full_install_osm.sh
@@ -207,6 +207,7 @@
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 acd9092..03a4080 100755
--- a/installers/gitea/05-export-connection-info.sh
+++ b/installers/gitea/05-export-connection-info.sh
@@ -53,6 +53,8 @@
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}"