From fff60b56201b6ac84a4daf072ce1ccfb592fc295 Mon Sep 17 00:00:00 2001 From: Dominik Meyer Date: Thu, 7 Sep 2023 12:55:59 +0200 Subject: [PATCH] ADD: new approach --- .drone.yml | 9 +++++++-- Dockerfile | 2 ++ 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/.drone.yml b/.drone.yml index 70ad90f..25330f8 100644 --- a/.drone.yml +++ b/.drone.yml @@ -23,8 +23,10 @@ steps: commands: - scripts/setupEnvironment.sh - export TEA_URL=`curl -L https://gitea.com/gitea/tea/releases/latest | grep -e "tea.*linux-amd64\"" | cut -d '"' -f 6` + - sed 's/ARG.TEA_URL.*/ARG \"${TEA_URL}/\"' -i Dockerfile - cp /etc/ssl/certs2/federationHQ-CA.pem . - - buildah bud --build-arg ORG_CA_FILE=federationHQ-CA.pem --build-arg TEA_URL=${TEA_URL} --network host -t "registry.cloud.federationhq.de/tea:latest-amd64" --arch amd64 . + - sed 's/ARG.ORG_CA_FILE/ARG \/etc\/ssl\/certs2\/federationHQ-CA\.pem/' -i Dockerfile + - buildah bud --network host -t "registry.cloud.federationhq.de/tea:latest-amd64" --arch amd64 . - buildah push --all registry.cloud.federationhq.de/tea:latest-amd64 --- kind: pipeline @@ -52,10 +54,13 @@ steps: commands: - scripts/setupEnvironment.sh - export TEA_URL=`curl -L https://gitea.com/gitea/tea/releases/latest | grep -e "tea.*linux-arm64\"" | cut -d '"' -f 6` + - sed 's/ARG.TEA_URL.*/ARG \"${TEA_URL}/\"' -i Dockerfile - cp /etc/ssl/certs2/federationHQ-CA.pem . - - buildah bud --build-arg ORG_CA_FILE=federationHQ-CA.pem --build-arg TEA_URL=${TEA_URL} --network host -t "registry.cloud.federationhq.de/tea:latest-arm64" --arch arm64 . + - sed 's/ARG.ORG_CA_FILE/ARG \/etc\/ssl\/certs2\/federationHQ-CA\.pem/' -i Dockerfile + - buildah bud --network host -t "registry.cloud.federationhq.de/tea:latest-arm64" --arch arm64 . - buildah push --all registry.cloud.federationhq.de/tea:latest-arm64 --- +--- kind: pipeline type: kubernetes name: push diff --git a/Dockerfile b/Dockerfile index c69cf54..93fa663 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,6 @@ FROM alpine:latest +ARG TEA_URL="https://gitea.com/gitea/t0ea/releases/download/v0.9.2/tea-0.9.2-linux-amd64" +ARG ORG_CA_FILE="/etc/ssl/certs2/federationHQ-CA.pem" RUN apk --no-cache add ca-certificates ADD ${ORG_CA_FILE} /usr/local/share/ca-certificates