Commit 026e4f09 authored by Federico Falconieri's avatar Federico Falconieri
Browse files

Merge branch 'hoverht-master-patch-70017' into 'master'

fix: improves default behaviour of python pip-outdated (see #24)

See merge request ci/templates!1
parents 2328d8f5 647bb108
Loading
Loading
Loading
Loading
+7 −7
Original line number Diff line number Diff line
@@ -8,34 +8,34 @@ downstream:python-tests:
  variables:
    TARGET_REF: ${CI_COMMIT_REF_NAME}
  trigger:
    project: utils/tests/python
    project: ci/tests/python
    strategy: depend
  rules:
    - if: $CI_COMMIT_TAG
      when: never
    - when: always

downstream:pandoc:
downstream:pages:
  stage: test
  trigger:
    project: template/report
    project: ci/tests/pages
    strategy: depend
  rules:
    - if: $CI_COMMIT_TAG
      when: never
    - changes:
        - docs/report-pandoc.yml
        - other/pages-hugo.yml

downstream:pages:
downstream:pandoc:
  stage: test
  trigger:
    project: utils/tests/pages
    project: template/report
    strategy: depend
  rules:
    - if: $CI_COMMIT_TAG
      when: never
    - changes:
        - other/pages-hugo.yml
        - docs/report-pandoc.yml

semantic-release:dry-run:
  extends: semantic-release
+26 −25
Original line number Diff line number Diff line
# Checks for installed dependencies that are not up to date.
# Checks for dependencies that are not up to date.

python:pip:outdated:
  stage: test
  image: $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_NAME
  variables:
    CHECK_ALL: "false"  # Set to true if you also want to check default packages such as pip and setuptools
    CHECK_ALL: "false"  # Set to true if you also want to check packages such as pip, setuptools and dependencies of your dependencies
  script:
    - echo "CHECK_ALL=${CHECK_ALL}"
    - OUTDATED="$(pip list --outdated --format freeze)"
    - |
      if "$CHECK_ALL" = "true"; then
@@ -16,9 +17,9 @@ python:pip:outdated:
        fi
      else
        OUTDATED_NOT_REQUIRED="$(pip list --outdated --format freeze --not-required)"
        if [ ! "$OUTDATED" = "$OUTDATED_NOT_REQUIRED" ]; then
          echo "[!] Your image has outdated packages. This list also contains non-dependencies but these weren't checked.:"
          pip list --outdated
        if [ ! -z "$OUTDATED_NOT_REQUIRED" ]; then
          echo "[!] Your image has outdated packages:"
          pip list --outdated --not-required
          exit 1
        fi
      fi