Capture json console and write it to workspace for reproducer
As part of the task at [1] we need to capture some variables from the ci run (like executed pre-run playbooks). This writes the json console to a file in the logs/workspace directory so we can use in the reproducer with [2]. [1] https://tree.taiga.io/project/tripleo-ci-board/task/270 [2] Used by https://review.openstack.org/613572 Co-Authored-By: Gabriele Cerami <gcerami@redhat.com> Change-Id: I75030a5cd75fbd324356fdff9d0a07e51a3a2c7f
This commit is contained in:
parent
0ee6ecdda8
commit
4957af7c7c
|
@ -1,6 +1,17 @@
|
|||
- name: Write console log to localhost as fact zuul_console_json
|
||||
hosts: localhost
|
||||
tasks:
|
||||
- name: capture console log json as fact
|
||||
set_fact:
|
||||
zuul_console_json: "{{ lookup('file', zuul.executor.log_root + '/job-output.json') }}"
|
||||
|
||||
- name: Collect logs
|
||||
hosts: primary
|
||||
tasks:
|
||||
- name: Copy zuul_console_json log to workspace for reproducer
|
||||
copy:
|
||||
content: "{{ hostvars['localhost'].zuul_console_json }}"
|
||||
dest: "{{ ansible_user_dir }}/workspace/logs/zuul_console.json"
|
||||
|
||||
- name: Run ansible playbook to collect logs
|
||||
shell: |
|
||||
|
|
Loading…
Reference in New Issue