# Project

name: foka-ci
description: 第一个项目
repository: https://git.cvfe.tech/hurole/foka-ci.git
projectDir: /Users/hurole/Desktop/foka-ci
createdAt: 2026-01-02T16:26:03.203+00:00
updatedAt: 2026-01-03T14:19:05.608+00:00
createdBy: system
updatedBy: system
envPresets:
  [{"key":"env","label":"发布环境","type":"select","options":[{"label":"测试","value":"staging"},{"label":"生产","value":"production"}]},{"key":"projects","label":"发布的项目","type":"multiselect","options":[{"label":"前端","value":"web"},{"label":"服务端","value":"server"}]}]


# Step

name: Clone Repository
createdAt: 2026-01-02T16:24:41.960+00:00
updatedAt: 2026-01-02T16:24:41.960+00:00
createdBy: system
updatedBy: system
script:
  # 克隆指定commit的代码
  git init
  git remote add origin $REPOSITORY_URL
  git fetch --depth 1 origin $COMMIT_HASH
  git checkout -q FETCH_HEAD

  # 显示当前提交信息
  git log --oneline -1


name: Sparse Checkout Repository
createdAt: 2026-01-02T16:24:41.968+00:00
updatedAt: 2026-01-02T16:24:41.968+00:00
createdBy: system
updatedBy: system
script:
  # 进行稀疏检出指定目录的代码
  git init
  git remote add origin $REPOSITORY_URL
  git config core.sparseCheckout true
  echo "$SPARSE_CHECKOUT_PATHS" > .git/info/sparse-checkout
  git fetch --depth 1 origin $COMMIT_HASH
  git checkout -q FETCH_HEAD

  # 显示当前提交信息
  git log --oneline -1


name: Clone Repository
createdAt: 2026-01-02T16:24:41.972+00:00
updatedAt: 2026-01-02T16:24:41.972+00:00
createdBy: system
updatedBy: system
script:
  # 克隆指定commit的代码
  git init
  git remote add origin $REPOSITORY_URL
  git fetch --depth 1 origin $COMMIT_HASH
  git checkout -q FETCH_HEAD


# Deployment

branch: main
status: success
commitHash: 9897bd04c2eabfc5ec2b5a2b6ad42a3ca84138af
startedAt: 2026-01-02T16:30:02.450+00:00
finishedAt: 2026-01-02T16:30:06.041+00:00
createdAt: 2026-01-02T16:30:02.450+00:00
updatedAt: 2026-01-02T16:30:06.042+00:00
createdBy: system
updatedBy: system
commitMessage:
  feat(server): 支持稀疏检出路径并完善部署执行队列

  - 在部署DTO中添加sparseCheckoutPaths字段支持稀疏检出路径
  - 数据模型Deployment新增稀疏检出路径字段及相关数据库映射
  - 部署创建时支持设置稀疏检出路径字段
  - 部署重试接口实现，支持复制原始部署记录并加入执行队列
  - 新增流水线模板初始化与基于模板创建流水线接口
  - 优化应用初始化流程，确保执行队列和流水线模板正确加载
  - 添加启动日志，提示执行队列初始化完成

buildLog:
  [2026-01-02T16:30:02.461Z] 检查工作目录状态: /Users/hurole/Desktop/foka-ci
  [2026-01-02T16:30:02.463Z] 工作目录状态: not_created
  [2026-01-02T16:30:02.463Z] 工作目录不存在或为空，开始克隆仓库
  [2026-01-02T16:30:06.030Z] 仓库克隆成功
  [2026-01-02T16:30:06.032Z] 开始执行步骤 1/1: 当前文件夹
  [2026-01-02T16:30:06.033Z] 执行脚本: pwd
  [2026-01-02T16:30:06.040Z] /Users/hurole/Desktop/foka-ci
  [2026-01-02T16:30:06.040Z] 步骤执行完成

  [2026-01-02T16:30:06.040Z] 步骤 "当前文件夹" 执行完成


