исправить: изолировать порты smoke-теста
This commit is contained in:
+10
-3
@@ -212,9 +212,10 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
mkdir -p .tmp
|
mkdir -p .tmp
|
||||||
cat > .tmp/community-smoke.env <<'EOF'
|
cat > .tmp/community-smoke.env <<'EOF'
|
||||||
COMPOSE_PROJECT_NAME=crank-ci-smoke
|
COMPOSE_PROJECT_NAME=crank-ci-smoke-${{ github.run_id }}-${{ github.run_attempt }}
|
||||||
POSTGRES_HOST=postgres
|
POSTGRES_HOST=postgres
|
||||||
POSTGRES_PORT=5432
|
POSTGRES_PORT=5432
|
||||||
|
POSTGRES_PUBLISH_PORT=0
|
||||||
POSTGRES_DB=crank
|
POSTGRES_DB=crank
|
||||||
POSTGRES_USER=crank
|
POSTGRES_USER=crank
|
||||||
POSTGRES_PASSWORD=crank-ci-password
|
POSTGRES_PASSWORD=crank-ci-password
|
||||||
@@ -227,18 +228,24 @@ jobs:
|
|||||||
CRANK_BOOTSTRAP_ADMIN_EMAIL=owner@crank.test
|
CRANK_BOOTSTRAP_ADMIN_EMAIL=owner@crank.test
|
||||||
CRANK_BOOTSTRAP_ADMIN_PASSWORD=ci-admin-password
|
CRANK_BOOTSTRAP_ADMIN_PASSWORD=ci-admin-password
|
||||||
CRANK_BOOTSTRAP_ADMIN_DISPLAY_NAME=CI Owner
|
CRANK_BOOTSTRAP_ADMIN_DISPLAY_NAME=CI Owner
|
||||||
CRANK_BASE_URL=http://127.0.0.1:3000
|
CRANK_BASE_URL=http://127.0.0.1
|
||||||
CRANK_PUBLISH_BIND=127.0.0.1
|
CRANK_PUBLISH_BIND=127.0.0.1
|
||||||
|
CRANK_ADMIN_PUBLISH_PORT=0
|
||||||
|
CRANK_MCP_PUBLISH_PORT=0
|
||||||
|
CRANK_UI_PUBLISH_PORT=0
|
||||||
CRANK_DEMO_SEED=true
|
CRANK_DEMO_SEED=true
|
||||||
EOF
|
EOF
|
||||||
docker compose -f deploy/community/docker-compose.images.yml \
|
docker compose -f deploy/community/docker-compose.images.yml \
|
||||||
--env-file .tmp/community-smoke.env --profile local-db up -d --wait
|
--env-file .tmp/community-smoke.env --profile local-db up -d --wait
|
||||||
|
ui_address="$(docker compose -f deploy/community/docker-compose.images.yml \
|
||||||
|
--env-file .tmp/community-smoke.env port ui 3000)"
|
||||||
|
printf 'http://%s\n' "$ui_address" > .tmp/community-smoke.url
|
||||||
|
|
||||||
- name: Run authenticated Community image smoke
|
- name: Run authenticated Community image smoke
|
||||||
env:
|
env:
|
||||||
CRANK_STAGING_ADMIN_EMAIL: owner@crank.test
|
CRANK_STAGING_ADMIN_EMAIL: owner@crank.test
|
||||||
CRANK_STAGING_ADMIN_PASSWORD: ci-admin-password
|
CRANK_STAGING_ADMIN_PASSWORD: ci-admin-password
|
||||||
run: scripts/authenticated-product-smoke.sh http://127.0.0.1:3000
|
run: scripts/authenticated-product-smoke.sh "$(cat .tmp/community-smoke.url)"
|
||||||
|
|
||||||
- name: Show Community image logs
|
- name: Show Community image logs
|
||||||
if: failure()
|
if: failure()
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ services:
|
|||||||
volumes:
|
volumes:
|
||||||
- postgres_data:/var/lib/postgresql/data
|
- postgres_data:/var/lib/postgresql/data
|
||||||
ports:
|
ports:
|
||||||
- "${POSTGRES_PUBLISH_BIND:-127.0.0.1}:5432:5432"
|
- "${POSTGRES_PUBLISH_BIND:-127.0.0.1}:${POSTGRES_PUBLISH_PORT:-5432}:5432"
|
||||||
healthcheck:
|
healthcheck:
|
||||||
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER:-crank} -d ${POSTGRES_DB:-crank}"]
|
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER:-crank} -d ${POSTGRES_DB:-crank}"]
|
||||||
interval: 10s
|
interval: 10s
|
||||||
@@ -27,7 +27,7 @@ services:
|
|||||||
volumes:
|
volumes:
|
||||||
- valkey_data:/data
|
- valkey_data:/data
|
||||||
ports:
|
ports:
|
||||||
- "${VALKEY_PUBLISH_BIND:-127.0.0.1}:6379:6379"
|
- "${VALKEY_PUBLISH_BIND:-127.0.0.1}:${VALKEY_PUBLISH_PORT:-6379}:6379"
|
||||||
healthcheck:
|
healthcheck:
|
||||||
test: ["CMD", "valkey-cli", "ping"]
|
test: ["CMD", "valkey-cli", "ping"]
|
||||||
interval: 10s
|
interval: 10s
|
||||||
@@ -95,7 +95,7 @@ services:
|
|||||||
volumes:
|
volumes:
|
||||||
- artifact_storage:${CRANK_STORAGE_ROOT:-/var/lib/crank/storage}
|
- artifact_storage:${CRANK_STORAGE_ROOT:-/var/lib/crank/storage}
|
||||||
ports:
|
ports:
|
||||||
- "${CRANK_PUBLISH_BIND:-127.0.0.1}:3001:3001"
|
- "${CRANK_PUBLISH_BIND:-127.0.0.1}:${CRANK_ADMIN_PUBLISH_PORT:-3001}:3001"
|
||||||
healthcheck:
|
healthcheck:
|
||||||
test: ["CMD", "curl", "--fail", "http://127.0.0.1:3001/ready"]
|
test: ["CMD", "curl", "--fail", "http://127.0.0.1:3001/ready"]
|
||||||
interval: 15s
|
interval: 15s
|
||||||
@@ -156,7 +156,7 @@ services:
|
|||||||
volumes:
|
volumes:
|
||||||
- artifact_storage:${CRANK_STORAGE_ROOT:-/var/lib/crank/storage}
|
- artifact_storage:${CRANK_STORAGE_ROOT:-/var/lib/crank/storage}
|
||||||
ports:
|
ports:
|
||||||
- "${CRANK_PUBLISH_BIND:-127.0.0.1}:3002:3002"
|
- "${CRANK_PUBLISH_BIND:-127.0.0.1}:${CRANK_MCP_PUBLISH_PORT:-3002}:3002"
|
||||||
healthcheck:
|
healthcheck:
|
||||||
test: ["CMD", "curl", "--fail", "http://127.0.0.1:3002/ready"]
|
test: ["CMD", "curl", "--fail", "http://127.0.0.1:3002/ready"]
|
||||||
interval: 15s
|
interval: 15s
|
||||||
@@ -167,7 +167,7 @@ services:
|
|||||||
image: ${CRANK_UI_IMAGE:-git.itexp.me/bsodfather/crank-community-ui:main}
|
image: ${CRANK_UI_IMAGE:-git.itexp.me/bsodfather/crank-community-ui:main}
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
ports:
|
ports:
|
||||||
- "${CRANK_PUBLISH_BIND:-127.0.0.1}:3000:3000"
|
- "${CRANK_PUBLISH_BIND:-127.0.0.1}:${CRANK_UI_PUBLISH_PORT:-3000}:3000"
|
||||||
healthcheck:
|
healthcheck:
|
||||||
test: ["CMD", "wget", "-qO-", "http://127.0.0.1:3000/"]
|
test: ["CMD", "wget", "-qO-", "http://127.0.0.1:3000/"]
|
||||||
interval: 15s
|
interval: 15s
|
||||||
|
|||||||
@@ -75,7 +75,7 @@ services:
|
|||||||
volumes:
|
volumes:
|
||||||
- artifact_storage:${CRANK_STORAGE_ROOT:-/var/lib/crank/storage}
|
- artifact_storage:${CRANK_STORAGE_ROOT:-/var/lib/crank/storage}
|
||||||
ports:
|
ports:
|
||||||
- "${CRANK_PUBLISH_BIND:-127.0.0.1}:3001:3001"
|
- "${CRANK_PUBLISH_BIND:-127.0.0.1}:${CRANK_ADMIN_PUBLISH_PORT:-3001}:3001"
|
||||||
healthcheck:
|
healthcheck:
|
||||||
test: ["CMD", "curl", "--fail", "http://127.0.0.1:3001/ready"]
|
test: ["CMD", "curl", "--fail", "http://127.0.0.1:3001/ready"]
|
||||||
interval: 15s
|
interval: 15s
|
||||||
@@ -135,7 +135,7 @@ services:
|
|||||||
volumes:
|
volumes:
|
||||||
- artifact_storage:${CRANK_STORAGE_ROOT:-/var/lib/crank/storage}
|
- artifact_storage:${CRANK_STORAGE_ROOT:-/var/lib/crank/storage}
|
||||||
ports:
|
ports:
|
||||||
- "${CRANK_PUBLISH_BIND:-127.0.0.1}:3002:3002"
|
- "${CRANK_PUBLISH_BIND:-127.0.0.1}:${CRANK_MCP_PUBLISH_PORT:-3002}:3002"
|
||||||
healthcheck:
|
healthcheck:
|
||||||
test: ["CMD", "curl", "--fail", "http://127.0.0.1:3002/ready"]
|
test: ["CMD", "curl", "--fail", "http://127.0.0.1:3002/ready"]
|
||||||
interval: 15s
|
interval: 15s
|
||||||
@@ -149,7 +149,7 @@ services:
|
|||||||
dockerfile: apps/ui/Dockerfile
|
dockerfile: apps/ui/Dockerfile
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
ports:
|
ports:
|
||||||
- "${CRANK_PUBLISH_BIND:-127.0.0.1}:3000:3000"
|
- "${CRANK_PUBLISH_BIND:-127.0.0.1}:${CRANK_UI_PUBLISH_PORT:-3000}:3000"
|
||||||
healthcheck:
|
healthcheck:
|
||||||
test: ["CMD", "wget", "-qO-", "http://127.0.0.1:3000/"]
|
test: ["CMD", "wget", "-qO-", "http://127.0.0.1:3000/"]
|
||||||
interval: 15s
|
interval: 15s
|
||||||
|
|||||||
Reference in New Issue
Block a user