From 5354245205010af86fded4939c8d33096bfb175e Mon Sep 17 00:00:00 2001
From: Julian Rother <julian@cccv.de>
Date: Fri, 20 Oct 2023 00:39:28 +0200
Subject: [PATCH] CI testing for Debian Bookworm

---
 .gitlab-ci.yml | 28 +++++++++++++++++++++++++++-
 1 file changed, 27 insertions(+), 1 deletion(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 9810d72..e409302 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -1,4 +1,4 @@
-image: registry.git.cccv.de/uffd/docker-images/buster
+image: registry.git.cccv.de/uffd/docker-images/bookworm
 
 variables:
   DEBIAN_FRONTEND: noninteractive
@@ -61,6 +61,22 @@ 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 # this force-updates jinja2 and some other packages!
+  - pip3 install -r requirements.txt
+  - python3 -m pylint --exit-zero --rcfile .pylintrc --output-format=pylint_gitlab.GitlabCodeClimateReporter 'uffd-ldapd' > codeclimate.json
+  - python3 -m pylint --exit-zero --rcfile .pylintrc --output-format=pylint_gitlab.GitlabPagesHtmlReporter 'uffd-ldapd' > pylint.html
+  - python3 -m pylint --rcfile .pylintrc --output-format=text 'uffd-ldapd'
+  artifacts:
+    when: always
+    paths:
+    - pylint.html
+    reports:
+      codequality: codeclimate.json
+
 test:package:apt:buster:
   image: registry.git.cccv.de/uffd/docker-images/buster
   stage: test
@@ -79,6 +95,15 @@ test:package:apt:bullseye:
   dependencies:
   - build:apt
 
+test:package:apt:bookworm:
+  image: registry.git.cccv.de/uffd/docker-images/bookworm
+  stage: test
+  script:
+  - apt update
+  - apt -y install ./*.deb
+  dependencies:
+  - build:apt
+
 .publish:
   stage: deploy
   rules:
@@ -95,5 +120,6 @@ 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/${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}/bookworm"'
   dependencies:
   - build:apt
-- 
GitLab