Commit cbafc2b6 authored by Ruben ten Hove's avatar Ruben ten Hove Committed by Federico Falconieri
Browse files

docs: pinning python version

parent 8b08ed0c
Loading
Loading
Loading
Loading
+18 −3
Original line number Diff line number Diff line
@@ -80,10 +80,19 @@ is an example `.gitlab-ci.yml` importing the python template:
---
include:
  - remote: https://just-ci.gitlab.io/jobs/v6.11.0/templates/python.yml

variables:
  PYVERSION: 3.9-slim
```

The above is a template for Python projects. Other templates can be found in
`templates/`, for example:
The above is a template for Python projects. Here we also add a variable to
specify the python version your project uses. If you omit this variable, all CI
jobs are run using the latest python version. This may introduce unexpected
results, so this variable is highly recommended. You can also omit `-slim` to
use the full debian image, or replace it with `-alpine` if you intend to support
an alpine based image.

Other templates can be found in `templates/`, for example:

- Python projects with a `Dockerfile`: `templates/container/python.yml`. This
  template will use your `Dockerfile` to create an image in which we run tests.
@@ -100,6 +109,9 @@ you want you can always disable specific jobs with custom rules.
include:
  - remote: https://just-ci.gitlab.io/jobs/v6.11.0/templates/python.yml

variables:
  PYVERSION: 3.9-slim

python:pytest:
  rules:
    when: never
@@ -118,7 +130,10 @@ there has been a breaking change in `master`, use an older tag like this:
```yaml
---
include:
  - remote: https://just-ci.gitlab.io/jobs/v3.19.2/python/pylint.yml
  - remote: https://just-ci.gitlab.io/jobs/v5.1.0/python/pylint.yml

variables:
  PYVERSION: 3.7-slim
```

# Monorepo (multiple Dockerfiles) or polyrepo (one Dockerfile)