Add --fail flag to zuul status backup curl

We don't want to save documents if they are errors.

Change-Id: I259d926605c56c2b2fd723c3783bb468144e063b
This commit is contained in:
Monty Taylor 2020-04-28 08:28:43 -05:00
parent 158f190fcd
commit 686b30e71d

View File

@ -9,7 +9,7 @@
state: present state: present
user: root user: root
job: | 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 # Rotate backups and keep no more than 120 files -- or 2 hours worth of
# backup if Zuul has 100% uptime. # backup if Zuul has 100% uptime.