ci(bstein-home): keep metrics publish alive on flaky deps

This commit is contained in:
codex 2026-04-20 13:13:07 -03:00
parent ce5d73c514
commit eedb77020e

48
Jenkinsfile vendored
View File

@ -269,10 +269,25 @@ PY
set -euo pipefail
mkdir -p build
export PYTHONPATH="${WORKSPACE}/backend:${PYTHONPATH:-}"
python -m pip install --no-cache-dir -r backend/requirements.txt -r backend/requirements-dev.txt
set +e
python -m pytest backend/tests -q --cov=backend/atlas_portal --cov-report=xml:build/backend-coverage.xml --junitxml=build/junit-backend.xml
backend_rc=$?
pip_rc=1
for attempt in 1 2 3 4 5; do
python -m pip install --no-cache-dir -r backend/requirements.txt -r backend/requirements-dev.txt
pip_rc=$?
if [ "${pip_rc}" -eq 0 ]; then
break
fi
if [ "${attempt}" -lt 5 ]; then
sleep $((attempt * 4))
fi
done
backend_rc=1
if [ "${pip_rc}" -eq 0 ]; then
python -m pytest backend/tests -q --cov=backend/atlas_portal --cov-report=xml:build/backend-coverage.xml --junitxml=build/junit-backend.xml
backend_rc=$?
else
echo "backend dependency install failed after retries" >&2
fi
set -e
printf '%s\n' "${backend_rc}" > build/backend-tests.rc
'''
@ -288,12 +303,27 @@ set -euo pipefail
mkdir -p build
cd frontend
set +e
npm ci
npm run lint
npm run test:unit
npm run test:component
npm run test:e2e
frontend_rc=$?
npm_ci_rc=1
for attempt in 1 2 3 4 5; do
npm ci
npm_ci_rc=$?
if [ "${npm_ci_rc}" -eq 0 ]; then
break
fi
if [ "${attempt}" -lt 5 ]; then
sleep $((attempt * 4))
fi
done
frontend_rc=1
if [ "${npm_ci_rc}" -eq 0 ]; then
npm run lint
npm run test:unit
npm run test:component
npm run test:e2e
frontend_rc=$?
else
echo "frontend dependency install failed after retries" >&2
fi
set -e
printf '%s\n' "${frontend_rc}" > ../build/frontend-tests.rc
''')