[英]SQL commands not found when run through shell script in Jenkins pipeline code
[英]shell script returning not found on jenkins master using pipeline as code
我是 jenkins 的新手,正在嘗試編寫管道。 運行作業時一切正常,但面臨管道問題。 我應該在從 github 簽出后運行的腳本返回找不到文件。 任何人都可以請幫忙。 附上日志圖片。 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
在以點斜杠作為前綴運行它之前使用./puppet_master.sh
sh 'sh puppet_master.sh'
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.