From 5595e7fc14430ee0636060afc82f909d4b3d04be Mon Sep 17 00:00:00 2001 From: Ben Nemec Date: Wed, 22 Nov 2017 17:09:13 -0600 Subject: [PATCH] Swap the order of stdout and stderr in debug output Generally this data is looked at because something failed, and in that case the relevant error is likely to be at the end of stderr. By concatenating the output stderr first and then stdout as we were it is possible for the stderr to get lost entirely in the failures list, and even if that doesn't happen it's best to output the relevant error right at the end of the output where people will see it. Previously it would be buried in the middle of the debug output. Change-Id: I952fd1af5778ade1eb6b0599d983f98cadeb7f6f --- common/deploy-steps-tasks.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/common/deploy-steps-tasks.yaml b/common/deploy-steps-tasks.yaml index d045104e6c..feb378b758 100644 --- a/common/deploy-steps-tasks.yaml +++ b/common/deploy-steps-tasks.yaml @@ -24,7 +24,7 @@ failed_when: false no_log: true become: true - - debug: var=(outputs.stderr|default('')).split('\n')|union(outputs.stdout_lines|default([])) + - debug: var=outputs.stdout_lines|default([])|union(outputs.stderr_lines|default([])) when: outputs.rc is defined failed_when: outputs.rc not in [0, 2] ###################################### @@ -43,7 +43,7 @@ failed_when: false no_log: true become: true - - debug: var=(outputs.stderr|default('')).split('\n')|union(outputs.stdout_lines|default([])) + - debug: var=outputs.stdout_lines|default([])|union(outputs.stderr_lines|default([])) when: outputs.rc is defined failed_when: outputs.rc != 0 ################################################## @@ -69,7 +69,7 @@ failed_when: false no_log: true become: true - - debug: var=(outputs.stderr|default('')).split('\n')|union(outputs.stdout_lines|default([])) + - debug: var=outputs.stdout_lines|default([])|union(outputs.stderr_lines|default([])) when: outputs.rc is defined failed_when: outputs.rc != 0 ######################################################## @@ -94,6 +94,6 @@ failed_when: false no_log: true become: true - - debug: var=(outputs.stderr|default('')).split('\n')|union(outputs.stdout_lines|default([])) + - debug: var=outputs.stdout_lines|default([])|union(outputs.stderr_lines|default([])) when: outputs.rc is defined failed_when: outputs.rc != 0