修正 TeamCity pipeline.yaml 语法
使用正确的 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 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 4.6
parent
a6afbcffeb
commit
e5e5b841a4
Vendored
+12
-13
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user