From be6a773188c668ed5f8672085f143c02bcaa7c9e Mon Sep 17 00:00:00 2001 From: Tom Teichler <tom.teichler@teckids.org> Date: Mon, 31 Oct 2022 21:28:14 +0100 Subject: [PATCH] Add earthfile --- Earthfile | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 Earthfile diff --git a/Earthfile b/Earthfile new file mode 100644 index 0000000..56ccfa3 --- /dev/null +++ b/Earthfile @@ -0,0 +1,32 @@ +VERSION --use-copy-include-patterns 0.5 + +install-deps: + FROM debian:stable@sha256:13db79e523a13e3e55b606128a4193d7b9ae788d0c11c95d6a6de0bd30aa3a14 + +haproxy-deps: + FROM haproxy:2.4.18-bullseye@sha256:67ed10438e40db6df112c5e45ac64d69881d4e9e11254320bd946fe54cb4a0f6 + +shorewall-deps: + FROM jess/shorewall:latest@sha256:d6b7b4b01e1c0184727a49a38a9eb410ca9efe6341da84a87e7d7d96d65768f0 + USER root + +validate-haproxy: + FROM +haproxy-deps + COPY ./roles/firewall/files/haproxy.cfg /tmp/haproxy.cfg + RUN haproxy -c -V -f /tmp/haproxy.cfg + +validate-shorewall: + FROM +shorewall-deps + COPY ./roles/firewall/files/shorewall /tmp/shorewall + RUN shorewall check /tmp/shorewall + +validate-shorewall6: + FROM +shorewall-deps + COPY ./roles/firewall/files/shorewall6 /tmp/shorewall6 + RUN shorewall6 check /tmp/shorewall6 + + +test: + BUILD +validate-haproxy + BUILD +validate-shorewall + BUILD +validate-shorewall6 -- GitLab