简体   繁体   中英

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 -

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. Groovy sh command completes only if the script returns the control. Can you try executing it in the background ( sh ./startLicServer.sh start & ) and see?

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM