简体   繁体   English

从詹金斯(Jenkins)启动WebLogic

[英]start WebLogic from Jenkins

I want to stop and start WebLogic from Jenkins. 我想停止并从Jenkins启动WebLogic。 If I start by shell script in Jenkins: 如果我从詹金斯的Shell脚本开始:

./startWebLogic.sh 

the process is not finished, but WebLogic is started. 该过程尚未完成,但是WebLogic已启动。

If I start by shell script with nohup in Jenkins: 如果我在Jenkins中以shell脚本启动nohup脚本:

. ./setWLSEnv.sh

nohup ./startWebLogic.sh > /dev/null &

the process is finished, but WebLogic is not started. 该过程已完成,但是WebLogic没有启动。

I tried the same script on the same server from putty, in result process is finished and WebLogic is started. 我在腻子的同一台服务器上尝试了相同的脚本,结果处理已完成并且WebLogic已启动。

How I can start WebLogic and execute other shell script from Jenkins. 我如何启动WebLogic并从Jenkins执行其他Shell脚本。

It worked for me. 它为我工作。 But this code has one issue. 但是这段代码有一个问题。 When you put your process in background you can't see logs of the process. 当您将流程置于后台时,您将看不到流程的日志。 And if your weblogic couldn't start at all you will know that only on the further stages (trying to deploy - in my case). 而且,如果您的Weblogic根本无法启动,您将仅在以后的阶段(尝试进行部署-以我为例)知道这一点。

stage('Start WLS') {
    steps {
        sh '${DOMAIN_BIN_DIR}/startWebLogic.sh &'
    }
}

Hope, someone will give a better solution with ability to determine the fact of Weblogic's fall on the running stage. 希望有人能够提供一种更好的解决方案,使其能够确定Weblogic处于运行阶段的事实。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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