ci: fix stdb production build env
Some checks failed
CI / verify (push) Has been cancelled

This commit is contained in:
2026-05-06 14:51:23 +08:00
parent d31a28178e
commit 3ccbe6fe77

View File

@@ -49,7 +49,7 @@ pipeline {
$sourceBranch = if ($env:SOURCE_BRANCH) { $env:SOURCE_BRANCH } else { 'master' }
$commitHash = if ($env:COMMIT_HASH) { $env:COMMIT_HASH } else { '' }
$gitRemoteUrl = if ($env:GIT_REMOTE_URL) { $env:GIT_REMOTE_URL } else { 'http://82.157.175.59:3000/GenarrativeAI/Genarrative.git' }
git fetch --no-tags --prune $gitRemoteUrl "+refs/heads/$sourceBranch:refs/remotes/origin/$sourceBranch"
git fetch --no-tags --prune --depth=1 $gitRemoteUrl "+refs/heads/${sourceBranch}:refs/remotes/origin/${sourceBranch}"
if ($commitHash) {
git checkout --force $commitHash
} else {
@@ -69,6 +69,9 @@ pipeline {
steps {
powershell '''
$ErrorActionPreference = 'Stop'
$env:CARGO_HOME = "$env:WORKSPACE_TMP/cargo-home"
$env:CARGO_TARGET_DIR = "$env:WORKSPACE_TMP/cargo-target/prod-release"
$env:SCCACHE_DIR = "$env:USERPROFILE/.cache/sccache-stdb-module"
if (-not (Get-Command bash -ErrorAction SilentlyContinue)) {
throw '[stdb-build] Windows 构建节点缺少 bash无法执行仓库现有生产构建脚本。请先安装 Git Bash 或 WSL bash并确保 bash 在 PATH 中。'
}