From 3ea745fc46780e915aee412d178ec87700024980 Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Wed, 2 Oct 2019 19:43:19 +0200 Subject: [PATCH] Add docs templates Add project-templates for: * Building documents * Building documents and publishing them after each change Use the new publish project-template for this repo, put the config in a separate file to find it easier. Update description of opendev-promote-docs. Change-Id: Id76a751feb152afe8fca0893d9e0013440c51401 --- zuul.d/jobs.yaml | 21 ++++++--------------- zuul.d/project-templates.yaml | 28 ++++++++++++++++++++++++++++ zuul.d/project.yaml | 11 +++++++++++ 3 files changed, 45 insertions(+), 15 deletions(-) create mode 100644 zuul.d/project-templates.yaml create mode 100644 zuul.d/project.yaml diff --git a/zuul.d/jobs.yaml b/zuul.d/jobs.yaml index 762bfea..928a505 100644 --- a/zuul.d/jobs.yaml +++ b/zuul.d/jobs.yaml @@ -363,6 +363,12 @@ Use this in the promote pipeline to publish a branch tip tarball built in the gate pipeline. + + The documentation tarball is published to + https://docs.opendev.org/{{ zuul.project.name }}. + + Publishes depending on branch to latest/ (for master), or the + basename of the branch like train (for stable/train). vars: download_artifact_job: opendev-tox-docs secrets: @@ -461,18 +467,3 @@ secrets: - secret: opendev-pypi name: pypi_info - -- project: - check: - jobs: - - opendev-tox-docs - - tox-linters: - required-projects: zuul/zuul-jobs - gate: - jobs: - - opendev-tox-docs - - tox-linters: - required-projects: zuul/zuul-jobs - promote: - jobs: - - opendev-promote-docs diff --git a/zuul.d/project-templates.yaml b/zuul.d/project-templates.yaml new file mode 100644 index 0000000..d6b32a8 --- /dev/null +++ b/zuul.d/project-templates.yaml @@ -0,0 +1,28 @@ +- project-template: + name: build-opendev-tox-docs + description: | + Build documentation with "tox". + check: + jobs: + - opendev-tox-docs + gate: + jobs: + - opendev-tox-docs + +- project-template: + name: publish-opendev-tox-docs + description: | + Build and publish documentation with "tox". + + The documents that are build in the "gate" pipeline + are published via a promote job to + https://docs.opendev.org/{{ zuul.project.name }}. + check: + jobs: + - opendev-tox-docs + gate: + jobs: + - opendev-tox-docs + promote: + jobs: + - opendev-promote-docs diff --git a/zuul.d/project.yaml b/zuul.d/project.yaml new file mode 100644 index 0000000..2e003ae --- /dev/null +++ b/zuul.d/project.yaml @@ -0,0 +1,11 @@ +- project: + templates: + - publish-opendev-tox-docs + check: + jobs: + - tox-linters: + required-projects: zuul/zuul-jobs + gate: + jobs: + - tox-linters: + required-projects: zuul/zuul-jobs