From 9b2f2ded5c630f637a0af942347342f2c1d1b97e Mon Sep 17 00:00:00 2001 From: "James E. Blair" Date: Thu, 22 Mar 2018 10:05:17 -0700 Subject: [PATCH] Add publish-zuul-docs job This publishes zuul-related project documentation to zuul-ci.org. Change-Id: Ia23f8784873a165ff171dce2cb61fff6694bf13b --- playbooks/publish/zuul-afs.yaml | 2 +- zuul.d/zuul-jobs.yaml | 32 ++++++++++++++++++++++++++++++++ 2 files changed, 33 insertions(+), 1 deletion(-) diff --git a/playbooks/publish/zuul-afs.yaml b/playbooks/publish/zuul-afs.yaml index 413efa4fd4..d39bba8db3 100644 --- a/playbooks/publish/zuul-afs.yaml +++ b/playbooks/publish/zuul-afs.yaml @@ -3,7 +3,7 @@ - role: create-afs-token when: zuul_success | bool - role: upload-afs - afs_target: "/afs/.openstack.org/project/zuul-ci.org/www" + afs_target: "/afs/.openstack.org/project/zuul-ci.org/www{{ afs_subpath | default('') }}" when: zuul_success | bool - role: destroy-afs-token when: zuul_success | bool diff --git a/zuul.d/zuul-jobs.yaml b/zuul.d/zuul-jobs.yaml index 4b6b1b8a0d..3f82ed7ce0 100644 --- a/zuul.d/zuul-jobs.yaml +++ b/zuul.d/zuul-jobs.yaml @@ -2,6 +2,8 @@ name: publish-zuul-website description: | Publishes content in artifacts/ to the Zuul website. + # Set final to avoid override of afs_subpath variable. + final: True allowed-projects: - openstack-infra/zuul-website post-run: @@ -11,3 +13,33 @@ secrets: - secret: afsdocs_secret name: afs + +- job: + name: publish-zuul-docs + description: | + Publish the results of a sphink build to + /afs/.openstack.org/project/zuul-ci.org/www/docs/{{ zuul.project.short_name }} + + Builds the docs using Sphinx with Python3. + # Set final to avoid override of afs_subpath variable. + final: true + allowed-projects: + - openstack-infra/nodepool + - openstack-infra/zuul + - openstack-infra/zuul-jobs + - openstack-infra/zuul-base-jobs + - openstack-infra/zuul-sphinx + pre-run: playbooks/sphinx/pre.yaml + run: playbooks/sphinx/run.yaml + post-run: + - playbooks/sphinx/post-infra.yaml + - playbooks/publish/zuul-afs.yaml + roles: + - zuul: openstack-infra/zuul-jobs + - zuul: openstack-infra/openstack-zuul-jobs + secrets: + - secret: afsdocs_secret + name: afs + vars: + afs_subpath: "/docs/{{ zuul.project.short_name }}" + sphinx_python: python3