1.用Maven构建web项目autotest,并传到svn(http://10.90.3.84/svn/autotest/trunck/)上。
2.Jenkins服务器(10.90.3.84)
Jenkins的安装及插件(hpi),不再描述。
主要配置如下:
a> 新建autotest的maven构建项目;
b> 配置autotest对应项目的svn地址;
c> 配置build,需要设置package -Dmaven.test.skip=true
d> 配置PostSteps,需要选择SSH Server(与部署机ssh免登录),主要Transfers的相关配置:
Source files:target/autotest.war
Remove prefix:target
Remote directory:deploy/apps
Exec command:sh deploy/bin/autodeploy.sh
e>配置email,选择Editable Email Notification的默认选项,并选高级设定什么条件发送项目邮件通知。
3.app部署机(10.90.3.81)
a>resin3.1.12:
/user/local/resin/
/user/local/resin/conf/resinAutoTest.conf
/user/local/resin/bin/resinAutoTest.sh
b>jdk7
/user/local/java
c>autoapp的单项免登录
/home/autoapp/deploy/apps -> /data/ifengsite/apps
/home/autoapp/deploy/bin/autodeploy.sh
/home/autoapp/deploy/apps:
autotest -> autotest_20161102144339
autotest_20161102144010
autotest_20161102144339
2.Jenkins服务器(10.90.3.84)
Jenkins的安装及插件(hpi),不再描述。
主要配置如下:
a> 新建autotest的maven构建项目;
b> 配置autotest对应项目的svn地址;
c> 配置build,需要设置package -Dmaven.test.skip=true
d> 配置PostSteps,需要选择SSH Server(与部署机ssh免登录),主要Transfers的相关配置:
Source files:target/autotest.war
Remove prefix:target
Remote directory:deploy/apps
Exec command:sh deploy/bin/autodeploy.sh
e>配置email,选择Editable Email Notification的默认选项,并选高级设定什么条件发送项目邮件通知。
3.app部署机(10.90.3.81)
a>resin3.1.12:
/user/local/resin/
/user/local/resin/conf/resinAutoTest.conf
/user/local/resin/bin/resinAutoTest.sh
b>jdk7
/user/local/java
c>autoapp的单项免登录
/home/autoapp/deploy/apps -> /data/ifengsite/apps
/home/autoapp/deploy/bin/autodeploy.sh
/home/autoapp/deploy/apps:
autotest -> autotest_20161102144339
autotest_20161102144010
autotest_20161102144339
本文介绍如何使用Maven构建Web项目并将其通过Jenkins进行自动化部署的过程。具体步骤包括配置Jenkins以支持Maven项目构建、设置SVN源码管理、定义构建任务参数以及Post构建步骤来实现war包的远程部署。
2315

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



