Skip to content

Commit 1c45af1

Browse files
committed
chore: Fix container-based unit-tests and add support for Debian 13 and RHEL 10
1 parent bd38fe0 commit 1c45af1

File tree

32 files changed

+244
-52
lines changed

32 files changed

+244
-52
lines changed

CHANGELOG.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,8 @@ Assets:
4848

4949
Build, CI/CD:
5050

51-
* Add build targets for Debian 13 and Rocky 10
5251
* Change to official, up-to-date Rocky Linux containers for building RPMs ([Motivation](https://hub.docker.com/_/rockylinux#important-note))
53-
* Build Debian 13, Rocky 10 packages by default in GitHub workflows
52+
* Build Debian 13 and Rocky 10 packages by default in GitHub workflows
5453

5554

5655
Icinga Director:

check-plugins/cpu-usage/unit-test/containerfiles/archlinux-vlatest

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ ADD https://raw.githubusercontent.com/Linuxfabrik/monitoring-plugins/refs/heads/
1616
RUN python -m venv /tmp/venv && \
1717
. /tmp/venv/bin/activate && \
1818
python -m pip install --upgrade pip && \
19-
python -m pip install --no-cache-dir --requirement requirements.txt --require-hashes
19+
python -m pip install --no-cache-dir --requirement requirements.txt --require-hashes --no-deps
2020

2121
# Verify Python installation
2222
RUN /tmp/venv/bin/python --version

check-plugins/cpu-usage/unit-test/containerfiles/debian-v11

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ ADD https://raw.githubusercontent.com/Linuxfabrik/monitoring-plugins/refs/heads/
1515

1616
# Install dependencies using pip
1717
RUN python3 -m pip install --upgrade pip && \
18-
python3 -m pip install --no-cache-dir --requirement requirements.txt --require-hashes
18+
python3 -m pip install --no-cache-dir --requirement requirements.txt --require-hashes --no-deps
1919

2020
# Verify Python installation
2121
RUN python3 --version

check-plugins/cpu-usage/unit-test/containerfiles/debian-v12

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ ADD https://raw.githubusercontent.com/Linuxfabrik/monitoring-plugins/refs/heads/
1717
RUN python3 -m venv /tmp/venv && \
1818
. /tmp/venv/bin/activate && \
1919
python3 -m pip install --upgrade pip && \
20-
python3 -m pip install --no-cache-dir --requirement requirements.txt --require-hashes
20+
python3 -m pip install --no-cache-dir --requirement requirements.txt --require-hashes --no-deps
2121

2222
# Verify Python installation
2323
RUN python3 --version
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# Base image: Official Debian 13 (trixie)
2+
FROM debian:13
3+
4+
# Update and install Python 3 and pip
5+
RUN apt-get update && \
6+
apt-get install -y python3-full python3-pip && \
7+
apt-get clean && \
8+
rm -rf /var/lib/apt/lists/*
9+
10+
# Set the working directory in the container
11+
WORKDIR /tmp
12+
13+
# Use ADD to download the requirements.txt file
14+
ADD https://raw.githubusercontent.com/Linuxfabrik/monitoring-plugins/refs/heads/main/requirements.txt /tmp/requirements.txt
15+
16+
# Install dependencies using pip
17+
RUN python3 -m venv /tmp/venv && \
18+
. /tmp/venv/bin/activate && \
19+
python3 -m pip install --upgrade pip && \
20+
python3 -m pip install --no-cache-dir --requirement requirements.txt --no-deps
21+
22+
# Verify Python installation
23+
RUN python3 --version
24+
25+
# Default command to keep the container running
26+
CMD ["sleep", "infinity"]

check-plugins/cpu-usage/unit-test/containerfiles/fedora-v41

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ ADD https://raw.githubusercontent.com/Linuxfabrik/monitoring-plugins/refs/heads/
1313

1414
# Install dependencies using pip
1515
RUN python3 -m pip install --upgrade pip wheel setuptools && \
16-
python3 -m pip install --no-cache-dir --requirement requirements.txt --require-hashes
16+
python3 -m pip install --no-cache-dir --requirement requirements.txt --require-hashes --no-deps
1717

1818
# Verify Python installation
1919
RUN python3 --version
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# Base image: Official RHEL 10
2+
FROM registry.access.redhat.com/ubi10
3+
4+
# Install Python
5+
RUN dnf --assumeyes install --nodocs python python-pip python-devel gcc && \
6+
dnf clean all
7+
8+
# Install tools
9+
RUN dnf --assumeyes install --nodocs https://dl.fedoraproject.org/pub/epel/epel-release-latest-9.noarch.rpm && \
10+
dnf --assumeyes install --nodocs stress && \
11+
dnf clean all
12+
13+
# Set the working directory in the container
14+
WORKDIR /tmp
15+
16+
# Use ADD to download the requirements.txt file
17+
ADD https://raw.githubusercontent.com/Linuxfabrik/monitoring-plugins/refs/heads/main/requirements.txt /tmp/requirements.txt
18+
19+
# Install dependencies using pip
20+
RUN dnf --assumeyes remove python3-requests
21+
RUN python -m pip install --upgrade pip && \
22+
python -m pip install --no-cache-dir --requirement requirements.txt --no-deps
23+
24+
# Verify Python installation
25+
RUN python --version
26+
27+
# Default command to keep the container running
28+
CMD ["sleep", "infinity"]

check-plugins/cpu-usage/unit-test/containerfiles/rhel-v8

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ ADD https://raw.githubusercontent.com/Linuxfabrik/monitoring-plugins/refs/heads/
1818

1919
# Install dependencies using pip
2020
RUN python3.9 -m pip install --upgrade pip && \
21-
python3.9 -m pip install --no-cache-dir --requirement requirements.txt --require-hashes
21+
python3.9 -m pip install --no-cache-dir --requirement requirements.txt --require-hashes --no-deps
2222

2323
# Verify Python installation
2424
RUN python3.9 --version

check-plugins/cpu-usage/unit-test/containerfiles/rhel-v9

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
# Base image: Official RHEL 9
22
FROM registry.access.redhat.com/ubi9
33

4-
# Install Python 3.9
5-
RUN dnf --assumeyes install --nodocs python39 python39-pip && \
4+
# Install Python
5+
RUN dnf --assumeyes install --nodocs python python-pip python-devel gcc && \
66
dnf clean all
77

88
# Install tools
@@ -19,7 +19,7 @@ ADD https://raw.githubusercontent.com/Linuxfabrik/monitoring-plugins/refs/heads/
1919
# Install dependencies using pip
2020
RUN dnf --assumeyes remove python3-requests
2121
RUN python3.9 -m pip install --upgrade pip && \
22-
python3.9 -m pip install --no-cache-dir --requirement requirements.txt --require-hashes
22+
python3.9 -m pip install --no-cache-dir --requirement requirements.txt --require-hashes --no-deps
2323

2424
# Verify Python installation
2525
RUN python3.9 --version

check-plugins/cpu-usage/unit-test/containerfiles/ubuntu-v2004

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ ADD https://raw.githubusercontent.com/Linuxfabrik/monitoring-plugins/refs/heads/
2020
RUN python3.9 -m venv /tmp/venv && \
2121
. /tmp/venv/bin/activate && \
2222
python3.9 -m pip install --upgrade pip && \
23-
python3.9 -m pip install --no-cache-dir --requirement requirements.txt --require-hashes
23+
python3.9 -m pip install --no-cache-dir --requirement requirements.txt --require-hashes --no-deps
2424

2525
# Verify Python installation
2626
RUN python3.9 --version

0 commit comments

Comments
 (0)