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"