branch: main
envVars: {"env":"production","projects":"web"}
status: success
commitHash: db2b2af0d3e83314b062dcfe339374403f243b87
commitMessage: refactor: 重构部署功能
startedAt: 2026-01-08T12:32:07.403+00:00
finishedAt: 2026-01-08T12:32:12.650+00:00
createdAt: 2026-01-08T12:32:07.403+00:00
updatedAt: 2026-01-08T12:32:12.650+00:00
createdBy: system
updatedBy: system
buildLog:
  [2026-01-08T12:32:07.414Z] 检查工作目录状态: /Users/hurole/Desktop/foka-ci
  [2026-01-08T12:32:07.416Z] 工作目录状态: ready
  [2026-01-08T12:32:07.416Z] 工作目录已存在 Git 仓库，开始更新代码
  [2026-01-08T12:32:12.638Z] 代码更新成功
  [2026-01-08T12:32:12.639Z] 开始执行步骤 1/1: 当前文件夹
  [2026-01-08T12:32:12.640Z] 执行脚本: pwd
  [2026-01-08T12:32:12.647Z] /Users/hurole/Desktop/foka-ci
  [2026-01-08T12:32:12.648Z] 步骤执行完成

  [2026-01-08T12:32:12.648Z] 步骤 "当前文件夹" 执行完成


branch: main
envVars: {"env":"production","projects":"web"}
status: failed
commitHash: db2b2af0d3e83314b062dcfe339374403f243b87
commitMessage: refactor: 重构部署功能
startedAt: 2026-01-08T12:35:33.812+00:00
finishedAt: 2026-01-08T12:35:39.309+00:00
createdAt: 2026-01-08T12:35:33.812+00:00
updatedAt: 2026-01-08T12:35:39.310+00:00
createdBy: system
updatedBy: system
buildLog:
  [2026-01-08T12:35:33.825Z] 检查工作目录状态: /Users/hurole/Desktop/foka-ci
  [2026-01-08T12:35:33.827Z] 工作目录状态: ready
  [2026-01-08T12:35:33.827Z] 工作目录已存在 Git 仓库，开始更新代码
  [2026-01-08T12:35:39.294Z] 代码更新成功
  [2026-01-08T12:35:39.295Z] 开始执行步骤 1/1: 输出环境变量
  [2026-01-08T12:35:39.309Z] Error: /bin/bash: echo $env
  ls .: command not found

      at AsyncLocalStorage.run (node:internal/async_local_storage/async_hooks:91:14)
      exit code: 127 (Command not found)


branch: main
envVars: {"env":"production","projects":"web"}
status: failed
commitHash: db2b2af0d3e83314b062dcfe339374403f243b87
commitMessage: refactor: 重构部署功能
startedAt: 2026-01-08T12:36:25.301+00:00
finishedAt: 2026-01-08T12:36:30.213+00:00
createdAt: 2026-01-08T12:36:25.301+00:00
updatedAt: 2026-01-08T12:36:30.214+00:00
createdBy: system
updatedBy: system
buildLog:
  [2026-01-08T12:36:25.316Z] 检查工作目录状态: /Users/hurole/Desktop/foka-ci
  [2026-01-08T12:36:25.321Z] 工作目录状态: ready
  [2026-01-08T12:36:25.321Z] 工作目录已存在 Git 仓库，开始更新代码
  [2026-01-08T12:36:30.200Z] 代码更新成功
  [2026-01-08T12:36:30.203Z] 开始执行步骤 1/1: 输出环境变量
  [2026-01-08T12:36:30.213Z] Error: zsh:1: command not found: echo $env\nls .

      at AsyncLocalStorage.run (node:internal/async_local_storage/async_hooks:91:14)
      exit code: 127 (Command not found)


