fix(jenkins): run pipeline shell steps with bash

This commit is contained in:
2026-04-23 02:52:49 +08:00
parent d0709865bb
commit 000d74d05f
4 changed files with 22 additions and 15 deletions

View File

@@ -64,13 +64,15 @@ pipeline {
steps {
dir("${params.SOURCE_WORKSPACE_ROOT}") {
sh """
set -euo pipefail
test -d "build/${params.BUILD_VERSION}"
chmod +x scripts/jenkins-deploy-release.sh
# 只部署上游已构建好的版本目录,避免部署阶段再次构建产生漂移。
./scripts/jenkins-deploy-release.sh \
--source-dir "build/${params.BUILD_VERSION}" \
--deploy-dir "${params.DEPLOY_DIRECTORY}"
bash -lc '
set -euo pipefail
test -d "build/${params.BUILD_VERSION}"
chmod +x scripts/jenkins-deploy-release.sh
# 只部署上游已构建好的版本目录,避免部署阶段再次构建产生漂移。
./scripts/jenkins-deploy-release.sh \
--source-dir "build/${params.BUILD_VERSION}" \
--deploy-dir "${params.DEPLOY_DIRECTORY}"
'
"""
}
}