ci: use service postgres in gitea jobs
CI / Rust Checks (push) Failing after 3m47s
CI / UI Checks (push) Successful in 10s
CI / Deployment Manifests (push) Successful in 5s
Deploy / build-images (apps/admin-api/Dockerfile, git.itexp.me/bsodfather/crank-community-admin-api, admin-api) (push) Failing after 5s
Deploy / build-images (apps/mcp-server/Dockerfile, git.itexp.me/bsodfather/crank-community-mcp-server, mcp-server) (push) Failing after 6s
Deploy / build-images (apps/ui/Dockerfile, git.itexp.me/bsodfather/crank-community-ui, ui) (push) Failing after 4s
Deploy / deploy (push) Has been skipped
CI / Frontend E2E (push) Successful in 3m22s
CI / Rust Checks (push) Failing after 3m47s
CI / UI Checks (push) Successful in 10s
CI / Deployment Manifests (push) Successful in 5s
Deploy / build-images (apps/admin-api/Dockerfile, git.itexp.me/bsodfather/crank-community-admin-api, admin-api) (push) Failing after 5s
Deploy / build-images (apps/mcp-server/Dockerfile, git.itexp.me/bsodfather/crank-community-mcp-server, mcp-server) (push) Failing after 6s
Deploy / build-images (apps/ui/Dockerfile, git.itexp.me/bsodfather/crank-community-ui, ui) (push) Failing after 4s
Deploy / deploy (push) Has been skipped
CI / Frontend E2E (push) Successful in 3m22s
This commit is contained in:
@@ -14,6 +14,8 @@ GRPC_FIXTURE_BIND="${CRANK_E2E_GRPC_FIXTURE_BIND:-127.0.0.1:3311}"
|
||||
POSTGRES_DB="${CRANK_E2E_POSTGRES_DB:-crank}"
|
||||
POSTGRES_USER="${CRANK_E2E_POSTGRES_USER:-crank}"
|
||||
POSTGRES_PASSWORD="${CRANK_E2E_POSTGRES_PASSWORD:-crank}"
|
||||
POSTGRES_HOST="${CRANK_E2E_POSTGRES_HOST:-127.0.0.1}"
|
||||
USE_EXTERNAL_POSTGRES="${CRANK_E2E_USE_EXTERNAL_POSTGRES:-0}"
|
||||
ADMIN_EMAIL="${CRANK_E2E_ADMIN_EMAIL:-owner@crank.local}"
|
||||
ADMIN_PASSWORD="${CRANK_E2E_ADMIN_PASSWORD:-change-me-admin-password}"
|
||||
|
||||
@@ -58,7 +60,9 @@ cleanup() {
|
||||
kill "$(cat "$TMP_DIR/ui-server.pid")" >/dev/null 2>&1 || true
|
||||
rm -f "$TMP_DIR/ui-server.pid"
|
||||
fi
|
||||
docker rm -f "$POSTGRES_CONTAINER" >/dev/null 2>&1 || true
|
||||
if [[ "$USE_EXTERNAL_POSTGRES" != "1" ]]; then
|
||||
docker rm -f "$POSTGRES_CONTAINER" >/dev/null 2>&1 || true
|
||||
fi
|
||||
kill_port_processes "$UI_PORT"
|
||||
kill_port_processes "$ADMIN_PORT"
|
||||
kill_port_processes "$MCP_PORT"
|
||||
@@ -87,19 +91,23 @@ PY
|
||||
done
|
||||
}
|
||||
|
||||
docker run -d --rm \
|
||||
--name "$POSTGRES_CONTAINER" \
|
||||
-e POSTGRES_DB="$POSTGRES_DB" \
|
||||
-e POSTGRES_USER="$POSTGRES_USER" \
|
||||
-e POSTGRES_PASSWORD="$POSTGRES_PASSWORD" \
|
||||
-p "$POSTGRES_PORT:5432" \
|
||||
postgres:16-alpine >/dev/null
|
||||
if [[ "$USE_EXTERNAL_POSTGRES" = "1" ]]; then
|
||||
wait_for_port "$POSTGRES_HOST" "$POSTGRES_PORT"
|
||||
else
|
||||
docker run -d --rm \
|
||||
--name "$POSTGRES_CONTAINER" \
|
||||
-e POSTGRES_DB="$POSTGRES_DB" \
|
||||
-e POSTGRES_USER="$POSTGRES_USER" \
|
||||
-e POSTGRES_PASSWORD="$POSTGRES_PASSWORD" \
|
||||
-p "$POSTGRES_PORT:5432" \
|
||||
postgres:16-alpine >/dev/null
|
||||
|
||||
until docker exec "$POSTGRES_CONTAINER" pg_isready -U "$POSTGRES_USER" -d "$POSTGRES_DB" >/dev/null 2>&1; do
|
||||
sleep 1
|
||||
done
|
||||
until docker exec "$POSTGRES_CONTAINER" pg_isready -U "$POSTGRES_USER" -d "$POSTGRES_DB" >/dev/null 2>&1; do
|
||||
sleep 1
|
||||
done
|
||||
fi
|
||||
|
||||
export POSTGRES_HOST="127.0.0.1"
|
||||
export POSTGRES_HOST
|
||||
export POSTGRES_PORT="$POSTGRES_PORT"
|
||||
export POSTGRES_DB="$POSTGRES_DB"
|
||||
export POSTGRES_USER="$POSTGRES_USER"
|
||||
|
||||
Reference in New Issue
Block a user