1.先在jekins中配置服务器相关信息

2.在项目配置中配置远程操作


3.参考远程命令
netstat -tunlp|grep 7080|awk '{print $7}'|awk -F '/' '{print $1}'|xargs kill -9
rm -rf /home/tomcat8/apache-tomcat-8.5.58/webapps/testspringboot*
cp /home/testspringboot.war /home/tomcat8/apache-tomcat-8.5.58/webapps/testspringboot.war
sh tomcat8/apache-tomcat-8.5.58/bin/startup.sh
本文介绍如何使用Jenkins实现Tomcat应用的自动化部署。主要内容包括:在Jenkins中配置服务器信息,设置项目的远程操作,以及通过执行特定的Shell命令来完成应用的停止、清理旧文件、上传新包并启动服务。
1万+

被折叠的 条评论
为什么被折叠?



