Add test-emit-job-header roles
Create a temp test role to allow us to try test-emit-job-header in base-test playbooks. There is no difference between emit-job-header. Change-Id: Ic278a72a5f82b8b1916a2e942d075f77aa07fa11 Signed-off-by: Paul Belanger <pabelanger@redhat.com>
This commit is contained in:
parent
40ef3c084e
commit
fabfe265d7
7
roles/test-emit-job-header/README.rst
Normal file
7
roles/test-emit-job-header/README.rst
Normal file
@ -0,0 +1,7 @@
|
||||
Log a few lines about the job.
|
||||
|
||||
**Role Variables**
|
||||
|
||||
.. zuul:rolevar:: zuul_log_url
|
||||
|
||||
Base URL where logs are to be found.
|
21
roles/test-emit-job-header/tasks/main.yaml
Normal file
21
roles/test-emit-job-header/tasks/main.yaml
Normal file
@ -0,0 +1,21 @@
|
||||
# We don't want this to run for every host, it should only run once.
|
||||
- run_once: yes
|
||||
block:
|
||||
- name: Setup log path fact
|
||||
include_role:
|
||||
name: set-zuul-log-path-fact
|
||||
|
||||
- name: Print job information
|
||||
debug:
|
||||
msg: |
|
||||
# Job Information
|
||||
Ansible Version: {{ ansible_version['full'] }}
|
||||
Job: {{ zuul.job }}
|
||||
Pipeline: {{ zuul.pipeline }}
|
||||
Executor: {{ zuul.executor.hostname }}
|
||||
{% if zuul.change_url is defined %}
|
||||
Triggered by: {{ zuul.change_url }}
|
||||
{% endif %}
|
||||
{% if zuul_log_url is defined and zuul_log_path is defined %}
|
||||
Log URL (when completed): {{ zuul_log_url }}/{{ zuul_log_path }}
|
||||
{% endif %}
|
Loading…
Reference in New Issue
Block a user