fix: install npm in cicd base image
Some checks failed
CICD / Build and Push CICD Images (push) Failing after 11m46s
CICD / Source Checks (push) Has been skipped
CICD / Dependency Audits (Informational) (push) Has been skipped
CICD / Build Release Images (push) Has been skipped
CICD / Build Tester Images (push) Has been skipped
CICD / Build CICD Image Failure Postmortem (push) Successful in 18s
CICD / CICD Tests Complete (push) Failing after 55s
CICD / Production Images Complete (push) Failing after 57s
CICD / Runtime Black-Box Integration Tests (push) Has been skipped
CICD / End-to-End Tests (push) Has been skipped
CICD / Production Image Failures Postmortem (push) Has been skipped
CICD / Integration Tests Failure Postmortem (push) Has been skipped
CICD / Source Lanes Failure Postmortem (push) Has been skipped
CICD / Promote Staging Images To Release (push) Has been skipped
CICD / E2E Tests Failure Postmortem (push) Has been skipped
Some checks failed
CICD / Build and Push CICD Images (push) Failing after 11m46s
CICD / Source Checks (push) Has been skipped
CICD / Dependency Audits (Informational) (push) Has been skipped
CICD / Build Release Images (push) Has been skipped
CICD / Build Tester Images (push) Has been skipped
CICD / Build CICD Image Failure Postmortem (push) Successful in 18s
CICD / CICD Tests Complete (push) Failing after 55s
CICD / Production Images Complete (push) Failing after 57s
CICD / Runtime Black-Box Integration Tests (push) Has been skipped
CICD / End-to-End Tests (push) Has been skipped
CICD / Production Image Failures Postmortem (push) Has been skipped
CICD / Integration Tests Failure Postmortem (push) Has been skipped
CICD / Source Lanes Failure Postmortem (push) Has been skipped
CICD / Promote Staging Images To Release (push) Has been skipped
CICD / E2E Tests Failure Postmortem (push) Has been skipped
This commit is contained in:
@@ -331,7 +331,7 @@ jobs:
|
||||
|
||||
PYTHON_VERSION="$(python3 -c "from pathlib import Path; import re, tomllib, sys; pyproject = tomllib.loads(Path('backend/pyproject.toml').read_text()); requires_python = pyproject['project']['requires-python']; match = re.search(r'([0-9]+[.][0-9]+)', requires_python); sys.exit('could not derive backend Python version') if not match else None; print(match.group(1))")"
|
||||
|
||||
NODE_MAJOR="$(node -p "const pkg = require('./frontend/package.json'); const match = String(pkg.engines?.node ?? '').match(/(\\d+)/); if (!match) throw new Error('could not derive frontend Node major'); process.stdout.write(match[1])")"
|
||||
NODE_MAJOR="$(node -p "const pkg = require('./frontend/package.json'); const match = String(pkg.engines?.node ?? '').match(/(\\d+)/); if (!match) throw new Error('could not derive frontend Node major'); match[1]")"
|
||||
|
||||
PLAYWRIGHT_BROWSERS_MIRROR_TAG="${GITEA_REGISTRY}/${PLAYWRIGHT_MIRROR_IMAGE}"
|
||||
PLAYWRIGHT_BROWSERS_UPSTREAM_TAG="${PLAYWRIGHT_IMAGE}"
|
||||
@@ -1107,8 +1107,8 @@ jobs:
|
||||
FRONTEND_BASE_TAG_REF="${FRONTEND_BASE_REPO}:${HEAD_SHA}"
|
||||
FRONTEND_BASE_CACHE_REF="${FRONTEND_BASE_REPO}:cache"
|
||||
|
||||
NODE_ALPINE_TAG="$(node -p "const pkg = require('./frontend/package.json'); const match = String(pkg.engines?.node ?? '').match(/(\\d+)/); if (!match) throw new Error('could not derive frontend Node major'); process.stdout.write(match[1] + '-alpine')")"
|
||||
YARN_VERSION="$(node -p "const pkg = require('./frontend/package.json'); const match = String(pkg.packageManager ?? '').match(/^yarn@(.*)$/); if (!match) throw new Error('could not derive frontend Yarn version'); process.stdout.write(match[1])")"
|
||||
NODE_ALPINE_TAG="$(node -p "const pkg = require('./frontend/package.json'); const match = String(pkg.engines?.node ?? '').match(/(\\d+)/); if (!match) throw new Error('could not derive frontend Node major'); match[1] + '-alpine'")"
|
||||
YARN_VERSION="$(node -p "const pkg = require('./frontend/package.json'); const match = String(pkg.packageManager ?? '').match(/^yarn@(.*)$/); if (!match) throw new Error('could not derive frontend Yarn version'); match[1]")"
|
||||
|
||||
retry_registry_op pull "${FRONTEND_BASE_CACHE_REF}" 5 3 || true
|
||||
BUILDKIT_NO_CLIENT_TOKEN=1 DOCKER_BUILDKIT=1 docker build -f Dockerfile.frontend \
|
||||
@@ -1303,8 +1303,8 @@ jobs:
|
||||
DEPLOYABLE_FRONTEND_TAG_REF="${DEPLOYABLE_FRONTEND_REPO}:${HEAD_SHA}"
|
||||
DEPLOYABLE_FRONTEND_CACHE_REF="${DEPLOYABLE_FRONTEND_REPO}:cache"
|
||||
|
||||
NODE_ALPINE_TAG="$(node -p "const pkg = require('./frontend/package.json'); const match = String(pkg.engines?.node ?? '').match(/(\\d+)/); if (!match) throw new Error('could not derive frontend Node major'); process.stdout.write(match[1] + '-alpine')")"
|
||||
YARN_VERSION="$(node -p "const pkg = require('./frontend/package.json'); const match = String(pkg.packageManager ?? '').match(/^yarn@(.*)$/); if (!match) throw new Error('could not derive frontend Yarn version'); process.stdout.write(match[1])")"
|
||||
NODE_ALPINE_TAG="$(node -p "const pkg = require('./frontend/package.json'); const match = String(pkg.engines?.node ?? '').match(/(\\d+)/); if (!match) throw new Error('could not derive frontend Node major'); match[1] + '-alpine'")"
|
||||
YARN_VERSION="$(node -p "const pkg = require('./frontend/package.json'); const match = String(pkg.packageManager ?? '').match(/^yarn@(.*)$/); if (!match) throw new Error('could not derive frontend Yarn version'); match[1]")"
|
||||
|
||||
docker_login_with_retry 5 3
|
||||
retry_registry_op pull "${DEPLOYABLE_FRONTEND_CACHE_REF}" 5 3 || true
|
||||
|
||||
@@ -128,7 +128,7 @@ RUN for i in 1 2 3; do \
|
||||
https://deb.nodesource.com/setup_${NODE_MAJOR}.x | bash - && \
|
||||
find /etc/apt -type f \( -name 'sources.list' -o -name '*.sources' -o -name '*.list' \) -print0 | xargs -0 sed -i 's|http://|https://|g' && \
|
||||
apt-get update && \
|
||||
timeout 300 apt-get install -y --no-install-recommends nodejs && \
|
||||
timeout 300 apt-get install -y --no-install-recommends nodejs npm && \
|
||||
break || \
|
||||
(echo "Attempt $i failed, retrying in 15s..." && sleep 15); \
|
||||
done && \
|
||||
|
||||
Reference in New Issue
Block a user