189c2471ec
This is a new artifact-aware method of fetching sphinx tarballs, meant to be used in docs promote jobs. Change-Id: I9a01af9e36b959c4fa42f3c41b548c87bf2e1759
44 lines
1.0 KiB
YAML
44 lines
1.0 KiB
YAML
- name: Create temporary HTML archive file
|
|
tempfile:
|
|
state: file
|
|
suffix: ".tar.bz2"
|
|
register: html_archive
|
|
|
|
- name: Archive HTML
|
|
command: "tar -f {{ html_archive.path }} -C {{ zuul_work_dir }}/{{ sphinx_build_dir }}/html -cj ."
|
|
args:
|
|
warn: false
|
|
|
|
- name: Fetch archive HTML
|
|
synchronize:
|
|
dest: "{{ zuul.executor.log_root }}/docs-html.tar.bz2"
|
|
mode: pull
|
|
src: "{{ html_archive.path }}"
|
|
verify_host: true
|
|
|
|
- name: Create browseable HTML directory
|
|
delegate_to: localhost
|
|
file:
|
|
path: "{{ zuul.executor.log_root }}/docs"
|
|
state: directory
|
|
|
|
- name: Extract archive HTML
|
|
delegate_to: localhost
|
|
unarchive:
|
|
src: "{{ zuul.executor.log_root }}/docs-html.tar.bz2"
|
|
dest: "{{ zuul.executor.log_root }}/docs"
|
|
|
|
- name: Return artifact to Zuul
|
|
zuul_return:
|
|
data:
|
|
zuul:
|
|
artifacts:
|
|
- name: "docs_archive"
|
|
url: "docs-html.tar.bz2"
|
|
metadata:
|
|
type: docs_archive
|
|
- name: "docs_site"
|
|
url: "docs/"
|
|
metadata:
|
|
type: docs_site
|