Linux学习笔记:Jenkins的使用(二)

一些插件的使用

Deploy to container Plugin

jenkins安装完成之后,添加插件 Deploy to container Plugin ,这个插件可以将打好的war包部署到tomcat中。

运行tomcat,在~/config/tomcat-users.xml中添加管理员用户信息。

<role rolename="manager-gui"/>
<role rolename="manager-script"/>
<role rolename="manager-jmx"/>
<role rolename="manager-status"/>
<user username="tomcat" password="tomcat" roles="manager-gui,manager-script,manager-jmx,manager-status"/>

在jenkins的 Post-build Actions 步骤中,添加 Deploy to container Plugin 插件,在插件配置信息中填写刚在tomcat中配置的信息。注意要保持tomcat处于运行状态,这样就可以完成项目的持续部署了。

jenkins和tomcat不在同一个服务器上时,需要正确填写tomcat所在机器的ip地址或者域名,这样 Deploy to container Plugin 会将war包远程传输过去。 

END

猜你喜欢

转载自www.cnblogs.com/colin220/p/10769356.html
今日推荐