From 05ad7e4591164d6dd9160f59156eddfec613e537 Mon Sep 17 00:00:00 2001 From: EuAndreh Date: Tue, 28 May 2019 20:32:45 -0300 Subject: Configure git for vps-state repo in ./scripts/ci/setup.sh --- .build.yml | 2 +- scripts/ci/provision.sh | 2 -- scripts/ci/setup.sh | 6 +++++- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/.build.yml b/.build.yml index 99e2ac9..74ac2b6 100644 --- a/.build.yml +++ b/.build.yml @@ -7,7 +7,7 @@ triggers: to: EuAndreh sources: - https://git.sr.ht/~euandreh/vps - - git@git.sr.ht:~euandreh/vps-state + - https://git.sr.ht/~euandreh/vps-state secrets: - d587955c-03fb-42ba-9e01-68ca8ed89f99 - 7084b7c7-12be-4509-8927-81ba6eeb1fc0 diff --git a/scripts/ci/provision.sh b/scripts/ci/provision.sh index 1484dcd..2941d03 100755 --- a/scripts/ci/provision.sh +++ b/scripts/ci/provision.sh @@ -24,8 +24,6 @@ terraform plan -input=false -out="$PLAN_FILE_PATH" # Store on git repo pushd ../vps-state/ -git config --global user.email "ci@euandre.org" -git config --global user.name "sr.ht CI" git add "secrets/plan-files/$PLAN_FILE_NAME" git commit -m "CI: add .tfplan plan file for CI run $(git rev-parse HEAD)" git push origin master diff --git a/scripts/ci/setup.sh b/scripts/ci/setup.sh index de8a165..ee5ecf2 100755 --- a/scripts/ci/setup.sh +++ b/scripts/ci/setup.sh @@ -5,11 +5,15 @@ set -Eeuo pipefail cd "$(dirname "${BASH_SOURCE[0]}")" cd ../../ -echo "Unlocking git-crypt repos..." +echo "Unlocking git-crypt repos and configuring git..." +git config --global user.email "ci@euandre.org" +git config --global user.name "sr.ht CI" + git crypt unlock # Assumes vps-state was already cloned pushd ../vps-state/ git crypt unlock +git remote set-url origin git@git.sr.ht:~euandreh/vps-state popd echo "Done." -- cgit v1.2.3