clouddreamai-cicd-setup 1.5.21 → 1.5.23

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "clouddreamai-cicd-setup",
3
- "version": "1.5.21",
3
+ "version": "1.5.23",
4
4
  "description": "CloudDreamAI GitLab CI/CD 自动配置工具 - 支持 NestJS/Vue/React 项目的一键 CI/CD 配置",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -11,9 +11,15 @@ COPY package*.json ./
11
11
  # 安装依赖
12
12
  RUN npm ci && npm cache clean --force
13
13
 
14
+ # 显式复制 .env 文件(绕过 .dockerignore,Vite 构建时需要)
15
+ COPY .env .env
16
+
14
17
  # 复制源代码
15
18
  COPY . .
16
19
 
20
+ # 调试:显示 .env 内容确认环境变量正确
21
+ RUN cat .env
22
+
17
23
  # 构建应用
18
24
  RUN npm run build
19
25
 
@@ -207,7 +207,7 @@ deploy_dev:
207
207
  - cat "$ENV_FILE_CONTENT" > .env
208
208
  - sshpass -p "$SSH_PASSWORD" rsync -avz --delete --exclude='.git/' --exclude='node_modules/' . root@$TEST_SERVER_HOST:$DEPLOY_DIR/
209
209
  # 传递 GitLab Registry 凭据和镜像名到部署服务器
210
- - sshpass -p "$SSH_PASSWORD" ssh root@$TEST_SERVER_HOST "export REGISTRY_URL='$CI_REGISTRY' && export REGISTRY_USERNAME='$CI_REGISTRY_USER' && export REGISTRY_PASSWORD='$CI_REGISTRY_PASSWORD' && export DOCKER_IMAGE='$CI_REGISTRY_IMAGE:latest' && export APP_PORT='$APP_PORT' && cd $DEPLOY_DIR && chmod +x ci/deploy.sh && bash ci/deploy.sh $ENV_TYPE gitlab"
210
+ - sshpass -p "$SSH_PASSWORD" ssh root@$TEST_SERVER_HOST "export REGISTRY_URL='$CI_REGISTRY' && export REGISTRY_USERNAME='$CI_REGISTRY_USER' && export REGISTRY_PASSWORD='$CI_REGISTRY_PASSWORD' && export DOCKER_IMAGE='$CI_REGISTRY_IMAGE:dev' && export APP_PORT='$APP_PORT' && cd $DEPLOY_DIR && chmod +x ci/deploy.sh && bash ci/deploy.sh $ENV_TYPE gitlab"
211
211
  environment:
212
212
  name: development
213
213
  url: "{{DEV_URL}}"