1
All checks were successful
LOCALNET-DEV/pipeline/head This commit looks good

This commit is contained in:
nevermoregb 2025-02-21 14:13:57 +09:00
parent bebc1d0cd7
commit a84ed04027

14
Jenkinsfile vendored
View File

@ -14,11 +14,21 @@ pipeline {
stage('Deploy') {
steps {
bat '''
netstat -ano | find "8080" > nul
if errorlevel 1 (
echo "Tomcat is not running, skipping shutdown..."
) else (
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
timeout /t 5 /nobreak
)
copy /Y build\\libs\\*-plain.war C:\\localhost-tomcat\\apache-tomcat-10.1.36-windows-x64\\apache-tomcat-10.1.36\\webapps\\ROOT.war
timeout /t 5 /nobreak
cd C:\\localhost-tomcat\\apache-tomcat-10.1.36-windows-x64\\apache-tomcat-10.1.36\\bin
call shutdown.bat
timeout /t 5 /nobreak
call startup.bat
'''
}