diff --git a/Jenkinsfile b/Jenkinsfile index 6a33223..0425f4e 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -14,6 +14,7 @@ pipeline { stage('Deploy') { steps { bat ''' + echo "checking Tomcat is running" netstat -ano | find "8005" > nul if errorlevel 1 ( @@ -22,7 +23,7 @@ pipeline { echo "Tomcat is running, shutting down..." cd C:\\localhost-tomcat\\apache-tomcat-10.1.36-windows-x64\\apache-tomcat-10.1.36\\bin call shutdown.bat - ping -n 5 127.0.0.1 > nul + ping -n 5 127.0.0.1 > nul ) echo "del" @@ -34,7 +35,8 @@ pipeline { ping -n 5 127.0.0.1 > nul echo "start" - start /B cmd /c "C:\\localhost-tomcat\\apache-tomcat-10.1.36-windows-x64\\apache-tomcat-10.1.36\\bin\\startup.bat" + cd C:\\localhost-tomcat\\apache-tomcat-10.1.36-windows-x64\\apache-tomcat-10.1.36\\bin + call startup.bat ''' } }