zuul/playbooks/zuul-stream/post.yaml
Ian Wienand df3f9dcd30 zuul-stream: automatically remove streaming files
When using protocol version 1, send a finalise message when streaming
is complete so that the zuul_console daemon can delete the temporary
file.

We test this by inspecting the Ansible console output, which logs a
message with the UUID of the streaming job.  We dump the temporary
files on the remote side and make sure a console file for that job
isn't present.

Change-Id: I823156dc2bcae91bd6d9770bd1520aa55ad875b4
2022-08-09 17:04:46 +10:00

28 lines
718 B
YAML

- hosts: controller
tasks:
- set_fact:
output_dir: "{{ zuul.executor.log_root }}/stream-files"
- name: Make log subdir
file:
path: "{{ output_dir }}"
state: directory
delegate_to: localhost
- name: Fetch files
synchronize:
src: "{{ ansible_user_dir }}/{{ item }}"
dest: "{{ output_dir }}"
mode: pull
with_items:
- logging.json
- ansible.cfg
- console-job-output-success-19887.txt
- job-output-success-19887.txt
- job-output-success-19887.json
- job-output-success-19885.txt
- job-output-success-19885.json
- job-output-failure.txt
- job-output-failure.json