From e5e5b841a4a778b3b166094466d319fa738ea1d6 Mon Sep 17 00:00:00 2001 From: SkyJourney Date: Wed, 8 Apr 2026 17:44:18 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=AD=A3=20TeamCity=20pipeline.yaml?= =?UTF-8?q?=20=E8=AF=AD=E6=B3=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 使用正确的 TeamCity Pipelines YAML 格式: - type: script + script-content 替换错误的 script 字段 - dependencies 替换 GitHub Actions 风格的 needs - 移除无效的 on/push 触发块,改为注释说明 (VCS 触发器需在 TeamCity UI 或 Kotlin DSL 中配置) Co-Authored-By: Claude Sonnet 4.6 --- .teamcity/pipeline.yaml | 25 ++++++++++++------------- 1 file changed, 12 insertions(+), 13 deletions(-) diff --git a/.teamcity/pipeline.yaml b/.teamcity/pipeline.yaml index 388131b..0bd4add 100644 --- a/.teamcity/pipeline.yaml +++ b/.teamcity/pipeline.yaml @@ -1,25 +1,24 @@ -name: zhican-admin - -on: - push: - branches: - - main +# VCS 触发器(只触发 main 分支)在 TeamCity UI / 项目 Kotlin DSL 中配置, +# YAML 格式仅描述 jobs 与 steps 结构。 jobs: - build: + Build: name: 构建 Docker 镜像 steps: - - name: Docker Build - script: | + - type: script + name: Docker Build + script-content: | docker build \ -f deploy/Dockerfile \ -t zhican-admin:latest \ . - deploy: + Deploy: name: 启动服务 - needs: build + dependencies: + - Build steps: - - name: Compose Up - script: | + - type: script + name: Compose Up + script-content: | docker compose -f deploy/compose.yaml up -d