edab04d5ef
This refactors the docs publication/promote jobs so that there are base versions which can be consumed by tenants who will supply their own AFS secrets, as well as versions for use in this tenant (which consume the base versions in exactly the way another tenant would). The documentation policies for the tenant are encoded in the secret, so each tenant can choose the publication locations and scheme once and allow all projects within that tenant to use these jobs. Change-Id: I8f201c0351d4d532ddcbcf1f22f9297dece04fff
30 lines
870 B
YAML
30 lines
870 B
YAML
- hosts: localhost
|
|
tasks:
|
|
- name: Check execution context
|
|
when: "zuul.tag is not defined"
|
|
fail:
|
|
msg: "This playbook must be run in a tag-based pipeline (e.g., 'release')."
|
|
- include_role:
|
|
name: write-root-marker
|
|
vars:
|
|
root_marker_dir: "{{ zuul.executor.log_root }}/docs"
|
|
- name: Set target directory
|
|
set_fact:
|
|
target_dir: "{{ afs.docs_tag_path }}"
|
|
- name: Get an AFS token
|
|
include_role:
|
|
name: create-afs-token
|
|
- name: Create publication directory
|
|
file:
|
|
path: "{{ target_dir }}"
|
|
state: directory
|
|
- name: Upload to AFS
|
|
include_role:
|
|
name: upload-afs
|
|
vars:
|
|
afs_source: "{{ zuul.executor.log_root }}/docs/"
|
|
afs_target: "{{ target_dir }}"
|
|
- name: Destroy AFS token
|
|
include_role:
|
|
name: destroy-afs-token
|