diff --git a/playbooks/publish/static-special.yaml b/playbooks/publish/static-special.yaml deleted file mode 100644 index 2b1bbad8b8..0000000000 --- a/playbooks/publish/static-special.yaml +++ /dev/null @@ -1,20 +0,0 @@ -- hosts: all - roles: - - fetch-tox-output - - role: fetch-sphinx-output - sphinx_output_src: "src/{{ zuul.project.canonical_name }}/doc/build/html/" - zuul_executor_dest: "{{ zuul.executor.work_root }}/artifacts" - when: zuul_success | bool - -- hosts: localhost - roles: - - add-fileserver - -- hosts: "{{ fileserver.fqdn }}" - gather_facts: False - tasks: - - name: Upload docs to static site - synchronize: - src: "{{ zuul.executor.work_root }}/artifacts/" - dest: "{{ fileserver.path }}/{{ static_target }}/" - when: zuul_success | bool diff --git a/playbooks/publish/static.yaml b/playbooks/publish/static.yaml index 328e53dacd..2b1bbad8b8 100644 --- a/playbooks/publish/static.yaml +++ b/playbooks/publish/static.yaml @@ -16,5 +16,5 @@ - name: Upload docs to static site synchronize: src: "{{ zuul.executor.work_root }}/artifacts/" - dest: "{{ fileserver.path }}/{{ zuul.project.short_name }}/" + dest: "{{ fileserver.path }}/{{ static_target }}/" when: zuul_success | bool diff --git a/zuul.d/jobs.yaml b/zuul.d/jobs.yaml index 721a165f93..3f4ae0625a 100644 --- a/zuul.d/jobs.yaml +++ b/zuul.d/jobs.yaml @@ -589,10 +589,18 @@ - job: name: base-publish-static abstract: true + protected: true description: | Base job for jobs that publish content to static.openstack.org. + + Jobs need to set the variable ``static_target`` for site to + publish to. pre-run: playbooks/sphinx/pre.yaml run: playbooks/sphinx/run.yaml + post-run: playbooks/publish/static.yaml + secrets: + - name: fileserver + secret: static_ssh_key - job: name: publish-static @@ -601,12 +609,9 @@ Publish content to static.openstack.org to /srv/static/{{ zuul.project.short_name }} final: true - post-run: playbooks/publish/static.yaml vars: + static_target: "{{ zuul.project.short_name }}" sphinx_python: python3 - secrets: - - name: fileserver - secret: static_ssh_key - job: name: publish-governance-sigs @@ -614,14 +619,10 @@ description: | Publish content to static.openstack.org to /srv/static/sigs final: true - post-run: playbooks/publish/static-special.yaml allowed-projects: - openstack/governance-sigs vars: static_target: sigs - secrets: - - name: fileserver - secret: static_ssh_key - job: name: publish-governance-tc @@ -629,15 +630,11 @@ description: | Publish content to static.openstack.org to /srv/static/tc final: true - post-run: playbooks/publish/static-special.yaml allowed-projects: - openstack/governance vars: static_target: tc sphinx_python: python3 - secrets: - - name: fileserver - secret: static_ssh_key - job: name: publish-governance-uc @@ -645,14 +642,10 @@ description: | Publish content to static.openstack.org to /srv/static/uc final: true - post-run: playbooks/publish/static-special.yaml allowed-projects: - openstack/governance-uc vars: static_target: uc - secrets: - - name: fileserver - secret: static_ssh_key - job: name: publish-governance-website @@ -660,14 +653,10 @@ description: | Publish content to static.openstack.org to /srv/static/governance final: true - post-run: playbooks/publish/static-special.yaml allowed-projects: - openstack/governance-website vars: static_target: governance - secrets: - - name: fileserver - secret: static_ssh_key - job: name: publish-security @@ -675,14 +664,10 @@ description: | Publish content to static.openstack.org to /srv/static/security final: true - post-run: playbooks/publish/static-special.yaml allowed-projects: - openstack/ossa vars: static_target: security - secrets: - - name: fileserver - secret: static_ssh_key - job: name: publish-openstack-manuals-base