branch: main
envVars: {"env":"production","projects":"web"}
status: failed
commitHash: db2b2af0d3e83314b062dcfe339374403f243b87
commitMessage: refactor: 重构部署功能
startedAt: 2026-01-08T12:40:04.959+00:00
finishedAt: 2026-01-08T12:40:10.257+00:00
createdAt: 2026-01-08T12:40:04.959+00:00
updatedAt: 2026-01-08T12:40:10.258+00:00
createdBy: system
updatedBy: system
buildLog:
  [2026-01-08T12:40:04.976Z] 检查工作目录状态: /Users/hurole/Desktop/foka-ci
  [2026-01-08T12:40:04.981Z] 工作目录状态: ready
  [2026-01-08T12:40:04.981Z] 工作目录已存在 Git 仓库，开始更新代码
  [2026-01-08T12:40:10.247Z] 代码更新成功
  [2026-01-08T12:40:10.248Z] 开始执行步骤 1/1: 输出环境变量
  [2026-01-08T12:40:10.257Z] Error: zsh:1: command not found: echo $env

      at AsyncLocalStorage.run (node:internal/async_local_storage/async_hooks:91:14)
      exit code: 127 (Command not found)


branch: main
envVars: {"env":"production","projects":"web"}
status: failed
commitHash: db2b2af0d3e83314b062dcfe339374403f243b87
commitMessage: refactor: 重构部署功能
startedAt: 2026-01-08T12:45:57.850+00:00
finishedAt: 2026-01-08T12:46:03.381+00:00
createdAt: 2026-01-08T12:45:57.850+00:00
updatedAt: 2026-01-08T12:46:03.382+00:00
createdBy: system
updatedBy: system
buildLog:
  [2026-01-08T12:45:57.859Z] 检查工作目录状态: /Users/hurole/Desktop/foka-ci
  [2026-01-08T12:45:57.863Z] 工作目录状态: ready
  [2026-01-08T12:45:57.863Z] 工作目录已存在 Git 仓库，开始更新代码
  [2026-01-08T12:46:03.372Z] 代码更新成功
  [2026-01-08T12:46:03.375Z] 开始执行步骤 1/1: 输出环境变量
  [2026-01-08T12:46:03.381Z] Error: /bin/bash: echo $env: command not found

      at AsyncLocalStorage.run (node:internal/async_local_storage/async_hooks:91:14)
      exit code: 127 (Command not found)


branch: main
envVars: {"env":"production","projects":"web"}
status: failed
commitHash: db2b2af0d3e83314b062dcfe339374403f243b87
commitMessage: refactor: 重构部署功能
startedAt: 2026-01-08T12:48:33.885+00:00
finishedAt: 2026-01-08T12:48:39.181+00:00
createdAt: 2026-01-08T12:48:33.885+00:00
updatedAt: 2026-01-08T12:48:39.182+00:00
createdBy: system
updatedBy: system
buildLog:
  [2026-01-08T12:48:33.908Z] 检查工作目录状态: /Users/hurole/Desktop/foka-ci
  [2026-01-08T12:48:33.913Z] 工作目录状态: ready
  [2026-01-08T12:48:33.913Z] 工作目录已存在 Git 仓库，开始更新代码
  [2026-01-08T12:48:39.170Z] 代码更新成功
  [2026-01-08T12:48:39.172Z] 开始执行步骤 1/1: 输出环境变量
  [2026-01-08T12:48:39.181Z] Error: /bin/sh: echo $env: command not found

      at AsyncLocalStorage.run (node:internal/async_local_storage/async_hooks:91:14)
      exit code: 127 (Command not found)


