aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/molecule
diff options
context:
space:
mode:
authorColin Wilk <colin.wilk@tum.de>2023-05-29 21:20:16 +0200
committerColin Wilk <colin.wilk@tum.de>2023-05-29 21:50:08 +0200
commit4565318b0f305a4872967672ab22426ac1c2bc44 (patch)
treec7a33147b8ee3465f64c9fbd87f847894a488a6a /molecule
parent6d6ef19c5b04660101530468e5dcc082604eee42 (diff)
downloadansible-role-prometheus-target-4565318b0f305a4872967672ab22426ac1c2bc44.tar.gz
ansible-role-prometheus-target-4565318b0f305a4872967672ab22426ac1c2bc44.zip
Add alpine, rockylinux and fedora to testing pipeline
Add more distros to CI/CD and include them in the galaxy meta file. Signed-off-by: Colin Wilk <colin.wilk@tum.de>
Diffstat (limited to 'molecule')
-rw-r--r--molecule/default/Dockerfile.j225
1 files changed, 18 insertions, 7 deletions
diff --git a/molecule/default/Dockerfile.j2 b/molecule/default/Dockerfile.j2
index 42750e4..74be8a0 100644
--- a/molecule/default/Dockerfile.j2
+++ b/molecule/default/Dockerfile.j2
@@ -1,12 +1,23 @@
FROM {{ item.image }}
# Install dependencies.
-RUN apt-get update \
- && apt-get install -y --no-install-recommends \
- sudo wget \
- python3-pip python3-dev python3-setuptools python3-wheel python3-apt \
- && rm -rf /var/lib/apt/lists/* \
- && rm -Rf /usr/share/doc && rm -Rf /usr/share/man \
- && apt-get clean
+RUN if [ $(command -v apt-get) ]; then \
+ apt-get update \
+ && apt-get install -y --no-install-recommends \
+ sudo wget \
+ python3-pip python3-dev python3-setuptools python3-wheel python3-apt \
+ && rm -rf /var/lib/apt/lists/* \
+ && rm -Rf /usr/share/doc && rm -Rf /usr/share/man \
+ && apt-get clean; \
+ elif [ $(command -v apk) ]; then \
+ apk update && apk add --no-cache python3 sudo bash ca-certificates; \
+ elif [ $(command -v yum) ]; then \
+ yum -y update && yum -y install sudo python3; \
+ elif [ $(command -v dnf) ]; then \
+ dnf makecache && dnf --assumeyes install \
+ python sudo python-devel python3-dnf bash iproute && dnf clean all; \
+ elif [ $(command -v pacman) ]; then \
+ pacman -Syu --noconfirm python3 sudo; \
+ fi
ENTRYPOINT ["bash", "-c", "sleep infinity"]