Skip to content
Snippets Groups Projects
Commit 17c87e0b authored by Julian's avatar Julian
Browse files

CI testing for Debian Bookworm

parent 0cea7c7a
No related branches found
No related tags found
No related merge requests found
Pipeline #24603 passed
image: registry.git.cccv.de/uffd/docker-images/buster image: registry.git.cccv.de/uffd/docker-images/bookworm
variables: variables:
DEBIAN_FRONTEND: noninteractive DEBIAN_FRONTEND: noninteractive
...@@ -58,14 +58,27 @@ linter:bullseye: ...@@ -58,14 +58,27 @@ linter:bullseye:
reports: reports:
codequality: codeclimate.json codequality: codeclimate.json
linter:bookworm:
image: registry.git.cccv.de/uffd/docker-images/bookworm
stage: test
script:
- pip3 install $PYLINT_PIN pylint-gitlab # this force-updates jinja2 and some other packages!
- python3 -m pylint --exit-zero --rcfile .pylintrc --output-format=pylint_gitlab.GitlabCodeClimateReporter app.py > codeclimate.json
- python3 -m pylint --exit-zero --rcfile .pylintrc --output-format=pylint_gitlab.GitlabPagesHtmlReporter app.py > pylint.html
- python3 -m pylint --rcfile .pylintrc --output-format=text app.py
artifacts:
when: always
paths:
- pylint.html
reports:
codequality: codeclimate.json
unittests:buster: unittests:buster:
image: registry.git.cccv.de/uffd/docker-images/buster image: registry.git.cccv.de/uffd/docker-images/buster
stage: test stage: test
script: script:
- python3-coverage run --include 'app.py' -m pytest --junitxml=report.xml || true - python3-coverage run --include 'app.py' -m pytest --junitxml=report.xml || true
- python3-coverage report -m
- python3-coverage html - python3-coverage html
- python3-coverage xml
artifacts: artifacts:
when: always when: always
paths: paths:
...@@ -73,20 +86,14 @@ unittests:buster: ...@@ -73,20 +86,14 @@ unittests:buster:
- htmlcov - htmlcov
expose_as: 'Coverage Report' expose_as: 'Coverage Report'
reports: reports:
coverage_report:
coverage_format: cobertura
path: coverage.xml
junit: report.xml junit: report.xml
coverage: '/^TOTAL.*\s+(\d+\%)$/'
unittests:bullseye: unittests:bullseye:
image: registry.git.cccv.de/uffd/docker-images/bullseye image: registry.git.cccv.de/uffd/docker-images/bullseye
stage: test stage: test
script: script:
- python3-coverage run --include 'app.py' -m pytest --junitxml=report.xml || true - python3-coverage run --include 'app.py' -m pytest --junitxml=report.xml || true
#- python3-coverage report -m
- python3-coverage html - python3-coverage html
#- python3-coverage xml
artifacts: artifacts:
when: always when: always
paths: paths:
...@@ -94,11 +101,28 @@ unittests:bullseye: ...@@ -94,11 +101,28 @@ unittests:bullseye:
- htmlcov - htmlcov
expose_as: 'Coverage Report' expose_as: 'Coverage Report'
reports: reports:
#coverage_report:
# coverage_format: cobertura
# path: coverage.xml
junit: report.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 'app.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:apt:buster: test:package:apt:buster:
image: registry.git.cccv.de/uffd/docker-images/buster image: registry.git.cccv.de/uffd/docker-images/buster
...@@ -124,6 +148,18 @@ test:package:apt:bullseye: ...@@ -124,6 +148,18 @@ test:package:apt:bullseye:
dependencies: dependencies:
- build:apt - build:apt
test:package:apt:bookworm:
image: registry.git.cccv.de/uffd/docker-images/bookworm
stage: test
script:
- apt -y install ./*.deb
- service uwsgi start uffd-nginxauth || ( service uwsgi status uffd-nginxauth; sleep 15; cat /var/log/uwsgi/app/uffd-nginxauth.log; )
- echo "server { listen 127.0.0.1:5000 default_server; include /etc/uffd-nginxauth/nginx.include.conf; }" > /etc/nginx/sites-enabled/uffd-nginxauth.ini
- service nginx start || ( service nginx status; nginx -t; exit 1; )
- curl -Lv http://127.0.0.1:5000/status
dependencies:
- build:apt
.publish: .publish:
stage: deploy stage: deploy
rules: rules:
...@@ -140,5 +176,6 @@ publish:apt: ...@@ -140,5 +176,6 @@ publish:apt:
- echo Update published repo for all distros - 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/${APT_REPO}/buster"' - 'curl --user "${APTLY_API_USER}:${APTLY_API_PW}" -X PUT -H "Content-Type: application/json" --data "{ }" "${APT_API_URL}/api/publish/${APT_REPO}/buster"'
- 'curl --user "${APTLY_API_USER}:${APTLY_API_PW}" -X PUT -H "Content-Type: application/json" --data "{ }" "${APT_API_URL}/api/publish/${APT_REPO}/bullseye"' - 'curl --user "${APTLY_API_USER}:${APTLY_API_PW}" -X PUT -H "Content-Type: application/json" --data "{ }" "${APT_API_URL}/api/publish/${APT_REPO}/bullseye"'
- 'curl --user "${APTLY_API_USER}:${APTLY_API_PW}" -X PUT -H "Content-Type: application/json" --data "{ }" "${APT_API_URL}/api/publish/${APT_REPO}/bookworm"'
dependencies: dependencies:
- build:apt - build:apt
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment