fix(ci): 修复deploy脚本语法错误(多余双引号) #612

Merged
xiaoxia merged 2 commits from fix/deploy-script-syntax into develop 2026-07-19 20:45:21 +08:00
Owner

#611 合入时引入的笔误,echo "All images pulled."" 末尾多了一个双引号,导致SSH远端sh执行时脚本报 Syntax error: "(" unexpected,Deploy Staging步骤失败。

修复:移除两个脚本都修掉多余的双引号。

#611 合入时引入的笔误,`echo "All images pulled.""` 末尾多了一个双引号,导致SSH远端sh执行时脚本报 `Syntax error: "(" unexpected`,Deploy Staging步骤失败。 修复:移除两个脚本都修掉多余的双引号。
xiaoxia added 1 commit 2026-07-19 20:38:33 +08:00
fix(ci): 修复deploy脚本多余双引号导致的语法错误
CI/CD Pipeline / Build Staging API Image (pull_request) Has been skipped
CI/CD Pipeline / Build Staging Web Image (pull_request) Has been skipped
CI/CD Pipeline / Build Staging Worker Image (pull_request) Has been skipped
CI/CD Pipeline / Deploy Staging (Watchtower auto-deploy) (pull_request) Has been skipped
CI/CD Pipeline / Build Production API Image (pull_request) Has been skipped
CI/CD Pipeline / Build Production Web Image (pull_request) Has been skipped
CI/CD Pipeline / Build Production Worker Image (pull_request) Has been skipped
CI/CD Pipeline / ACR Image Cleanup (pull_request) Has been skipped
CI/CD Pipeline / Staging E2E Tests (pull_request) Has been skipped
CI/CD Pipeline / Staging API Integration Tests (pull_request) Has been skipped
CI/CD Pipeline / Deploy Production (pull_request) Has been skipped
CI/CD Pipeline / Production Browser E2E (pull_request) Has been skipped
CI/CD Pipeline / Check if frontend-only change (pull_request) Successful in 30s
CI/CD Pipeline / Frontend Unit Tests (pull_request) Has been skipped
CI/CD Pipeline / Validate Code Quality And Tests (pull_request) Has been cancelled
CI/CD Pipeline / Unit Tests (pull_request) Has been cancelled
CI/CD Pipeline / Integration Tests (pull_request) Has been cancelled
CI/CD Pipeline / Frontend Lint (pull_request) Has been cancelled
AI Code Review / AI Code Review (pull_request) Has been cancelled
PR Automation / Auto Merge on CI Green + Approved (pull_request) Successful in 1m5s
PR Automation / Auto Approve on CI Green (pull_request) Successful in 1m9s
Preview Deploy / Deploy Preview Environment (pull_request) Failing after 54s
fad12efd72
#611 合入时引入的笔误,echo行末尾多了一个双引号,导致
SSH远端用sh执行时脚本报 Syntax error: "(" unexpected,
Deploy Staging步骤失败,staging无法自动更新。

修复:移除多余的双引号,staging和production两个脚本都修。
xiaoxia added 1 commit 2026-07-19 20:39:31 +08:00
fix(ci): 修复ACR cleanup错误的命令行参数
CI/CD Pipeline / Build Staging Web Image (pull_request) Has been skipped
CI/CD Pipeline / Build Staging API Image (pull_request) Has been skipped
CI/CD Pipeline / Build Staging Worker Image (pull_request) Has been skipped
CI/CD Pipeline / Deploy Staging (Watchtower auto-deploy) (pull_request) Has been skipped
CI/CD Pipeline / Build Production API Image (pull_request) Has been skipped
CI/CD Pipeline / Build Production Web Image (pull_request) Has been skipped
CI/CD Pipeline / Staging E2E Tests (pull_request) Has been skipped
CI/CD Pipeline / Staging API Integration Tests (pull_request) Has been skipped
CI/CD Pipeline / ACR Image Cleanup (pull_request) Has been skipped
CI/CD Pipeline / Build Production Worker Image (pull_request) Has been skipped
CI/CD Pipeline / Deploy Production (pull_request) Has been skipped
CI/CD Pipeline / Production Browser E2E (pull_request) Has been skipped
CI/CD Pipeline / Check if frontend-only change (pull_request) Successful in 22s
CI/CD Pipeline / Frontend Unit Tests (pull_request) Has been skipped
Preview Deploy / Deploy Preview Environment (pull_request) Has been cancelled
AI Code Review / AI Code Review (pull_request) Successful in 2m20s
CI/CD Pipeline / Frontend Lint (pull_request) Successful in 3m53s
CI/CD Pipeline / Validate Code Quality And Tests (pull_request) Successful in 3m34s
CI/CD Pipeline / Unit Tests (pull_request) Successful in 4m10s
PR Automation / Auto Approve on CI Green (pull_request) Successful in 4m42s
CI/CD Pipeline / Integration Tests (pull_request) Successful in 1m40s
Preview Cleanup / Cleanup Preview Environment (pull_request) Successful in 5s
PR Automation / Auto Merge on CI Green + Approved (pull_request) Successful in 6m44s
f7c59b6b44
acr_cleanup.py通过环境变量(ACR_REGISTRY/ACR_NAMESPACE/ACR_USERNAME/ACR_PASSWORD)
读取配置,不接受--registry/--namespace/--username/--password参数。
CI重构时错误地把这些当作命令行参数传入,导致job失败。