branch: main
envVars: {"env":"production","projects":"web"}
status: success
commitHash: db2b2af0d3e83314b062dcfe339374403f243b87
commitMessage: refactor: 重构部署功能
startedAt: 2026-01-08T12:54:01.851+00:00
finishedAt: 2026-01-08T12:54:07.394+00:00
createdAt: 2026-01-08T12:54:01.851+00:00
updatedAt: 2026-01-08T12:54:07.395+00:00
createdBy: system
updatedBy: system
buildLog:
  [2026-01-08T12:54:01.864Z] 检查工作目录状态: /Users/hurole/Desktop/foka-ci
  [2026-01-08T12:54:01.867Z] 工作目录状态: ready
  [2026-01-08T12:54:01.867Z] 工作目录已存在 Git 仓库，开始更新代码
  [2026-01-08T12:54:07.382Z] 代码更新成功
  [2026-01-08T12:54:07.385Z] 开始执行步骤 1/1: 输出环境变量
  [2026-01-08T12:54:07.386Z] 执行脚本: echo $env
  [2026-01-08T12:54:07.393Z] production
  [2026-01-08T12:54:07.393Z] 步骤执行完成

  [2026-01-08T12:54:07.393Z] 步骤 "输出环境变量" 执行完成


branch: main
envVars: {"env":"production","projects":"web"}
status: success
commitHash: db2b2af0d3e83314b062dcfe339374403f243b87
commitMessage: refactor: 重构部署功能
startedAt: 2026-01-08T13:07:20.609+00:00
finishedAt: 2026-01-08T13:07:25.394+00:00
createdAt: 2026-01-08T13:07:20.609+00:00
updatedAt: 2026-01-08T13:07:25.395+00:00
createdBy: system
updatedBy: system
buildLog:
  [2026-01-08T13:07:20.621Z] 检查工作目录状态: /Users/hurole/Desktop/foka-ci
  [2026-01-08T13:07:20.627Z] 工作目录状态: ready
  [2026-01-08T13:07:20.627Z] 工作目录已存在 Git 仓库，开始更新代码
  [2026-01-08T13:07:25.380Z] 代码更新成功
  [2026-01-08T13:07:25.383Z] [[1/1]] 开始执行: 输出环境变量
  [2026-01-08T13:07:25.385Z] 执行脚本: echo $env
  [2026-01-08T13:07:25.392Z] production

  [2026-01-08T13:07:25.392Z] 步骤执行完成
  [2026-01-08T13:07:25.392Z] [[1/1]] 执行完成: 输出环境变量


branch: main
envVars: {"env":"production","projects":"web"}
status: success
commitHash: db2b2af0d3e83314b062dcfe339374403f243b87
commitMessage: refactor: 重构部署功能
startedAt: 2026-01-08T13:08:23.707+00:00
finishedAt: 2026-01-08T13:08:28.866+00:00
createdAt: 2026-01-08T13:08:23.707+00:00
updatedAt: 2026-01-08T13:08:28.867+00:00
createdBy: system
updatedBy: system
buildLog:
  [2026-01-08T13:08:23.721Z] 检查工作目录状态: /Users/hurole/Desktop/foka-ci
  [2026-01-08T13:08:23.727Z] 工作目录状态: ready
  [2026-01-08T13:08:23.727Z] 工作目录已存在 Git 仓库，开始更新代码
  [2026-01-08T13:08:28.853Z] 代码更新成功
  [2026-01-08T13:08:28.856Z] [1/1] 开始执行: 输出环境变量
  [2026-01-08T13:08:28.858Z] 执行脚本: echo $env
  [2026-01-08T13:08:28.864Z] production

  [2026-01-08T13:08:28.864Z] 步骤执行完成
  [2026-01-08T13:08:28.864Z] [1/1] 执行完成: 输出环境变量


