openstack-zuul-jobs/roles/prepare-infra-docs-for-afs/tasks/branch.yaml
Monty Taylor 2d2a717f29
Ansiblify prepare-infra-docs-for-afs
The existing code in branch made a directory for build/{{ branch.tag |
dirname }} but then moved things to build/{{ branch.tag | basename }}
which produced:

  html/
  html/feature
  html/zuulv3

Fix that. While we're in there, go ahead and change this into individual
ansible tasks.

Change-Id: Ib757d1f8bf76012d2d436565913e750c4a5d52a7
2017-09-06 14:00:44 -05:00

15 lines
580 B
YAML

# Put other branch changes in dir named after branch under the
# build dir. When Zuul copies these files they will be
# accessible under the developer docs root using the branch name.
# EG: feature/foo or milestone-proposed
- name: Move built html to the side
command: "mv {{ doc_build_dir }}/html {{ doc_build_dir }}/tmp"
- name: Ensure destination path exists
file:
path: "{{ doc_build_dir }}/html/{{ zuul.branch | dirname }}"
state: directory
- name: Move html to branch location
command: "mv {{ doc_build_dir }}/tmp {{ doc_build_dir }}/html/{{ zuul.branch }}"