Update 'helm deploy' failure criteria 39/117739/1
authorBartek Grzybowski <b.grzybowski@partner.samsung.com>
Thu, 11 Feb 2021 11:06:55 +0000 (12:06 +0100)
committerBartek Grzybowski <b.grzybowski@partner.samsung.com>
Thu, 11 Feb 2021 11:06:55 +0000 (12:06 +0100)
Contrary to helm v2, helm v3 prints regular output to stderr hence
stderr output presence can no longer be used as failure criteria.
Since 'deploy' plugin (for any helm release) prints a list of charts
that failed to deploy at the end of it's run, it's output is used to
detect deployment failure.

Change-Id: I340e4e1a5be0949d866ddedfb49c0d23a48e67cf
Issue-ID: OOM-2665
Signed-off-by: Bartek Grzybowski <b.grzybowski@partner.samsung.com>
ansible/roles/application/tasks/install.yml

index 883e2aa..2db8863 100644 (file)
@@ -53,4 +53,4 @@
           {{ helm_extra_install_options | map(attribute='opt') | join(' ') }}
   changed_when: true  # when executed its a changed type of action
   register: helm_install
-  failed_when: helm_install.stderr
+  failed_when: "'FAILED' in (helm_install.stdout | upper()) or helm_install.rc != 0"