[英]Shell script execution in Jenkins pipeline is stuck
Through Jenkins pipeline, I have to start license server on linux machine, hence I have written following method -通过 Jenkins 管道,我必须在 linux 机器上启动许可证服务器,因此我编写了以下方法 -
def startLicenseServer() {
sh '''
cd "/home/oracle/License"
sh ./startLicServer.sh start
'''
}
It is executed and license server is started but other statements after it in pipeline are not.它被执行并启动许可证服务器,但管道中的其他语句没有。 Could you please help me to resolve how this process is executed in background and still other following pipeline statements are executed?你能帮我解决这个过程是如何在后台执行的,还有其他以下管道语句是如何执行的吗?
The start
command is executing in the foreground. start
命令正在前台执行。 Groovy sh
command completes only if the script returns the control. Groovy sh
命令仅在脚本返回控件时完成。 Can you try executing it in the background ( sh ./startLicServer.sh start &
) and see?您可以尝试在后台执行它 ( sh ./startLicServer.sh start &
) 看看吗?
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.