23 lines
659 B
YAML
23 lines
659 B
YAML
- name: Set log path for a change
|
|
when: zuul.change is defined
|
|
set_fact:
|
|
log_path: "{{ zuul.change[-2:] }}/{{ zuul.change }}/{{ zuul.patchset }}/{{ zuul.pipeline }}/{{ zuul.uuid[:7] }}"
|
|
|
|
- name: Set log path for a ref update
|
|
when: zuul.newrev is defined
|
|
set_fact:
|
|
log_path: "{{ zuul.newrev[-2:] }}/{{ zuul.newrev }}/{{ zuul.pipeline }}/{{ zuul.uuid[:7] }}"
|
|
|
|
- name: Create log directories
|
|
file:
|
|
path: "/srv/static/logs/{{ log_path }}"
|
|
state: directory
|
|
recurse: yes
|
|
mode: 0775
|
|
|
|
- name: Upload logs to log server
|
|
synchronize:
|
|
src: "{{ zuul.executor.log_root }}"
|
|
dest: "/srv/static/logs/{{ log_path }}"
|
|
no_log: true
|