Rename log_path and generate-log-url
Make log_path zuul_log_path because log_path is rather generic. Rename generate-log-url to set-zuul-log-path-fact to make it clearer what it does. Change-Id: I91ae1e396b3ef04939edebaeea8e5b16cc50315a
This commit is contained in:
parent
4a21194da7
commit
00e673c36b
@ -1,7 +1,10 @@
|
||||
- include_role:
|
||||
name: set-zuul-log-path-fact
|
||||
|
||||
- debug:
|
||||
msg: "Job {{ zuul.job }} triggered from {{ zuul.change_url }}"
|
||||
when: zuul.change_url is defined
|
||||
|
||||
- debug:
|
||||
msg: "At completion, logs for this job will be availble at "{{ zuul_log_url }}/{{ log_path }}"
|
||||
when: zuul_log_url is defined and log_path is defined
|
||||
msg: "At completion, logs for this job will be availble at "{{ zuul_log_url }}/{{ zuul_log_path }}"
|
||||
when: zuul_log_url is defined and zuul_log_path is defined
|
||||
|
1
roles/set-zuul-log-path-fact/README.rst
Normal file
1
roles/set-zuul-log-path-fact/README.rst
Normal file
@ -0,0 +1 @@
|
||||
Sets a fact named ``zuul_log_path`` from zuul variables
|
@ -1,9 +1,9 @@
|
||||
- include_role:
|
||||
name: generate-log-url
|
||||
name: set-zuul-log-path-fact
|
||||
|
||||
- name: Create log directories
|
||||
file:
|
||||
path: "{{zuul_logserver_root}}/{{ log_path }}"
|
||||
path: "{{zuul_logserver_root}}/{{ zuul_log_path }}"
|
||||
state: directory
|
||||
recurse: yes
|
||||
mode: 0775
|
||||
@ -11,7 +11,7 @@
|
||||
- name: Upload logs to log server
|
||||
synchronize:
|
||||
src: "{{ zuul.executor.log_root }}/"
|
||||
dest: "{{zuul_logserver_root}}/{{ log_path }}/"
|
||||
dest: "{{zuul_logserver_root}}/{{ zuul_log_path }}/"
|
||||
rsync_opts:
|
||||
- "--exclude=job-output.txt"
|
||||
no_log: true
|
||||
@ -25,7 +25,7 @@
|
||||
- name: Upload console log
|
||||
synchronize:
|
||||
src: "{{ zuul.executor.log_root }}/job-output.txt.gz"
|
||||
dest: "{{zuul_logserver_root}}/{{ log_path }}/job-output.txt.gz"
|
||||
dest: "{{zuul_logserver_root}}/{{ zuul_log_path }}/job-output.txt.gz"
|
||||
verify_host: true
|
||||
|
||||
- name: Return log URL to Zuul
|
||||
@ -33,5 +33,5 @@
|
||||
zuul_return:
|
||||
data:
|
||||
zuul:
|
||||
log_url: "{{ zuul_log_url }}/{{ log_path }}/"
|
||||
log_url: "{{ zuul_log_url }}/{{ zuul_log_path }}/"
|
||||
when: zuul_log_url is defined
|
||||
|
Loading…
Reference in New Issue
Block a user