Verify API proxy after preview deployment
Verify mini program and deploy preview / verify-deploy (push) Successful in 25s
Verify mini program and deploy preview / verify-deploy (push) Successful in 25s
This commit is contained in:
@@ -45,9 +45,15 @@ jobs:
|
||||
docker run -d --name pk-lab-xhs-preview --restart unless-stopped --network pk-lab-public --read-only --tmpfs /var/cache/nginx --tmpfs /var/run -p "$DEPLOY_PORT:8080" "pk-lab-xhs:$SOURCE_REVISION"
|
||||
for i in 1 2 3 4 5 6 7 8 9 10; do
|
||||
status="$(docker inspect --format '{{.State.Health.Status}}' pk-lab-xhs-preview)"
|
||||
[ "$status" = healthy ] && exit 0
|
||||
[ "$status" = healthy ] && break
|
||||
[ "$status" = unhealthy ] && break
|
||||
sleep 2
|
||||
done
|
||||
test "$(docker inspect --format '{{.State.Health.Status}}' pk-lab-xhs-preview)" = healthy
|
||||
for i in 1 2 3 4 5 6 7 8 9 10; do
|
||||
docker exec pk-lab-xhs-preview wget -q -O- http://127.0.0.1:8080/api/v1/tests >/dev/null && exit 0
|
||||
sleep 2
|
||||
done
|
||||
docker logs pk-lab-xhs-preview
|
||||
docker network inspect pk-lab-public
|
||||
exit 1
|
||||
|
||||
Reference in New Issue
Block a user