Commit 49afcdf4 authored by Ruben ten Hove's avatar Ruben ten Hove
Browse files

Merge branch 'warns' into 'main'

fix: warn on unset variables

See merge request just-ci/templates!166
parents bd8120e1 af203fa1
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -9,6 +9,7 @@ variables:
  GITLAB_RECOMMENDED_AUTO_FIX: "true"
  RELEASE_CHANGELOG: "false"
  FF_SCRIPT_SECTIONS: "true"
  I_DONT_PIN_MY_VERSIONS: because we always test latest here

include:
  - local: pipelines/project-automation.yml
+18 −0
Original line number Diff line number Diff line
@@ -46,3 +46,21 @@ image:
    paths:
      - pip-log.txt
    when: always

python:PIN-VERSION:
  image: docker.io/alpine:latest
  stage: .pre
  variables:
    GIT_STRATEGY: none
  script:
    - |
      echo "PYVERSION is set to '${PYVERSION}'. You should pin your python
      version for these jobs based on the python version chosen for your
      package."
      echo "For example 'PYVERSION: 3.10-slim'"
      echo "You can disable this warning by setting the variable
      I_DONT_PIN_MY_VERSIONS."
    - exit 1
  allow_failure: true
  rules:
    - if: '$I_DONT_PIN_MY_VERSIONS == null && $PYVERSION !~ /^3\.[0-9]{1,2}.*$/'