aboutsummaryrefslogtreecommitdiffhomepage
path: root/tasks/deploy.yml
diff options
context:
space:
mode:
authorPaul Bonaud <paul.bonaud@fretlink.com>2019-05-13 15:10:19 +0200
committerPaul Bonaud <paul.bonaud@fretlink.com>2019-05-13 15:19:57 +0200
commitc48c25c3d0769bdb9148db3cdc1976c68d5b841f (patch)
tree91bc31f85687be9b2f97238208ca1af14e549549 /tasks/deploy.yml
parent6bfc325c7b90a52dab15dd2ac624b4b9643d9d66 (diff)
downloadansible-clever-c48c25c3d0769bdb9148db3cdc1976c68d5b841f.tar.gz
ansible-clever-c48c25c3d0769bdb9148db3cdc1976c68d5b841f.tar.zst
ansible-clever-c48c25c3d0769bdb9148db3cdc1976c68d5b841f.zip
fix(deploy): fail the task correctly when last deploymt failed
Diffstat (limited to 'tasks/deploy.yml')
-rw-r--r--tasks/deploy.yml8
1 files 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 @@
112 - clever_deploy is failed 112 - clever_deploy is failed
113 - clever_deploy.stderr is defined 113 - clever_deploy.stderr is defined
114 - clever_deploy.stderr is search("application is up-to-date") 114 - clever_deploy.stderr is search("application is up-to-date")
115 - clever_activity_valid_deploy_keyword in clever_activity_result.stdout_lines[-1] 115 - |
116 - current_commit_sha.stdout_lines[-1] in clever_activity_result.stdout_lines[-1] 116 (current_commit_sha.stdout_lines[-1] not in clever_activity_result.stdout_lines[-1])
117 or
118 (clever_activity_valid_deploy_keyword not in clever_activity_result.stdout_lines[-1])
117 119
118- name: Fail on deployment errors 120- name: Fail on any other deployment errors
119 fail: 121 fail:
120 msg: "The clever deployment failed! Please check logs above." 122 msg: "The clever deployment failed! Please check logs above."
121 when: 123 when: