fix(ci): push :dev tag for watchtower + fix staging deploy host to 116 #1889

Merged
auto-approve-bot merged 1 commits from feat/ci-dev-tag-and-staging-host into develop 2026-09-14 14:42:46 +08:00
Owner

背景

PR#1888 修复了 build_release_images.sh 的 tag 推送逻辑,但 develop 分支的 build-staging job 仍未推送 Watchtower 监听的 :dev tag;同时 staging 已迁移到 116 服务器(116.62.226.203),CI runner(act_runner)运行在 116 本机,原 47 服务器的 SSH 目标已失效(且 116 公网 22 端口未开放)。

修改点

1. build-staging 推送 :dev tag(Watchtower 触发源)

  • 文件:.gitea/workflows/ci-pipeline.yml(build-staging / Build and push step)
  • 当 GITHUB_REF_NAME == develop 时,EXTRA_TAGS 同时包含 :develop 与 :dev 两个 tag
  • 其他分支(main / tag / PR)行为不变
  • 构建日志里同步更新 tag 汇总信息

2. deploy-staging 默认 SSH 目标改为 127.0.0.1:22

  • 文件:.gitea/workflows/ci-pipeline.yml(deploy-staging / Deploy over SSH step)
  • 默认 host 改为 127.0.0.1、port 改为 22(CI runner 与 staging 同机,走本机 SSH 最稳)
  • 可通过 STAGING_SSH_HOST / STAGING_SSH_PORT secrets 覆盖
  • scp/ssh 调用均沿用 staging_host/staging_port 变量,已自动生效

3. 同步更新健康检查脚本默认值

  • 文件:scripts/ci_staging_healthcheck.sh
  • 默认 STAGING_SSH_HOST 改为 127.0.0.1、STAGING_SSH_PORT 改为 22,并更新顶部注释说明

未改动

  • production 部署路径(仍走 47 服务器)保持不变
  • retag-staging-skipped、e2e、production-build 等 job 未修改
  • scripts/ci_staging_deploy.sh 未硬编码 IP,无需改动

验证

  • 所有修改的 shell 片段已通过 bash -n 语法检查
  • 合入 develop 后,下一次 push 将触发:build 阶段同时更新 :dev tag -> Watchtower 自动拉取;deploy 阶段通过本机 SSH 完成 compose pull/up