移除错误参数,保留正确的--keep/--pr-days/--execute参数。
Collaborator

📊 审查概览

  • 整体评价:需修改
  • 严重问题数量:1 个
  • 一般建议数量:0 个

需修改的问题(严重)

  1. [.gitea/workflows/ci-pipeline.yml: 931-936] 移除关键运行参数导致功能失效
    • 问题描述:移除了 python3 scripts/ci/acr_cleanup.py 命令中的 --registry--namespace--username--password 参数。除非 acr_cleanup.py 脚本逻辑在本次 PR 中同步修改为从环境变量或其他默认配置读取这些值,否则该脚本将因缺少必要的连接信息和认证凭据而无法正常运行,导致镜像清理任务失败。
    • 修改建议:请回滚这些参数的删除,或者确认 acr_cleanup.py 已更新为不再依赖这些 CLI 参数。如果脚本已支持环境变量,请确保 CI 环境中已正确配置对应变量。

💡 改进建议(一般)

良好实践

  • 修复了 scripts/ci_production_deploy.shscripts/ci_staging_deploy.sh 中 echo 语句末尾多余的引号,消除了潜在的 Shell 语法错误。

🤖 由 AI 代码审查机器人自动生成 | 2026-07-19 20:41:52 | 模型:

### 📊 审查概览 - 整体评价:需修改 - 严重问题数量:1 个 - 一般建议数量:0 个 ### ❌ 需修改的问题(严重) 1. **[.gitea/workflows/ci-pipeline.yml: 931-936] 移除关键运行参数导致功能失效** - 问题描述:移除了 `python3 scripts/ci/acr_cleanup.py` 命令中的 `--registry`、`--namespace`、`--username` 和 `--password` 参数。除非 `acr_cleanup.py` 脚本逻辑在本次 PR 中同步修改为从环境变量或其他默认配置读取这些值,否则该脚本将因缺少必要的连接信息和认证凭据而无法正常运行,导致镜像清理任务失败。 - 修改建议:请回滚这些参数的删除,或者确认 `acr_cleanup.py` 已更新为不再依赖这些 CLI 参数。如果脚本已支持环境变量,请确保 CI 环境中已正确配置对应变量。 ### 💡 改进建议(一般) 无 ### ✅ 良好实践 - 修复了 `scripts/ci_production_deploy.sh` 和 `scripts/ci_staging_deploy.sh` 中 echo 语句末尾多余的引号,消除了潜在的 Shell 语法错误。 --- <sub>🤖 由 AI 代码审查机器人自动生成 | 2026-07-19 20:41:52 | 模型: </sub> <!-- AI_CODE_REVIEW_AUTO_COMMENT -->
auto-approve-bot approved these changes 2026-07-19 20:44:14 +08:00
auto-approve-bot left a comment
Collaborator

CI全绿,自动审批通过。

CI全绿,自动审批通过。
auto-approve-bot approved these changes 2026-07-19 20:44:15 +08:00
auto-approve-bot left a comment
Collaborator

CI全绿,自动审批通过。

CI全绿,自动审批通过。
xiaoxia merged commit 9dee33c54d into develop 2026-07-19 20:45:21 +08:00
xiaoxia deleted branch fix/deploy-script-syntax 2026-07-19 20:45:21 +08:00

🗑️ 预览环境已清理

PR #612 已关闭或合并,对应的预览环境已被清理。

如有需要,可以重新打开 PR 来重新生成预览环境。

🗑️ **预览环境已清理** PR #612 已关闭或合并,对应的预览环境已被清理。 > 如有需要,可以重新打开 PR 来重新生成预览环境。
Sign in to join this conversation.