From 4e8e53c07f99fe5c2d44d75011d4b9a5eeefa43b Mon Sep 17 00:00:00 2001 From: Emma Foley Date: Fri, 28 Jul 2023 13:35:55 +0100 Subject: [PATCH] [ci] collect_logs: Add names to the tasks to make it easier to find the right information --- ci/post-collect_logs.yml | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/ci/post-collect_logs.yml b/ci/post-collect_logs.yml index d1e780cb1..4c8c5d30f 100644 --- a/ci/post-collect_logs.yml +++ b/ci/post-collect_logs.yml @@ -14,7 +14,7 @@ name: Collect logs on the controller gather_facts: false tasks: - - set_fact: + - ansible.builtin.set_fact: logfile_dir: "{{ ansible_user_dir }}/zuul-output/logs/controller" - name: Create log dir @@ -23,11 +23,11 @@ state: directory mode: "0755" - - set_fact: + - ansible.builtin.set_fact: oc_logfile: "{{ logfile_dir }}/oc_logs.log " - name: "Get builds" - shell: + ansible.builtin.shell: cmd: | echo "*** [INFO] Showing oc get builds" > {{ logfile_dir }}/post_oc_get_builds.log 2>&1 oc get builds -oyaml >> {{ logfile_dir }}/post_oc_get_builds.log 2>&1 @@ -38,14 +38,14 @@ changed_when: false - name: "Get subscription details" - shell: + ansible.builtin.shell: cmd: | oc get subscriptions > {{ logfile_dir}}/post_oc_get_subscriptions.log 2>&1 oc describe subscription service-telemetry-operator >> {{ logfile_dir}}/post_oc_get_subscriptions.log 2>&1 cat {{ logfile_dir}}/post_oc_get_subscriptions.log - name: "Get smoketest logs" - shell: + ansible.builtin.shell: cmd: | echo "*** [INFO] Showing oc get all..." >> {{ logfile_dir }}/oc_log.log 2>&1 oc get all >> {{ logfile_dir }}/oc_log.log 2>&1 @@ -125,7 +125,9 @@ ignore_errors: true register: describe_sto - - ansible.builtin.debug: var=describe_sto.stdout + - name: "Show the output of ``oc describe pod service-telemetry-operator-xxxxxx``" + ansible.builtin.debug: + var: describe_sto.stdout - name: "Question the deployment" ansible.builtin.shell: @@ -137,7 +139,8 @@ oc get csv -n service-telemetry-operator -oyaml 2>&1 register: output - - ansible.builtin.debug: + - name: "Show the output from questioning the deployment" + ansible.builtin.debug: msg: "{{ output.stdout }}" - name: "Copy generated logs"