Monty Taylor 85a987cc38
Remove bogus post_tasks line from upload-logs
Bad copy-pasta

Change-Id: If637b0d6f22e345b1a4e462585080a890a9acc26
2017-08-20 09:18:06 -05:00

45 lines
1.3 KiB
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.job }}/{{ zuul.build[: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.job }}/{{ zuul.build[:7] }}"
- name: Create log directories
file:
path: "{{zuul_logserver_root}}/{{ log_path }}"
state: directory
recurse: yes
mode: 0775
- name: Upload logs to log server
synchronize:
src: "{{ zuul.executor.log_root }}/"
dest: "{{zuul_logserver_root}}/{{ log_path }}/"
rsync_opts:
- "--exclude=job-output.txt"
no_log: true
# After this point there are no more logs
- name: gzip console log
delegate_to: localhost
archive:
path: "{{ zuul.executor.log_root }}/job-output.txt"
- name: Upload console log
synchronize:
src: "{{ zuul.executor.log_root }}/job-output.txt.gz"
dest: "{{zuul_logserver_root}}/{{ log_path }}/job-output.txt.gz"
verify_host: true
- name: Return log URL to Zuul
delegate_to: localhost
zuul_return:
data:
zuul:
log_url: "{{ zuul_log_url }}/{{ log_path }}/"
when: zuul_log_url is defined