This commit is contained in:
@@ -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 中。'
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user