]> git.immae.eu Git - github/fretlink/ansible-clever.git/commitdiff
fix(deploy): fail the task correctly when last deploymt failed 42/head
authorPaul Bonaud <paul.bonaud@fretlink.com>
Mon, 13 May 2019 13:10:19 +0000 (15:10 +0200)
committerPaul Bonaud <paul.bonaud@fretlink.com>
Mon, 13 May 2019 13:19:57 +0000 (15:19 +0200)
tasks/deploy.yml

index 81e2bb7eafc9db95efd510b5504ece6a9fdb21bd..74232a627547d8a4ec0ca8eef396a580df337e28 100644 (file)
     - 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: