From 686b30e71d5bf93203c0ea893b1b69500afbdf5a Mon Sep 17 00:00:00 2001 From: Monty Taylor Date: Tue, 28 Apr 2020 08:28:43 -0500 Subject: [PATCH] Add --fail flag to zuul status backup curl We don't want to save documents if they are errors. Change-Id: I259d926605c56c2b2fd723c3783bb468144e063b --- playbooks/roles/zuul-status-backup/tasks/main.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/playbooks/roles/zuul-status-backup/tasks/main.yaml b/playbooks/roles/zuul-status-backup/tasks/main.yaml index 8f6977b718..8cb3c0777e 100644 --- a/playbooks/roles/zuul-status-backup/tasks/main.yaml +++ b/playbooks/roles/zuul-status-backup/tasks/main.yaml @@ -9,7 +9,7 @@ state: present user: root job: | - timeout -k 5 10 curl https://zuul.opendev.org/api/tenant/{{ tenant }}/status -o /var/lib/zuul/backup/{{ tenant }}_status_$(date +\%s).json 2>/dev/null + timeout -k 5 10 curl https://zuul.opendev.org/api/tenant/{{ tenant }}/status --fail -o /var/lib/zuul/backup/{{ tenant }}_status_$(date +\%s).json 2>/dev/null # Rotate backups and keep no more than 120 files -- or 2 hours worth of # backup if Zuul has 100% uptime.