Files
zuul-jobs/roles/merge-output-to-logs/tasks/main.yaml
Ian Wienand 51a8ed8e95 Refactor fetch-sphinx-tarball to be executor safe
This reverts commit 69a238df46.

The role is re-written with executor-safe methods.

Depends-On: https://review.opendev.org/753222
Change-Id: I0b52eff66bfdca776e0e5c426bf1fc57deb3fc49
2020-10-05 15:14:31 +11:00

46 lines
1.2 KiB
YAML

- name: Move artifacts and docs to logs dir
when: zuul.change is defined
delegate_to: localhost
block:
# Artifacts
- name: Check if artifacts is empty
find:
paths: '{{ zuul.executor.work_root }}/artifacts'
register: _artifacts
- name: Copy artifacts into log root
synchronize:
src: '{{ zuul.executor.work_root }}/artifacts/'
dest: '{{ zuul.exector.log_root }}/artifacts/'
owner: no
group: no
when: _artifacts.files
- name: Clean artifacts
include_role:
name: clean-directory
vars:
clean_directory_path: '{{ zuul.executor.work_root }}/artifacts/'
when: _artifacts.files
# Docs
- name: Check if docs is empty
find:
paths: '{{ zuul.executor.work_root }}/docs'
register: _docs
- name: Copy docs into log root
synchronize:
src: '{{ zuul.executor.work_root }}/docs/'
dest: '{{ zuul.exector.log_root }}/docs/'
owner: no
group: no
when: _docs.files
- name: Clean docs
include_role:
name: clean-directory
vars:
clean_directory_path: '{{ zuul.executor.work_root }}/docs/'
when: _docs.files