branch: main
envVars: {"env":"production","projects":"web"}
status: success
commitHash: db2b2af0d3e83314b062dcfe339374403f243b87
commitMessage: refactor: 重构部署功能
startedAt: 2026-01-08T13:11:20.810+00:00
finishedAt: 2026-01-08T13:11:26.439+00:00
createdAt: 2026-01-08T13:11:20.810+00:00
updatedAt: 2026-01-08T13:11:26.440+00:00
createdBy: system
updatedBy: system
buildLog:
  [2026-01-08T13:11:20.825Z] 检查工作目录状态: /Users/hurole/Desktop/foka-ci
  [2026-01-08T13:11:20.830Z] 工作目录状态: ready
  [2026-01-08T13:11:20.830Z] 工作目录已存在 Git 仓库，开始更新代码
  [2026-01-08T13:11:26.412Z] 代码更新成功
  [2026-01-08T13:11:26.415Z] [1/2] 开始执行: 输出环境变量
  [2026-01-08T13:11:26.423Z] production

  [2026-01-08T13:11:26.423Z] [1/2] 执行完成: 输出环境变量
  [2026-01-08T13:11:26.425Z] [2/2] 开始执行: 列出文件
  [2026-01-08T13:11:26.438Z] apps

  [2026-01-08T13:11:26.438Z] biome.json

  [2026-01-08T13:11:26.438Z] package.json

  [2026-01-08T13:11:26.438Z] pnpm-lock.yaml

  [2026-01-08T13:11:26.438Z] pnpm-workspace.yaml

  [2026-01-08T13:11:26.438Z] [2/2] 执行完成: 列出文件


branch: main
envVars: {"env":"production","projects":"web"}
status: success
commitHash: db2b2af0d3e83314b062dcfe339374403f243b87
commitMessage: refactor: 重构部署功能
startedAt: 2026-01-08T13:12:25.894+00:00
finishedAt: 2026-01-08T13:12:30.880+00:00
createdAt: 2026-01-08T13:12:25.894+00:00
updatedAt: 2026-01-08T13:12:30.881+00:00
createdBy: system
updatedBy: system
buildLog:
  [2026-01-08T13:12:25.908Z] 检查工作目录状态: /Users/hurole/Desktop/foka-ci
  [2026-01-08T13:12:25.912Z] 工作目录状态: ready
  [2026-01-08T13:12:25.912Z] 工作目录已存在 Git 仓库，开始更新代码
  [2026-01-08T13:12:30.857Z] 代码更新成功
  [2026-01-08T13:12:30.861Z] [1/2] 开始执行: 输出环境变量
  [2026-01-08T13:12:30.869Z] production

  [2026-01-08T13:12:30.869Z] [1/2] 执行完成: 输出环境变量
  [2026-01-08T13:12:30.870Z] [2/2] 开始执行: 列出文件
  [2026-01-08T13:12:30.879Z] apps
  biome.json
  package.json
  pnpm-lock.yaml
  pnpm-workspace.yaml

  [2026-01-08T13:12:30.879Z] [2/2] 执行完成: 列出文件


branch: main
envVars: {"env":"production","projects":"web"}
status: success
commitHash: db2b2af0d3e83314b062dcfe339374403f243b87
commitMessage: refactor: 重构部署功能
startedAt: 2026-01-08T13:19:35.146+00:00
finishedAt: 2026-01-08T13:19:40.368+00:00
createdAt: 2026-01-08T13:19:35.146+00:00
updatedAt: 2026-01-08T13:19:40.369+00:00
createdBy: system
updatedBy: system
buildLog:
  [2026-01-08T13:19:35.159Z] 检查工作目录状态: /Users/hurole/Desktop/foka-ci
  [2026-01-08T13:19:35.166Z] 工作目录状态: ready
  [2026-01-08T13:19:35.166Z] 工作目录已存在 Git 仓库，开始更新代码
  [2026-01-08T13:19:40.345Z] 代码更新成功
  [2026-01-08T13:19:40.348Z] [1/2] 开始执行: 输出环境变量
  [2026-01-08T13:19:40.357Z] 
  production

  [2026-01-08T13:19:40.357Z] [1/2] 执行完成: 输出环境变量
  [2026-01-08T13:19:40.358Z] [2/2] 开始执行: 列出文件
  [2026-01-08T13:19:40.367Z] 
  apps
  biome.json
  package.json
  pnpm-lock.yaml
  pnpm-workspace.yaml

  [2026-01-08T13:19:40.367Z] [2/2] 执行完成: 列出文件


