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

@@ -121,6 +121,7 @@ jenkins/Jenkinsfile.build-and-deploy
4. `RUN_NPM_CI`:是否在构建前执行 `npm ci`
如果当前 Jenkins 没有额外配置独立 Agent而是直接在控制器自身执行任务`AGENT_LABEL` 应填写 `built-in`
如果目标 Ubuntu 的 Jenkins `sh` 默认实际落到 `/bin/sh -> dash`,而流水线脚本又使用了 `set -euo pipefail`,则必须显式通过 `bash -lc` 执行命令,不能直接依赖 Jenkins 默认 `sh` 解释器。
其中仅 `部署` 流水线还需要: