From 10a8150e1d9d43f42458846e13aec19db68cccd8 Mon Sep 17 00:00:00 2001 From: Pierre Smeyers <pierre.smeyers@gmail.com> Date: Thu, 4 Nov 2021 15:08:43 +0100 Subject: [PATCH] refacto(py-doc): remove Python doc build BREAKING CHANGE: doc job removed this job has to been rewritten : - it is in a wrong stage - needs an other tool (make) - generated doc is not publish anywhere - no ability to choise doc generation tool in to-be-continuous, there is mkdocs template which is able to generate python doc too # Conflicts: # templates/gitlab-ci-python.yml --- README.md | 12 +----------- kicker.json | 32 -------------------------------- templates/gitlab-ci-python.yml | 18 ++---------------- 3 files changed, 3 insertions(+), 59 deletions(-) diff --git a/README.md b/README.md index 94c6b87..a3a4d84 100644 --- a/README.md +++ b/README.md @@ -280,17 +280,7 @@ If you want to automatically create tag and publish your Python package, please #### `py-docs` job -This job is **disabled by default** and performs documentation generation of your Python code using [Sphinx](http://www.sphinx-doc.org/en/master/). Documentation will be available through a GitLab artifact. - -It is bound to the `publish` stage, applies only on tags and uses the following variables: - -| Name | description | default value | -| ------------------------ | -------------------------------------------------------------------------------------- | --------------------------------- | -| `DOCS_ENABLED` | Set to `true` to enable pages job | _none_ (disabled) | -| `DOCS_REQUIREMENTS_FILE` | Python dependencies for documentation generation _(relative to `$PYTHON_PROJECT_DIR`)_ | `docs-requirements.txt` | -| `DOCS_DIRECTORY` | Directory containing docs source | `docs` | -| `DOCS_BUILD_DIR` | Output build directory for documentation | `public` | -| `DOCS_MAKE_ARGS` | Args of make command | `html BUILDDIR=${DOCS_BUILD_DIR}` | +This job is no longer supported in this version of the template. It might come back later on with a more generic & configurable implementation. ## GitLab compatibility diff --git a/kicker.json b/kicker.json index ae86c1e..1ef8d24 100644 --- a/kicker.json +++ b/kicker.json @@ -215,38 +215,6 @@ "mandatory": true } ] - }, - { - "id": "docs", - "name": "Docs", - "description": "Documentation generation of your python code using [Sphinx](http://www.sphinx-doc.org/en/master/). Documentation will be available through a gitlab artifact.", - "enable_with": "DOCS_ENABLED", - "variables": [ - { - "name": "DOCS_REQUIREMENTS_FILE", - "description": "Python dependencies for documentation generation _(relative to `$PYTHON_PROJECT_DIR`)_", - "default": "docs-requirements.txt", - "advanced": true - }, - { - "name": "DOCS_DIRECTORY", - "description": "Directory containing docs source", - "default": "docs", - "advanced": true - }, - { - "name": "DOCS_BUILD_DIR", - "description": "Output build directory for documentation", - "default": "public", - "advanced": true - }, - { - "name": "DOCS_MAKE_ARGS", - "description": "Args of make command", - "default": "html BUILDDIR=${DOCS_BUILD_DIR}", - "advanced": true - } - ] } ] } diff --git a/templates/gitlab-ci-python.yml b/templates/gitlab-ci-python.yml index 59329dc..9c4bcf0 100644 --- a/templates/gitlab-ci-python.yml +++ b/templates/gitlab-ci-python.yml @@ -618,22 +618,8 @@ py-publish: rules: # on tags with $TWINE_USERNAME set - if: '$TWINE_USERNAME && $CI_COMMIT_TAG' -# (on tag creation): generates the documentation -py-docs: - extends: .python-base - stage: publish - script: - - install_doc_requirements - - run_python -m pip install -U sphinx - - cd ${DOCS_DIRECTORY} - - make ${DOCS_MAKE_ARGS} - artifacts: - name: "$CI_JOB_NAME artifacts from $CI_PROJECT_NAME on $CI_COMMIT_REF_SLUG" - paths: - - ${DOCS_DIRECTORY}/$DOCS_BUILD_DIR - rules: - # on tags with $DOCS_ENABLED set - - if: '$DOCS_ENABLED == "true" && $CI_COMMIT_TAG' + + # (manual from master branch): triggers a release (tag creation) py-release: -- GitLab