Commit 97b61d85 authored by Ruben ten Hove's avatar Ruben ten Hove
Browse files

feat: pip licenses job

parent eed7755e
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -14,6 +14,7 @@ include:
  - local: "python/flake8.yml"
  - local: "python/pylic.yml"
  - local: "python/vulture.yml"
  - local: "python/poetry/pip-licenses.yml"

  - local: "c/cppcheck.yml"
  - local: "c/flawfinder.yml"
@@ -77,6 +78,13 @@ python:vulture:
  before_script:
    - cd templates_tests/python

python:poetry:pip-licenses:
  before_script:
    - cd templates_tests/python
    - pip install .
  variables:
    ALLOWED: MIT License

docker:kaniko:python-old:
  extends: docker:kaniko
  variables:
+16 −0
Original line number Diff line number Diff line
---
# Check the package page on how to configure this job
# https://pypi.org/project/pip-licenses/

python:poetry:pip-licenses:
  stage: test
  image: registry.gitlab.com/notno/python-tests:latest
  variables:
    ALLOWED: ""  # Empty means all. Semicolon separated list. See https://pypi.org/project/pip-licenses/#option-allow-only
  before_script:
    - pip install .
  script:
    - pip install pip-licenses
    - PACKAGES=$(dasel select -f pyproject.toml "tool.poetry.dependencies" | cut -d' ' -f1 | tr '\n' ' ')
    - pip-licenses --allow-only="${ALLOWED}" --packages ${PACKAGES}
  needs: []