Skip to content

Commit

Permalink
Merge pull request #92 from jduimovich/defer-gitconfig
Browse files Browse the repository at this point in the history
move the gitconfig to after local clones
  • Loading branch information
simonbaird authored Nov 25, 2024
2 parents 4260c5d + 9f4229e commit 9d02bb4
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions setup-local-dev-repos.sh
Original file line number Diff line number Diff line change
Expand Up @@ -102,19 +102,19 @@ GITLAB_GITOPS=$TMP_REPOS/gitlab-gitops
JENKINS_BUILD=$TMP_REPOS/jenkins-build
JENKINS_GITOPS=$TMP_REPOS/jenkins-gitops

# Avoid messing with your real $HOME/.gitconfig when running locally
if [ -n "$LOCAL_SHELL_RUN" ]; then
export GIT_CONFIG_GLOBAL=$(pwd)/$TMP_REPOS/.gitconfig
echo GIT_CONFIG_GLOBAL=$GIT_CONFIG_GLOBAL
fi

cloneRepo $UPSTREAM_BUILD_REPO ${TEST_BUILD_REPO_SSH:-$TEST_BUILD_REPO} $TEST_BUILD_REPO $BUILD
cloneRepo $UPSTREAM_GITOPS_REPO ${TEST_GITOPS_REPO_SSH:-$TEST_GITOPS_REPO} $TEST_GITOPS_REPO $GITOPS
cloneRepo $UPSTREAM_BUILD_REPO ${TEST_BUILD_GITLAB_REPO_SSH:-$TEST_BUILD_GITLAB_REPO} $TEST_BUILD_GITLAB_REPO $GITLAB_BUILD
cloneRepo $UPSTREAM_GITOPS_REPO ${TEST_GITOPS_GITLAB_REPO_SSH:-$TEST_GITOPS_GITLAB_REPO} $TEST_GITOPS_GITLAB_REPO $GITLAB_GITOPS
cloneRepo $UPSTREAM_BUILD_REPO ${TEST_BUILD_JENKINS_REPO_SSH:-$TEST_BUILD_JENKINS_REPO} $TEST_BUILD_JENKINS_REPO $JENKINS_BUILD
cloneRepo $UPSTREAM_GITOPS_REPO ${TEST_GITOPS_JENKINS_REPO_SSH:-$TEST_GITOPS_JENKINS_REPO} $TEST_GITOPS_JENKINS_REPO $JENKINS_GITOPS

# Avoid messing with your real $HOME/.gitconfig when running locally
if [ -n "$LOCAL_SHELL_RUN" ]; then
export GIT_CONFIG_GLOBAL=$(pwd)/$TMP_REPOS/.gitconfig
echo GIT_CONFIG_GLOBAL=$GIT_CONFIG_GLOBAL
fi

# WARNING - if GITOPS_REPO_URL is set, update deployment will try to update
# the gitops repo. Disable this here if the gitops repo is NOT a fork
if [ $TEST_REPO_ORG == "redhat-appstudio" ]; then
Expand Down

0 comments on commit 9d02bb4

Please sign in to comment.