diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 95fc245395cadef8f92eac4be14dd7892b4ea99d..fa92160473e26740f6e31cc7cbffbb6a682185eb 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,9 +1,8 @@ -image: registry.git.cccv.de/uffd/docker-images/buster +image: registry.git.cccv.de/uffd/docker-images/bookworm variables: DEBIAN_FRONTEND: noninteractive GIT_SUBMODULE_STRATEGY: normal - PYTHONPATH: deps/ldapalchemy APT_API_URL: https://packages.cccv.de APT_REPO: uffd PYLINT_PIN: pylint~=2.16.2 @@ -80,14 +79,27 @@ linter:bullseye: reports: codequality: codeclimate.json +linter:bookworm: + image: registry.git.cccv.de/uffd/docker-images/bookworm + stage: test + script: + - pip3 install $PYLINT_PIN pylint-gitlab + - python3 -m pylint --exit-zero --rcfile .pylintrc --output-format=pylint_gitlab.GitlabCodeClimateReporter ldapserver > codeclimate.json + - python3 -m pylint --exit-zero --rcfile .pylintrc --output-format=pylint_gitlab.GitlabPagesHtmlReporter ldapserver > pylint.html + - python3 -m pylint --rcfile .pylintrc --output-format=text ldapserver + artifacts: + when: always + paths: + - pylint.html + reports: + codequality: codeclimate.json + unittests:buster: image: registry.git.cccv.de/uffd/docker-images/buster stage: test script: - python3-coverage run --include 'ldapserver/*.py' -m pytest --junitxml=report.xml || true - - python3-coverage report -m - python3-coverage html - - python3-coverage xml artifacts: when: always paths: @@ -95,20 +107,14 @@ unittests:buster: - htmlcov expose_as: 'Coverage Report' reports: - coverage_report: - coverage_format: cobertura - path: coverage.xml junit: report.xml - coverage: '/^TOTAL.*\s+(\d+\%)$/' unittests:bullseye: image: registry.git.cccv.de/uffd/docker-images/bullseye stage: test script: - python3-coverage run --include 'ldapserver/*.py' -m pytest --junitxml=report.xml || true - #- python3-coverage report -m - python3-coverage html - #- python3-coverage xml artifacts: when: always paths: @@ -116,11 +122,28 @@ unittests:bullseye: - htmlcov expose_as: 'Coverage Report' reports: - #coverage_report: - # coverage_format: cobertura - # path: coverage.xml junit: report.xml - #coverage: '/^TOTAL.*\s+(\d+\%)$/' + +unittests:bookworm: + image: registry.git.cccv.de/uffd/docker-images/bookworm + stage: test + script: + - python3-coverage run --include 'ldapserver/*.py' -m pytest --junitxml=report.xml || true + - python3-coverage report -m + - python3-coverage html + - python3-coverage xml + artifacts: + when: always + paths: + - htmlcov/index.html + - htmlcov + expose_as: 'Coverage Report' + reports: + coverage_report: + coverage_format: cobertura + path: coverage.xml + junit: report.xml + coverage: '/^TOTAL.*\s+(\d+\%)$/' test:package:pip:buster: image: registry.git.cccv.de/uffd/docker-images/buster @@ -138,6 +161,14 @@ test:package:pip:bullseye: dependencies: - build:pip +test:package:pip:bookworm: + image: registry.git.cccv.de/uffd/docker-images/bookworm + stage: test + script: + - pip3 install dist/*.tar.gz + dependencies: + - build:pip + test:package:apt:buster: image: registry.git.cccv.de/uffd/docker-images/buster stage: test @@ -154,6 +185,14 @@ test:package:apt:bullseye: dependencies: - build:apt +test:package:apt:bookworm: + image: registry.git.cccv.de/uffd/docker-images/bookworm + stage: test + script: + - apt -y install ./*.deb + dependencies: + - build:apt + .publish: stage: deploy rules: @@ -178,6 +217,7 @@ publish:apt: - echo Update published repo for all distros - 'curl --user "${APTLY_API_USER}:${APTLY_API_PW}" -X PUT -H "Content-Type: application/json" --data "{ }" "${APT_API_URL}/api/publish/uffd/buster"' - 'curl --user "${APTLY_API_USER}:${APTLY_API_PW}" -X PUT -H "Content-Type: application/json" --data "{ }" "${APT_API_URL}/api/publish/uffd/bullseye"' + - 'curl --user "${APTLY_API_USER}:${APTLY_API_PW}" -X PUT -H "Content-Type: application/json" --data "{ }" "${APT_API_URL}/api/publish/uffd/bookworm"' dependencies: - build:apt