## 背景 PR#1888 修复了 build_release_images.sh 的 tag 推送逻辑,但 develop 分支的 build-staging job 仍未推送 Watchtower 监听的 `:dev` tag;同时 staging 已迁移到 116 服务器(116.62.226.203),CI runner(act_runner)运行在 116 本机,原 47 服务器的 SSH 目标已失效(且 116 公网 22 端口未开放)。 ## 修改点 ### 1. build-staging 推送 `:dev` tag(Watchtower 触发源) - 文件:`.gitea/workflows/ci-pipeline.yml`(build-staging / Build and push step) - 当 `GITHUB_REF_NAME == develop` 时,`EXTRA_TAGS` 同时包含 `:develop` 与 `:dev` 两个 tag - 其他分支(main / tag / PR)行为不变 - 构建日志里同步更新 tag 汇总信息 ### 2. deploy-staging 默认 SSH 目标改为 127.0.0.1:22 - 文件:`.gitea/workflows/ci-pipeline.yml`(deploy-staging / Deploy over SSH step) - 默认 host 改为 127.0.0.1、port 改为 22(CI runner 与 staging 同机,走本机 SSH 最稳) - 可通过 `STAGING_SSH_HOST` / `STAGING_SSH_PORT` secrets 覆盖 - scp/ssh 调用均沿用 staging_host/staging_port 变量,已自动生效 ### 3. 同步更新健康检查脚本默认值 - 文件:`scripts/ci_staging_healthcheck.sh` - 默认 `STAGING_SSH_HOST` 改为 127.0.0.1、`STAGING_SSH_PORT` 改为 22,并更新顶部注释说明 ## 未改动 - production 部署路径(仍走 47 服务器)保持不变 - retag-staging-skipped、e2e、production-build 等 job 未修改 - `scripts/ci_staging_deploy.sh` 未硬编码 IP,无需改动 ## 验证 - 所有修改的 shell 片段已通过 `bash -n` 语法检查 - 合入 develop 后,下一次 push 将触发:build 阶段同时更新 `:dev` tag -> Watchtower 自动拉取;deploy 阶段通过本机 SSH 完成 compose pull/up
xiaoxia added 1 commit 2026-09-14 14:30:31 +08:00
fix(ci): push :dev tag for watchtower + fix staging deploy host to 116
CI/CD Pipeline / Dedup Check - skip PR tests when covered by push pipeline (pull_request) Successful in 1s
CI/CD Pipeline / Check if frontend-only change (pull_request) Successful in 3s
Preview Deploy / Deploy Preview Environment (pull_request) Successful in 1m32s
CI/CD Pipeline / Validate - Style (pull_request) Successful in 2m47s
CI/CD Pipeline / PR Build Worker Image (pull_request) Successful in 2m58s
CI/CD Pipeline / PR Build API Image (pull_request) Successful in 3m4s
CI/CD Pipeline / Integration Tests (pull_request) Successful in 3m20s
PR Automation / Auto Approve on CI Green (pull_request) Successful in 3m39s
CI/CD Pipeline / Validate - Python (mypy + alembic) (pull_request) Successful in 4m10s
AI Code Review / AI Code Review (pull_request) Successful in 6m31s
CI/CD Pipeline / Validate - Security (pull_request) Successful in 10m47s
CI/CD Pipeline / Unit Tests (pull_request) Successful in 11m28s
CI/CD Pipeline / CI Gate (pull_request) Successful in 1s
CI/CD Pipeline / Production Browser E2E (pull_request) Has been skipped
PR Automation / Auto Merge on CI Green + Approved (pull_request) Successful in 7m38s
ACR Cleanup / ACR Image Cleanup (pull_request_target) Successful in 7s
Preview Cleanup / Cleanup Preview Environment (pull_request) Successful in 52s
CI/CD Pipeline / Deploy Production (pull_request) Failing after 48h41m32s
CI/CD Pipeline / Staging E2E Tests (pull_request) Failing after 48h52m41s
CI/CD Pipeline / Retag skipped Staging API Image (pull_request) Failing after 48h53m1s
CI/CD Pipeline / Build Staging Worker Image (pull_request) Failing after 48h53m11s
CI/CD Pipeline / Frontend Lint (pull_request) Failing after 48h52m39s
CI/CD Pipeline / Build Production API Image (pull_request) Failing after 48h41m9s
CI/CD Pipeline / Deploy Staging (Watchtower auto-deploy) (pull_request) Failing after 48h52m19s
CI/CD Pipeline / Retag skipped Staging Worker Image (pull_request) Failing after 48h52m24s
CI/CD Pipeline / Retag skipped Staging Web Image (pull_request) Failing after 48h52m29s
CI/CD Pipeline / Build Staging Web Image (pull_request) Failing after 48h52m44s
CI/CD Pipeline / Build Staging API Image (pull_request) Failing after 48h52m45s
CI/CD Pipeline / Check push changed paths (pull_request) Failing after 48h52m47s
CI/CD Pipeline / PR Build Web Image (pull_request) Failing after 48h52m37s
CI/CD Pipeline / Build Production Worker Image (pull_request) Failing after 48h41m9s
CI/CD Pipeline / Build Production Web Image (pull_request) Failing after 48h41m9s
CI/CD Pipeline / Canary Release to Production (pull_request) Failing after 48h41m5s
CI/CD Pipeline / ACR Image Cleanup (pull_request) Failing after 48h52m4s
CI/CD Pipeline / Staging API Integration Tests (pull_request) Failing after 48h52m9s
CI/CD Pipeline / Frontend Unit Tests (pull_request) Failing after 48h52m38s
6d7b8a59dd
- build-staging: develop 分支额外推送 :dev tag(Watchtower 监听的滚动更新 tag),
  同时保留原有的 :<branch> tag
- deploy-staging: 默认 SSH 目标改为 127.0.0.1:22,适配 CI runner 已部署在 116 本机
  (116 公网 22 端口未开放);secrets 可覆盖
- scripts/ci_staging_healthcheck.sh: 同步更新默认 STAGING_SSH_HOST/PORT
- 不影响 production 路径

🚀 预览环境已部署

项目 详情
PR号 #1889
预览链接 https://pr-1889.preview.xiaoxiajianji.com
API环境 staging

💡 预览环境使用 staging API 数据,请勿在预览环境中操作重要数据。

🔄 每次提交新代码后预览环境会自动更新。

🗑️ PR 关闭或合并后,预览环境会自动清理。

🚀 **预览环境已部署** | 项目 | 详情 | |------|------| | PR号 | #1889 | | 预览链接 | [https://pr-1889.preview.xiaoxiajianji.com](https://pr-1889.preview.xiaoxiajianji.com) | | API环境 | staging | > 💡 预览环境使用 staging API 数据,请勿在预览环境中操作重要数据。 > > 🔄 每次提交新代码后预览环境会自动更新。 > > 🗑️ PR 关闭或合并后,预览环境会自动清理。
auto-approve-bot merged commit d478a9ffbc into develop 2026-09-14 14:42:46 +08:00
auto-approve-bot deleted branch feat/ci-dev-tag-and-staging-host 2026-09-14 14:42:47 +08:00

🗑️ 预览环境已清理

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

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

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