Add write-root-marker role

This will be used in publication jobs in later changes.

Change-Id: I784f81d9999630a643d79f1cfe5c651c40d437d8
This commit is contained in:
James E. Blair 2019-04-01 11:57:56 -07:00
parent 037616d647
commit 910bf4fd0c
2 changed files with 17 additions and 0 deletions

View File

@ -0,0 +1,7 @@
Write the root marker for an AFS publishing job
** Role Variables **
.. zuul:rolevar:: root_marker_dir
The marker file will be placed in this directory.

View File

@ -0,0 +1,10 @@
- name: Write root marker
when: "zuul.branch is defined"
copy:
dest: "{{ root_marker_dir }}/.root-marker"
content: "Project: {{ zuul.project.name }} Branch: {{ zuul.branch }} Build: {{ zuul.build }} Revision: {{ zuul.ref }}"
- name: Write root marker
when: "zuul.tag is defined"
copy:
dest: "{{ root_marker_dir }}/.root-marker"
content: "Project: {{ zuul.project.name }} Tag: {{ zuul.tag }} Build: {{ zuul.build }} Revision: {{ zuul.ref }}"