Jenkins 服务搭建 【略】

直接展示配置

1,服务搭建好后的界面:

Jenkins 自动部署

一,新建项目,点击新建后就界面

Jenkins 自动部署

点击3 确定,进入

1, General

Jenkins 自动部署

2,源码管理

Jenkins 自动部署

3,构建触发器

Jenkins 自动部署

4,构建环境Pre Steps、Build

Jenkins 自动部署

5,构建设置、构建后操作

Jenkins 自动部署

注意tomcat重启脚本

1,jenkin 中Exec command 执行文件复制并进行重启如下

 cp /root/apache-tomcat-x.x.x/webapps/target/*.war /root/apache-tomcat-x.x.x/webapps/ROOT.war

/root/apache-tomcat-x.x.x/shellrestart restart

重启脚本:shellrestart

#!/bin/sh

# description: Auto-starts tomcat
# processname: shellrestart
case $1 in
start)
sh /root/apache-tomcat-8.x.xx/bin/startup.sh
;;
stop)
sh /root/apache-tomcat-8.x.xx/bin/shutdown.sh
;;
restart)
sh /root/apache-tomcat-8.x.xx/bin/shutdown.sh
sh /root/apache-tomcat-8.x.xx/bin/startup.sh
;;
esac
exit 0

到此 game over!


相关文章:

  • 2021-11-01
  • 2021-10-09
  • 2020-05-20
  • 2020-07-07
  • 2018-06-29
  • 2019-02-01
  • 2021-11-04
猜你喜欢
  • 2021-08-06
  • 2021-10-17
  • 2021-01-19
  • 2018-10-19
  • 2021-07-17
  • 2021-08-17
  • 2021-10-08
相关资源
相似解决方案