jenkins构建
来源:互联网 发布:网站模板源码免费下载 编辑:程序博客网 时间:2024/05/16 00:39
2.选择item类型进行创建,需注意:
Source Code Management:源码是从SVN上拿的,所以选择Subversion,在module-Repository URL上输入SVN地址即可
build:root pom可以将一些配置设置在pom.xml文件中,Goals and options中应该写的是一些操作,目前没搞清楚(clean install cargo:redeploy -Dmaven.test.skip=true -Ppom文件id)
Build Settings:可以在Email中填写触发构建时收到通知的收件人地址
Post-build Actions:Projects to build填写下一个进行构建的项目名称
3.新建视图new view,添加新建的item
4.需修改conf/tomcat-users.xml的user信息,添加manager
<role rolename="admin-gui"/> <role rolename="manager-gui"/> <user username="admin" password="admin" roles=" admin-gui , manager-gui "/>
5.修改pom.xml文件,放在SVN上需要构建的文件夹下:
<profile> <id>Goals and options提及的id</id> <activation> <property> <name>profile</name> <value>Goals and options提及的id</value> </property> </activation> <properties> <configDir>${basedir}/src/main/resources/一些放在SVN的配置文件</configDir> </properties> <build> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> <configuration> <source>1.7</source> <target>1.7</target> <encoding>UTF-8</encoding> </configuration> </plugin> <plugin> <groupId>org.codehaus.cargo</groupId> <artifactId>cargo-maven2-plugin</artifactId> <version>1.3.1</version> <configuration> <update>true</update> <wait>true</wait> <path>/</path> <!-- |This is the configuration deploying / redeploying to remote tomcat, |so the remote tomcat config in tomcat-users.xml should add |<role rolename="manager"/> |<user username="xxxx" password="xxxx" roles="manager"/>. --> <container> <containerId>tomcat7x</containerId> <type>remote</type> </container> <configuration> <type>runtime</type> <properties> <cargo.hostname>构建地址</cargo.hostname> <cargo.servlet.port>8080构建端口</cargo.servlet.port> <cargo.remote.uri>构建地址/manager/text</cargo.remote.uri> <cargo.remote.username>tomcat-user名称</cargo.remote.username> <cargo.remote.password>tomcat-user密码</cargo.remote.password> </properties> </configuration> </configuration> </plugin> </plugins> </build> lt;/profile>
6.部分Jenkins的配置可去/root/.m2/setting.xml更改
7.如果要在构建时执行shell命令:
下载插件SSH plugin,下载完成后重启Jenkins
查看manager Jenkins-configure system,会多一项SSH remote hosts
输入Hostname、端口、用户名、密码后保存
在新建的item中有一项Build Environment,勾选Execute shell script on remote host using ssh,SSH site中选择设置好的地址,选择构建前或构建后输入需要执行的shell命令,注意地址/opt/XXX/XXX.sh
8.一切完成后直接点击立即构建schedule a build
- jenkins构建
- jenkins构建
- Jenkins构建
- Jenkins 构建JavaHelloWorld
- Jenkins 构建JavaHelloWorld
- Jenkins自动构建
- Jenkins分布式构建
- Jenkins集成--构建job
- jenkins持续构建
- Jenkins持续构建
- jenkins分布式任务构建
- jenkins 构建配置
- jenkins定时构建
- JenKins+GitHub 自动化构建
- C# Jenkins 自动构建
- Jenkins的分布式构建
- Jenkins构建常见问题
- jenkins使用之构建
- 【C#链接数据库】用command和Connection实现系统登录界面
- Material Design 定制状态栏
- 《Effective java》笔记(第二版) --第二章(4-7)
- jsoup解析网站资源。Android
- 支付宝集成最新常见问题详解
- jenkins构建
- 如何在Android Studio中使用LeakCanary检测内存泄露
- Servlet生命周期,工作原理,eclipse第一个Servlet,Servlet线程安全
- Android View 布局 过程
- 外部系统调用AWS ML服务的接口 - Python
- Android Studio导入项目一直卡在Building gradle project info最快速解决方案
- 数据结构 B+树c代码实现
- Windows系统远程访问ubuntu系统
- 初识 Oracle启动的7个服务