Commit b428809f authored by xuchentao's avatar xuchentao

ci: target production runner by tag

parent 4baa296e
Pipeline #407 failed with stages
in 2 minutes and 21 seconds
...@@ -9,6 +9,7 @@ ...@@ -9,6 +9,7 @@
# - 不使用 resource_group # - 不使用 resource_group
# - 不使用 cache:policy # - 不使用 cache:policy
# 仅使用 only、stages、script、when 等基础语法。 # 仅使用 only、stages、script、when 等基础语法。
# Runner 注册时请使用标签:sumeiqiao-prod
variables: variables:
DEPLOY_ROOT: "/root/sumeiqiao" DEPLOY_ROOT: "/root/sumeiqiao"
...@@ -34,6 +35,8 @@ stages: ...@@ -34,6 +35,8 @@ stages:
# ── 1. 准备独立 release ─────────────────────────────── # ── 1. 准备独立 release ───────────────────────────────
prepare: prepare:
stage: prepare stage: prepare
tags:
- sumeiqiao-prod
only: only:
- main - main
script: script:
...@@ -57,6 +60,8 @@ prepare: ...@@ -57,6 +60,8 @@ prepare:
# release 尚未启用,安装失败不会影响线上服务,也不需要占用 CMS 构建锁。 # release 尚未启用,安装失败不会影响线上服务,也不需要占用 CMS 构建锁。
install: install:
stage: install stage: install
tags:
- sumeiqiao-prod
only: only:
- main - main
script: script:
...@@ -72,6 +77,8 @@ install: ...@@ -72,6 +77,8 @@ install:
# 常规失败会在锁内自动恢复上一成功版本。 # 常规失败会在锁内自动恢复上一成功版本。
deploy: deploy:
stage: deploy stage: deploy
tags:
- sumeiqiao-prod
only: only:
- main - main
script: script:
...@@ -87,6 +94,8 @@ deploy: ...@@ -87,6 +94,8 @@ deploy:
# when: always 用于输出最终状态;生产健康检查和自动回退已经在 deploy 的共享锁内完成。 # when: always 用于输出最终状态;生产健康检查和自动回退已经在 deploy 的共享锁内完成。
verify: verify:
stage: verify stage: verify
tags:
- sumeiqiao-prod
only: only:
- main - main
when: always when: always
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment