From e6c54b33e7e6499e48195cd87d501e9ac1c30c42 Mon Sep 17 00:00:00 2001 From: "Jens L." Date: Wed, 29 Jan 2025 15:58:59 +0000 Subject: [PATCH] ci: fix test_docker.sh failing due to missing .env (#12873) Signed-off-by: Jens Langhammer --- scripts/test_docker.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/scripts/test_docker.sh b/scripts/test_docker.sh index 97234f515b9a..f25b83888c20 100755 --- a/scripts/test_docker.sh +++ b/scripts/test_docker.sh @@ -1,16 +1,19 @@ #!/bin/bash set -e -x -o pipefail +hash=$(git rev-parse HEAD || openssl rand -base64 36) export PG_PASS=$(openssl rand -base64 36 | tr -d '\n') export AUTHENTIK_SECRET_KEY=$(openssl rand -base64 60 | tr -d '\n') export AUTHENTIK_IMAGE="xghcr.io/goauthentik/server" -export AUTHENTIK_TAG=$(git rev-parse HEAD | cut -c1-15) +export AUTHENTIK_TAG=$(echo $hash | cut -c1-15) export COMPOSE_PROJECT_NAME="authentik-test-${AUTHENTIK_TAG}" # Ensure buildx is installed docker buildx install # For release builds we have an empty client here as we use the NPM package mkdir -p ./gen-ts-api +touch .env + docker build -t ${AUTHENTIK_IMAGE}:${AUTHENTIK_TAG} . docker compose up --no-start docker compose start postgresql redis