Skip to content

Commit

Permalink
[ci] collect_logs: Add names to the tasks to make it easier to find t…
Browse files Browse the repository at this point in the history
…he right information
  • Loading branch information
elfiesmelfie committed Jul 28, 2023
1 parent e301f82 commit 4e8e53c
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions ci/post-collect_logs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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:
Expand All @@ -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"
Expand Down

0 comments on commit 4e8e53c

Please sign in to comment.