fix staging npm ci in-container timeout
Staging Backend Quality Gate / validate (push) Successful in 16m27s
Staging Backend Quality Gate / publish (push) Failing after 55m53s

This commit is contained in:
Jesse_Chen
2026-08-09 16:06:16 +08:00
parent ffbe505c23
commit b40f3a1cf0
3 changed files with 29 additions and 9 deletions
+17 -1
View File
@@ -168,6 +168,7 @@ jobs:
"timezonefinder==8.2.5" \
-r requirements.txt -r requirements-dev.txt
workdir="$(pwd -P)"
set +e
docker run --rm \
--cpus=1.5 \
--memory=2g \
@@ -179,11 +180,26 @@ jobs:
--env HOME=/tmp \
--env "NPM_CONFIG_REGISTRY=$NPM_CONFIG_REGISTRY" \
"$NODE_TOOL_SOURCE_IMAGE" \
timeout --signal=TERM --kill-after=30s 900s \
npm ci --prefix frontend \
--no-audit \
--no-fund \
--progress=false \
--maxsockets=4
--maxsockets=4 \
--fetch-timeout=60000 \
--fetch-retries=2 \
--fetch-retry-mintimeout=1000 \
--fetch-retry-maxtimeout=10000
npm_ci_status=$?
set -e
if [ "$npm_ci_status" -eq 124 ]; then
echo "frontend npm ci exceeded bounded 900-second timeout; check npm mirror/network or dependency postinstall hang" >&2
exit 124
fi
if [ "$npm_ci_status" -ne 0 ]; then
echo "frontend npm ci failed with status $npm_ci_status inside bounded Node container" >&2
exit "$npm_ci_status"
fi
- name: Validate backend, package, frontend, and database contracts
run: |