Commit 10a8150e authored by Pierre Smeyers's avatar Pierre Smeyers Committed by Olivier Cedric
Browse files

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
parent f0406deb
Loading
Loading
Loading
Loading
+1 −11
Original line number Diff line number Diff line
@@ -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

+0 −32
Original line number Diff line number Diff line
@@ -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
        }
      ]
    }
  ]
}
+2 −16
Original line number Diff line number Diff line
@@ -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: