aboutsummaryrefslogtreecommitdiff
path: root/scripts/ci
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/ci')
-rwxr-xr-xscripts/ci/provision.sh6
1 files changed, 3 insertions, 3 deletions
diff --git a/scripts/ci/provision.sh b/scripts/ci/provision.sh
index b86e043..a17d7cc 100755
--- a/scripts/ci/provision.sh
+++ b/scripts/ci/provision.sh
@@ -48,7 +48,7 @@ echo "Done."
if [[ "${DESTROY_VOLUME:-}" != "" ]]; then
echo "Destroying existing infrastructure..."
- terraform destroy -input=false -auto-approve
+ terraform destroy -input=false -auto-approve ./logs/terraform-destroy.txt 2>&1
else
echo "Skipping explicit intentional destruction of existing infrastructure..."
fi
@@ -58,7 +58,7 @@ echo "Running 'terraform plan' and storing the planfile..."
mkdir -p "../vps-state/secrets/plan-files/"
PLAN_FILE_NAME="$(date -Iseconds)-$VPS_COMMIT_SHA.tfplan"
PLAN_FILE_PATH="../vps-state/secrets/plan-files/$PLAN_FILE_NAME"
-terraform plan -input=false -out="$PLAN_FILE_PATH"
+terraform plan -input=false -out="$PLAN_FILE_PATH" > ./logs/terraform-plan.txt 2>&1
pushd ../vps-state/
git add "secrets/plan-files/$PLAN_FILE_NAME"
git commit -m "CI: add .tfplan plan file for CI run $VPS_COMMIT_SHA"
@@ -67,7 +67,7 @@ popd
echo "Done."
echo "Running 'terraform apply'..."
-terraform apply -input=false -auto-approve "$PLAN_FILE_PATH"
+terraform apply -input=false -auto-approve "$PLAN_FILE_PATH" > ./logs/terraform-apply.txt 2>&1
echo "Done."
echo "Storing .tfstate file..."