Skip to content

Commit

Permalink
Document adding a job to GitLab CICD
Browse files Browse the repository at this point in the history
  • Loading branch information
Bengt committed Jan 3, 2024
1 parent 8fa5788 commit 999cc40
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions doc/source/start.rst
Original file line number Diff line number Diff line change
Expand Up @@ -121,3 +121,24 @@ Then run ``pre-commit install`` and you're ready to go.
.. _pre-commit: https://pre-commit.com/
.. _have it installed: https://pre-commit.com/#install
.. _`real git tag/revision`: https://github.com/PyCQA/bandit/releases

GitLab CI/CD integration
------------------

To integrate Bandit with `GitLab continuous integration and delivery (CI/CD)`_,
use a job like so:

.. code-block:: yaml
bandit:
cache: {}
image:
name: cytopia/bandit:1-py3.10
entrypoint: [""]
script:
- bandit --configfile pyproject.toml -r my_package/
stage: lint_static
> **NOTE**: Adapt the package name from `my_package` to your package name.

.. _GitLab continuous integration and delivery (CI/CD): https://docs.gitlab.com/ee/ci/

0 comments on commit 999cc40

Please sign in to comment.