diff options
author | EuAndreh <eu@euandre.org> | 2019-05-28 20:32:45 -0300 |
---|---|---|
committer | EuAndreh <eu@euandre.org> | 2019-05-28 20:32:45 -0300 |
commit | 05ad7e4591164d6dd9160f59156eddfec613e537 (patch) | |
tree | 0ef071aeb8e7f60a21ecbe48b24da81ae0f759db | |
parent | Use SSH to fetch vps-state so we can push to it later (diff) | |
download | server-05ad7e4591164d6dd9160f59156eddfec613e537.tar.gz server-05ad7e4591164d6dd9160f59156eddfec613e537.tar.xz |
Configure git for vps-state repo in ./scripts/ci/setup.sh
-rw-r--r-- | .build.yml | 2 | ||||
-rwxr-xr-x | scripts/ci/provision.sh | 2 | ||||
-rwxr-xr-x | scripts/ci/setup.sh | 6 |
3 files changed, 6 insertions, 4 deletions
@@ -7,7 +7,7 @@ triggers: to: EuAndreh <ci@euandre.org> 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." |