diff options
author | EuAndreh <eu@euandre.org> | 2019-06-10 21:22:01 -0300 |
---|---|---|
committer | EuAndreh <eu@euandre.org> | 2019-06-10 21:22:01 -0300 |
commit | 66c3cb1b2b9739b0e3bf12ab8b079a8aa4736d4b (patch) | |
tree | 373a6c9a3d2c8bb112ecdde4505f5e9e865100e6 /scripts/ci/provision.sh | |
parent | Only send log email when running on CI (diff) | |
download | toph-66c3cb1b2b9739b0e3bf12ab8b079a8aa4736d4b.tar.gz toph-66c3cb1b2b9739b0e3bf12ab8b079a8aa4736d4b.tar.xz |
Store updated Terraform files in case of failure
Diffstat (limited to 'scripts/ci/provision.sh')
-rwxr-xr-x | scripts/ci/provision.sh | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/scripts/ci/provision.sh b/scripts/ci/provision.sh index 74f56f2..d96d854 100755 --- a/scripts/ci/provision.sh +++ b/scripts/ci/provision.sh @@ -14,6 +14,14 @@ mail_debug_log() { echo "Sending logs via email..." ./scripts/ci/mail.sh "${VPS_COMMIT_SHA}" "${ec}" echo "Done." + + echo "Storing file changes to '.tfstate' files..." + pushd ../vps-state/ + git add . + git commit -m "CI: fallback add all after provision.sh failure for CI run $VPS_COMMIT_SHA" ||: + git push origin master + popd + echo "Done." } trap mail_debug_log EXIT |