diff options
author | EuAndreh <eu@euandre.org> | 2019-06-10 11:23:52 -0300 |
---|---|---|
committer | EuAndreh <eu@euandre.org> | 2019-06-10 11:24:02 -0300 |
commit | 6726322ffd3e085dc2a251cdfa6536fe87444378 (patch) | |
tree | 4e89136f514f0b6e3d1c8c19be4c687bb1c00a53 | |
parent | Don't run restore backup Ansible task when not required (diff) | |
download | server-6726322ffd3e085dc2a251cdfa6536fe87444378.tar.gz server-6726322ffd3e085dc2a251cdfa6536fe87444378.tar.xz |
Fail CI run if backup fails
-rw-r--r-- | TODOs.org | 3 | ||||
-rwxr-xr-x | scripts/ci/provision.sh | 6 |
2 files changed, 5 insertions, 4 deletions
@@ -150,7 +150,8 @@ CLOSED: [2019-06-10 Mon 09:01] ** TODO Email verbose (Ansible) log files in case of error builds.sr.ht only emails the link. Should it be extended to support encrypted log attachments? ** TODO Use environment variables for SSH key paths and volume mounts -** TODO Don't allow backups to fail +** DONE Don't allow backups to fail +CLOSED: [2019-06-10 Mon 11:21] ** TODO Don't hardcode =/root/= paths: use =~/= instead to allow for different users * Services ** DONE =$tld=: Static webhosting diff --git a/scripts/ci/provision.sh b/scripts/ci/provision.sh index b26a245..e204927 100755 --- a/scripts/ci/provision.sh +++ b/scripts/ci/provision.sh @@ -23,9 +23,9 @@ setup_borg_files() { echo "Shutting down running containers and backing up data..." echo "${TLD},$(terraform output public_floating_ip) ssh-rsa $(awk '{print $2}' < ./secrets/ssh/vps-box-server.pub)" > ./generated-known-hosts.txt -ssh "$TLD" "cd /home/vps/ && docker-compose down" || echo "FAILED TO SHUTDOWN docker-compose" -setup_borg_files ./scripts/box/create-backup.env.sh create-backup.sh || echo "FAILED TO COPY FILES" -ssh "$TLD" /home/vps/create-backup.sh || echo "FAILED TO CREATE BACKUP." +ssh "$TLD" "cd /home/vps/ && docker-compose down" +setup_borg_files ./scripts/box/create-backup.env.sh create-backup.sh +ssh "$TLD" /home/vps/create-backup.sh echo "Done." echo "Initializing Terraform..." |