zuul-jobs/roles/set-zuul-log-path-fact/tasks/main.yaml
Jeremy Stanley b1eb21c446 Include project and branch in periodic job log URL
At least until we have a good dashboard to make periodic job logs
easier to find, include the project and branch names in the log path
so that they can be disambiguated from one another now that we're
sharing common job names across them.

Change-Id: Ifaca0dbcf39792094c23c3bd4ca1f3d207f80e26
2017-10-08 16:02:38 +00:00

15 lines
662 B
YAML

- name: Set log path for a change
when: zuul.change is defined
set_fact:
zuul_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:
zuul_log_path: "{{ zuul.newrev[:2] }}/{{ zuul.newrev }}/{{ zuul.pipeline }}/{{ zuul.job }}/{{ zuul.build[:7] }}"
- name: Set log path for a periodic job
when: zuul.change is not defined and zuul.newrev is not defined
set_fact:
zuul_log_path: "{{ zuul.pipeline }}/{{ zuul.project.canonical_name }}/{{ zuul.branch }}/{{ zuul.job }}/{{ zuul.build[:7] }}"