From 86ae398e20f5674afca51ed3038cc9bc6a85685d Mon Sep 17 00:00:00 2001 From: Drew Walters Date: Wed, 19 Feb 2020 14:56:48 -0600 Subject: [PATCH] [#59] Add documentation build gate This change introduces a job to build airshipctl documentation and publish a preview for each new PS. Related #59 Change-Id: I741c59f2c1dc50e66bf3cacfc8cb385ec9ec223d Signed-off-by: Drew Walters --- playbooks/airship-airshipctl-build-docs.yaml | 18 ++++++++++++++++++ roles/airshipctl-build-docs/tasks/main.yaml | 16 ++++++++++++++++ zuul.d/jobs.yaml | 9 +++++++++ zuul.d/projects.yaml | 2 ++ 4 files changed, 45 insertions(+) create mode 100644 playbooks/airship-airshipctl-build-docs.yaml create mode 100644 roles/airshipctl-build-docs/tasks/main.yaml diff --git a/playbooks/airship-airshipctl-build-docs.yaml b/playbooks/airship-airshipctl-build-docs.yaml new file mode 100644 index 000000000..abb93cdb7 --- /dev/null +++ b/playbooks/airship-airshipctl-build-docs.yaml @@ -0,0 +1,18 @@ +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +- hosts: all + become: yes + roles: + - ensure-python + - airshipctl-build-docs + - fetch-sphinx-output diff --git a/roles/airshipctl-build-docs/tasks/main.yaml b/roles/airshipctl-build-docs/tasks/main.yaml new file mode 100644 index 000000000..244e5ce3f --- /dev/null +++ b/roles/airshipctl-build-docs/tasks/main.yaml @@ -0,0 +1,16 @@ +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +- name: Buid airshipctl Docs + shell: "make docs" + args: + chdir: "{{ zuul.project.src_dir }}" diff --git a/zuul.d/jobs.yaml b/zuul.d/jobs.yaml index 4b2e0659c..ae3b55bf5 100644 --- a/zuul.d/jobs.yaml +++ b/zuul.d/jobs.yaml @@ -10,6 +10,14 @@ # See the License for the specific language governing permissions and # limitations under the License. +- job: + name: airship-airshipctl-build-docs + nodeset: airship-airshipctl-single-node + run: playbooks/airship-airshipctl-build-docs.yaml + vars: + sphinx_build_dir: docs/build + python_version: 3.7 + - job: name: airship-airshipctl-lint-unit pre-run: playbooks/airship-airshipctl-deploy-docker.yaml @@ -66,3 +74,4 @@ - airshipctl-test-configs serve_dir: /srv/iso serve_port: 8099 + diff --git a/zuul.d/projects.yaml b/zuul.d/projects.yaml index f62ae4ba2..e6be4aa3c 100644 --- a/zuul.d/projects.yaml +++ b/zuul.d/projects.yaml @@ -13,12 +13,14 @@ - project: check: jobs: + - airship-airshipctl-build-docs - airship-airshipctl-lint-unit - airship-airshipctl-build-image - airship-airshipctl-functional-existing-k8s - airship-airshipctl-gate-test gate: jobs: + - airship-airshipctl-build-docs - airship-airshipctl-lint-unit - airship-airshipctl-build-image - airship-airshipctl-functional-existing-k8s