From c3caacfb73ad80c93a2daa3bc35723a44ece6a3b Mon Sep 17 00:00:00 2001 From: David Fry Date: Fri, 19 May 2023 14:07:12 +0100 Subject: [PATCH] change check on repo user --- terraform/gitlab/ci-templates/bootstrap/.gitlab-ci.yml | 4 ++-- terraform/gitlab/ci-templates/k8s-cluster/.gitlab-ci.yml | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/terraform/gitlab/ci-templates/bootstrap/.gitlab-ci.yml b/terraform/gitlab/ci-templates/bootstrap/.gitlab-ci.yml index 8ef1506b4..05ee91469 100644 --- a/terraform/gitlab/ci-templates/bootstrap/.gitlab-ci.yml +++ b/terraform/gitlab/ci-templates/bootstrap/.gitlab-ci.yml @@ -51,8 +51,8 @@ cache: - source setcivars.sh - yq eval '.' environment.yaml -o=json > environment.json - for var in $(jq -r 'to_entries[] | "\(.key)=\(.value)\n"' ./environment.json); do export $var; done - - if [ ! -z "$PRIVATE_REPO_USER" ]; then echo "https://${PRIVATE_REPO_USER}:${PRIVATE_REPO_TOKEN}@github.com" > ~/.gitcredentials.store; fi - - if [ ! -z "$PRIVATE_REPO_USER" ]; then git config --global credential.helper 'store --file ~/.gitcredentials.store'; fi + - if [ "$PRIVATE_REPO_USER" == "notused" ]; then echo "https://${PRIVATE_REPO_USER}:${PRIVATE_REPO_TOKEN}@github.com" > ~/.gitcredentials.store; fi + - if [ "$PRIVATE_REPO_USER" == "notused" ]; then git config --global credential.helper 'store --file ~/.gitcredentials.store'; fi - git config --global advice.detachedHead false - set - git clone ${TEMPLATE_REPO_URL} template-repo diff --git a/terraform/gitlab/ci-templates/k8s-cluster/.gitlab-ci.yml b/terraform/gitlab/ci-templates/k8s-cluster/.gitlab-ci.yml index 2befee4af..07a2bf1c8 100644 --- a/terraform/gitlab/ci-templates/k8s-cluster/.gitlab-ci.yml +++ b/terraform/gitlab/ci-templates/k8s-cluster/.gitlab-ci.yml @@ -49,8 +49,8 @@ cache: - source setcivars.sh - yq eval '.' environment.yaml -o=json > environment.json - for var in $(jq -r 'to_entries[] | "\(.key)=\(.value)\n"' ./environment.json); do export $var; done - - if [ ! -z "$PRIVATE_REPO_USER" ]; then echo "https://${PRIVATE_REPO_USER}:${PRIVATE_REPO_TOKEN}@github.com" > ~/.gitcredentials.store; fi - - if [ ! -z "$PRIVATE_REPO_USER" ]; then git config --global credential.helper 'store --file ~/.gitcredentials.store'; fi + - if [ "$PRIVATE_REPO_USER" == "notused" ]; then echo "https://${PRIVATE_REPO_USER}:${PRIVATE_REPO_TOKEN}@github.com" > ~/.gitcredentials.store; fi + - if [ "$PRIVATE_REPO_USER" == "notused" ]; then git config --global credential.helper 'store --file ~/.gitcredentials.store'; fi - git config --global advice.detachedHead false - set