From 999cc40cc5a699b962524f2220084259f24cdb69 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bengt=20L=C3=BCers?= Date: Wed, 3 Jan 2024 15:41:39 +0100 Subject: [PATCH] Document adding a job to GitLab CICD --- doc/source/start.rst | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/doc/source/start.rst b/doc/source/start.rst index 06a2206a3..8c6c24ee5 100644 --- a/doc/source/start.rst +++ b/doc/source/start.rst @@ -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/