From 13d35686ebb08ec5fb8c02a298c2dce3ca47c603 Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Wed, 21 Aug 2019 09:48:13 +0200 Subject: [PATCH] Make names in promote job unique Update task names so that it's clear which task is doing what and thus we avoid e.g twice "Set target directory" and you need to check whether that is correct. Add missing task name for one include_role. Change-Id: I550307bdfdf2815ce7b5001bd89928311ce8cc02 --- playbooks/docs/promote.yaml | 7 ++++--- roles/write-root-marker/tasks/main.yaml | 4 ++-- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/playbooks/docs/promote.yaml b/playbooks/docs/promote.yaml index 7565555..d69d0ea 100644 --- a/playbooks/docs/promote.yaml +++ b/playbooks/docs/promote.yaml @@ -20,16 +20,17 @@ unarchive: src: "{{ zuul.executor.work_root }}/docs-html.tar.bz2" dest: "{{ zuul.executor.work_root }}/docs" - - include_role: + - name: Write root_marker file + include_role: name: write-root-marker when: "write_root_marker" vars: root_marker_dir: "{{ zuul.executor.work_root }}/docs" - - name: Set target directory + - name: Set target directory if master when: "zuul.branch == 'master'" set_fact: target_dir: "{{ afs.docs_master_path }}" - - name: Set target directory + - name: Set target directory if not master when: "zuul.branch != 'master'" set_fact: target_dir: "{{ afs.docs_branch_path }}" diff --git a/roles/write-root-marker/tasks/main.yaml b/roles/write-root-marker/tasks/main.yaml index a246118..7416b4b 100644 --- a/roles/write-root-marker/tasks/main.yaml +++ b/roles/write-root-marker/tasks/main.yaml @@ -1,9 +1,9 @@ -- name: Write root marker +- name: Write root marker if zuul.branch 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 +- name: Write root marker if zuul.tag when: "zuul.tag is defined" copy: dest: "{{ root_marker_dir }}/.root-marker"