fix(ci): bound Docker image build resources

This commit is contained in:
2026-11-06 12:52:05 +08:00
parent f5f62af4a7
commit 110d52fd5b
6 changed files with 98 additions and 6 deletions
Vendored
+6 -2
View File
@@ -3,6 +3,7 @@ pipeline {
options {
timestamps()
disableConcurrentBuilds()
timeout(time: 20, unit: 'MINUTES')
}
stages {
stage('检查测试发布参数') {
@@ -27,8 +28,11 @@ pipeline {
when { expression { !env.JOB_BASE_NAME?.endsWith('-prod') } }
steps {
sh '''set -eu
docker compose -f docker-compose.test.yml build --pull=false
docker compose -f docker-compose.test.yml up -d --wait --wait-timeout 120
sh scripts/build-image.sh --pull=false \
--build-arg NODE_IMAGE="${NODE_BASE_IMAGE:-node:22-alpine}" \
--build-arg NGINX_IMAGE="${NGINX_BASE_IMAGE:-nginx:1.27-alpine}" \
-t "admin-web-test:$IMAGE_TAG" .
docker compose -f docker-compose.test.yml up -d --no-build --pull never --wait --wait-timeout 120
docker compose -f docker-compose.test.yml exec -T admin-web wget -qO- http://127.0.0.1/healthz
'''
}