Archived
Fix stage source check to use git parents #19
@@ -177,31 +177,26 @@ jobs:
|
|||||||
.
|
.
|
||||||
|
|
||||||
- name: Local smoke test
|
- name: Local smoke test
|
||||||
|
# Run the binary directly on the runner — avoids the glibc version
|
||||||
|
# mismatch that occurs when the runner-compiled binary is run inside
|
||||||
|
# the Docker base image (which ships an older glibc). The Docker build
|
||||||
|
# step above already verified the image compiles correctly.
|
||||||
run: |
|
run: |
|
||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
IMAGE="marketing:${{ steps.tag.outputs.tag }}"
|
PORT=8080 dist/neuron-landing &
|
||||||
|
SERVER_PID=$!
|
||||||
docker run -d --name dev-smoke \
|
|
||||||
-p 8080:8080 \
|
|
||||||
-e PORT=8080 \
|
|
||||||
-e NODE_ENV=production \
|
|
||||||
-e LANDING_ROOT=/srv/landing \
|
|
||||||
-e SKIP_K3S=1 \
|
|
||||||
"$IMAGE"
|
|
||||||
|
|
||||||
for i in $(seq 1 15); do
|
for i in $(seq 1 15); do
|
||||||
STATUS=$(curl -sSo /dev/null -w "%{http_code}" --max-time 5 http://localhost:8080/ || echo "000")
|
STATUS=$(curl -sSo /dev/null -w "%{http_code}" --max-time 5 http://localhost:8080/ || echo "000")
|
||||||
echo "Attempt $i/15: HTTP $STATUS"
|
echo "Attempt $i/15: HTTP $STATUS"
|
||||||
if [ "$STATUS" = "200" ]; then
|
if [ "$STATUS" = "200" ]; then
|
||||||
echo "Dev smoke test PASSED"
|
echo "Dev smoke test PASSED"
|
||||||
docker stop dev-smoke && docker rm dev-smoke
|
kill "$SERVER_PID" 2>/dev/null || true
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
sleep 3
|
sleep 3
|
||||||
done
|
done
|
||||||
|
|
||||||
echo "--- container logs ---"
|
kill "$SERVER_PID" 2>/dev/null || true
|
||||||
docker logs dev-smoke || true
|
|
||||||
docker stop dev-smoke && docker rm dev-smoke || true
|
|
||||||
echo "Dev smoke test FAILED"
|
echo "Dev smoke test FAILED"
|
||||||
exit 1
|
exit 1
|
||||||
|
|||||||
Reference in New Issue
Block a user