[英]shell script returning not found on jenkins master using pipeline as code
I am new to jenkins and trying to write a pipeline.我是 jenkins 的新手,正在尝试编写管道。 Everything is working when run with jobs, but facing issue with pipeline.
运行作业时一切正常,但面临管道问题。 My script which should run after checking out from github returns file not found.
我应该在从 github 签出后运行的脚本返回找不到文件。 Could anyone help please.
任何人都可以请帮忙。 Attached is the image of the log.
附上日志图片。 https://i.stack.imgur.com/LuxGn.png Below is the code sample I am trying to execute.
https://i.stack.imgur.com/LuxGn.png下面是我试图执行的代码示例。
stage('puppet master config checkout') {
steps {
echo "cloning github"
git "https://github.com/rk280392/pipeline_scripts.git"
}
}
stage('puppet master config build') {
steps {
echo "running puppet master script"
sh "puppet_master.sh"
}
}
checkout([
$class: 'GitSCM',
branches: scm.branches,
extensions: scm.extensions,
userRemoteConfigs: [[
url: 'https://github.com/rk280392/pipeline_scripts.git'
]]
])
chmod +x puppet_master.sh
before running it with dot slash as prefix ./puppet_master.sh
chmod +x puppet_master.sh
在以点斜杠作为前缀运行它之前使用./puppet_master.sh
sh 'sh puppet_master.sh'
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.