a60969ba50
CI/CD Pipeline / Check if frontend-only change (push) Has been skipped
CI/CD Pipeline / Build Production API Image (push) Has been skipped
CI/CD Pipeline / Build Production Worker Image (push) Has been skipped
CI/CD Pipeline / Build Production Web Image (push) Has been skipped
CI/CD Pipeline / Deploy Production (push) Has been skipped
CI/CD Pipeline / Production Browser E2E (push) Has been skipped
CI/CD Pipeline / Build Staging Web Image (push) Successful in 35s
CI/CD Pipeline / Frontend Unit Tests (push) Successful in 3m52s
CI/CD Pipeline / Validate Code Quality And Tests (push) Successful in 4m3s
CI/CD Pipeline / Frontend Lint (push) Successful in 4m22s
CI/CD Pipeline / Unit Tests (push) Successful in 5m4s
CI/CD Pipeline / Integration Tests (push) Successful in 1m37s
CI/CD Pipeline / Build Staging API Image (push) Successful in 6m34s
CI/CD Pipeline / Build Staging Worker Image (push) Successful in 8m19s
CI/CD Pipeline / Deploy Staging (Watchtower auto-deploy) (push) Successful in 47s
CI/CD Pipeline / ACR Image Cleanup (push) Successful in 36s
CI/CD Pipeline / Staging E2E Tests (push) Failing after 1m17s
CI/CD Pipeline / Staging API Integration Tests (push) Successful in 3m5s
Co-authored-by: xiaoxia <dev@xiaoxiajianji.com> Co-committed-by: xiaoxia <dev@xiaoxiajianji.com>
25 lines
689 B
Bash
Executable File
25 lines
689 B
Bash
Executable File
#!/bin/sh
|
|
# CI 公共步骤:前端依赖安装(在 docker node 容器中运行)
|
|
# 用法:step_frontend_install.sh [模式]
|
|
# 模式: full (默认) - 完整安装所有依赖
|
|
# vitest - 同full(保持接口兼容)
|
|
set -eu
|
|
|
|
MODE="${1:-full}"
|
|
|
|
echo "=== 前端依赖安装开始 (模式: $MODE) ==="
|
|
|
|
# npm ci 带重试(网络不稳定时自动重试)
|
|
for i in 1 2 3; do
|
|
docker run --rm \
|
|
-v "$PWD:/workspace" \
|
|
-w /workspace/apps/web \
|
|
docker.m.daocloud.io/library/node:20 \
|
|
sh -lc "npm ci --no-audit --no-fund" && break
|
|
echo "npm ci 失败,重试 $i/3..."
|
|
[ $i -eq 3 ] && exit 1
|
|
sleep 5
|
|
done
|
|
|
|
echo "=== 前端依赖安装完成 ==="
|