From c48c25c3d0769bdb9148db3cdc1976c68d5b841f Mon Sep 17 00:00:00 2001 From: Paul Bonaud Date: Mon, 13 May 2019 15:10:19 +0200 Subject: fix(deploy): fail the task correctly when last deploymt failed --- tasks/deploy.yml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/tasks/deploy.yml b/tasks/deploy.yml index 81e2bb7..74232a6 100644 --- a/tasks/deploy.yml +++ b/tasks/deploy.yml @@ -112,10 +112,12 @@ - clever_deploy is failed - clever_deploy.stderr is defined - clever_deploy.stderr is search("application is up-to-date") - - clever_activity_valid_deploy_keyword in clever_activity_result.stdout_lines[-1] - - current_commit_sha.stdout_lines[-1] in clever_activity_result.stdout_lines[-1] + - | + (current_commit_sha.stdout_lines[-1] not in clever_activity_result.stdout_lines[-1]) + or + (clever_activity_valid_deploy_keyword not in clever_activity_result.stdout_lines[-1]) -- name: Fail on deployment errors +- name: Fail on any other deployment errors fail: msg: "The clever deployment failed! Please check logs above." when: -- cgit v1.2.3