Fix Jenkins deploy database logging and validation
Some checks failed
CI / verify (push) Has been cancelled

This commit is contained in:
2026-04-30 10:07:56 +08:00
parent 12f68ca614
commit a25c68fc80
5 changed files with 106 additions and 5 deletions

View File

@@ -99,12 +99,18 @@ pipeline {
}
steps {
script {
// 部署脚本使用当前 Deploy 作业 checkout 出来的版本,避免重放旧 build 目录时继续执行旧脚本。
env.DEPLOY_SCRIPT_PATH = "${pwd()}/scripts/jenkins-deploy-release.sh"
}
dir("${params.SOURCE_WORKSPACE_ROOT}") {
sh """
bash -lc '
set -euo pipefail
test -d "build/${params.BUILD_VERSION}"
chmod +x scripts/jenkins-deploy-release.sh
deploy_script="${env.DEPLOY_SCRIPT_PATH}"
chmod +x "\${deploy_script}"
deploy_args=(
--source-dir "build/${params.BUILD_VERSION}"
--deploy-dir "${params.DEPLOY_DIRECTORY}"
@@ -125,7 +131,7 @@ pipeline {
deploy_args+=(--hook-with-sudo)
fi
# 只部署上游已构建好的版本目录,避免部署阶段再次构建产生漂移。
./scripts/jenkins-deploy-release.sh "\${deploy_args[@]}"
"\${deploy_script}" "\${deploy_args[@]}"
'
"""
}