AGPL-3.0-only, a source link in the app, and everything on dev since #5 #6
@@ -249,8 +249,14 @@ jobs:
|
|||||||
set -eux
|
set -eux
|
||||||
echo "=== container landscape (diagnostic for the name filter) ==="
|
echo "=== container landscape (diagnostic for the name filter) ==="
|
||||||
docker ps -a --format '{{.ID}} {{.Image}} -> {{.Names}}'
|
docker ps -a --format '{{.ID}} {{.Image}} -> {{.Names}}'
|
||||||
PG=$(docker ps --filter "name=integration" --filter "ancestor=postgres:16-alpine" -q | head -n1)
|
# Only THIS job's Postgres. Other repos' integration jobs share the runner, and
|
||||||
test -n "$PG"
|
# `name=integration` alone once picked one of theirs (run 8653: a different
|
||||||
|
# password). act names a job's containers GITEA-ACTIONS-TASK-<task id>-..., and
|
||||||
|
# the job container's hostname is its own container id.
|
||||||
|
TASK=$(docker inspect -f '{{.Name}}' "$(cat /etc/hostname)" | sed -n 's|^/\(GITEA-ACTIONS-TASK-[0-9]*-\).*|\1|p')
|
||||||
|
test -n "$TASK"
|
||||||
|
PG=$(docker ps --filter "name=$TASK" --filter "ancestor=postgres:16-alpine" -q)
|
||||||
|
test "$(echo "$PG" | wc -w)" -eq 1
|
||||||
PG_IP=$(docker inspect -f '{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' "$PG")
|
PG_IP=$(docker inspect -f '{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' "$PG")
|
||||||
test -n "$PG_IP"
|
test -n "$PG_IP"
|
||||||
export INKWELL_DATABASE_URL="postgresql+asyncpg://inkwell:ci_integration@${PG_IP}:5432/inkwell_test"
|
export INKWELL_DATABASE_URL="postgresql+asyncpg://inkwell:ci_integration@${PG_IP}:5432/inkwell_test"
|
||||||
|
|||||||
Reference in New Issue
Block a user