Revert "Revert "Add zuul.{pipeline,nodepool.provider,executor.hostname} to job header""
The nodepool provider variable is not always available, for example
when running only on localhost, so default it to "N/A".
Additionally, we don't want these tasks to run multiple times if we
are running a multi-node job so use "run_once: yes" to prevent
printing the header more than once.
This reverts commit 27755ba83f
.
Depends-On: Ia79a793200fcb89161783ff641b85106936084b5
Change-Id: Id9117935d9c53268ea893796154af03db21ee3a7
This commit is contained in:
parent
1d50e386cf
commit
ce176a5b6f
|
@ -1,11 +1,20 @@
|
|||
- name: Set zuul-log-path fact
|
||||
include_role:
|
||||
name: set-zuul-log-path-fact
|
||||
# We don't want this to run for every host, it should only run once.
|
||||
- run_once: yes
|
||||
block:
|
||||
- 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 available at {{ zuul_log_url }}/{{ zuul_log_path }}"
|
||||
when: zuul_log_url is defined and zuul_log_path is defined
|
||||
- name: Print job information
|
||||
debug:
|
||||
msg: |
|
||||
# Job Information
|
||||
Job: {{ zuul.job }}
|
||||
Pipeline: {{ zuul.pipeline }}
|
||||
Executor: {{ zuul.executor.hostname }}
|
||||
Provider: {{ nodepool.provider |default('N/A') }}
|
||||
{% 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