From 66dbd1d2d06f8c00d82b161c9f40c14ab5baabc6 Mon Sep 17 00:00:00 2001 From: Nicholas Kumia Date: Tue, 5 Sep 2023 10:33:31 -0400 Subject: [PATCH] new: stop deployment for same reason as restarts --- bin/check-and-renew | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/bin/check-and-renew b/bin/check-and-renew index 037d018ae..51ed1d96e 100755 --- a/bin/check-and-renew +++ b/bin/check-and-renew @@ -110,12 +110,17 @@ check_running_job "$@" if [[ "$action" == "restart" ]]; then if [[ $ok_to_restart == "YES" ]]; then - cf restart "$app_to_check" --strategy rolling + cf restart "$app_to_check" --strategy rolling else - echo "Restart $app_to_check cancelled." + echo "Restart of $app_to_check cancelled." fi fi if [[ "$action" == "deploy" ]]; then - cf push "$app_to_check" --vars-file vars.$space.yml --strategy rolling + if [[ $ok_to_restart == "YES" ]]; then + cf push "$app_to_check" --vars-file vars.$space.yml --strategy rolling + else + echo "Deployment for $app_to_check cancelled." + exit 1 + fi fi