From 910bf4fd0c50c9803177fedd4a3ed917fd932ab9 Mon Sep 17 00:00:00 2001 From: "James E. Blair" Date: Mon, 1 Apr 2019 11:57:56 -0700 Subject: [PATCH] Add write-root-marker role This will be used in publication jobs in later changes. Change-Id: I784f81d9999630a643d79f1cfe5c651c40d437d8 --- roles/write-root-marker/README.rst | 7 +++++++ roles/write-root-marker/tasks/main.yaml | 10 ++++++++++ 2 files changed, 17 insertions(+) create mode 100644 roles/write-root-marker/README.rst create mode 100644 roles/write-root-marker/tasks/main.yaml diff --git a/roles/write-root-marker/README.rst b/roles/write-root-marker/README.rst new file mode 100644 index 0000000..456223d --- /dev/null +++ b/roles/write-root-marker/README.rst @@ -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. diff --git a/roles/write-root-marker/tasks/main.yaml b/roles/write-root-marker/tasks/main.yaml new file mode 100644 index 0000000..a246118 --- /dev/null +++ b/roles/write-root-marker/tasks/main.yaml @@ -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 }}"