这是我的Jenkins 2.x管道:
node ('master'){ stage 'Checkout' checkout scm stage "Build Pex" sh('build.sh') }
当我运行这个管道时,checkout会按预期将代码放入工作空间,但不是期望在workspace /(它确实存在!)中找到脚本,而是查找一个不相关的目录:workspace @ tmp / durable-d812f509。
Entering stage Build Pex Proceeding [Pipeline] sh [workspace] Running shell script + build.sh /home/conmonsysdev/deployments/jenkins_ci_2016_interns/jenkins_home/jobs/pex/branches/master/workspace@tmp/durable-d812f509/script.sh: line 2: build.sh: command not found