[英]Jenkins Pipeline plugin Linux error while running shell script
I am trying to run a shell script using Jenkins pipeline plugin on a agent machine. 我正在尝试在代理计算机上使用Jenkins管道插件运行Shell脚本。 Below is the pipeline sample script:
以下是管道示例脚本:
node("XXXXX"){
currentBuild.displayName = ''
sh 'XXXXX'
}
While running I am getting the error: 运行时出现错误:
Could not open 'getent hosts ent410373 2>&1|'
无法打开“ getent主机ent410373 2>&1 |” : No such file or directory
: 没有相应的文件和目录
ent410373
is the slave agent machine which is a linux host. ent410373
是从属代理计算机,是Linux主机。
Is this error related to pipeline plugin? 这个错误与管道插件有关吗? or machine?
还是机器?
Because I am able to run the same script on jenkins using execute shell script builder plugin. 因为我可以使用执行外壳脚本构建器插件在jenkins上运行相同的脚本。
Please help. 请帮忙。
请比较两种情况的PATH值:
echo $PATH
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.