[Jenkins] Creating Application builds
After installing the jenkins, we start creating new job.
1. Give job names (your project name):
2. Go to "Source Code Management tab":
Connect to source code:
3. Go to the "Build" tab, using the drop down menu, to select a step.
Normally like a web app, you can select "Excute Shell" / "Excute Windows batch command".
Here, because we use Java application as an example, so we select "Invoke top-level Maven targets".
4. Give the command should be excuted.
In the example we just need to use 'mvn compile' to compile a Java app.
5. In some case, the root dir is not the app's root dir, you can click "advanced" button to add more information. (see the pic above)
6. After those step, you are able to Build the application by clicking "Build now".
So now jenkins will do the following steps:
- Go to our github, clone the source code and put the code inside "~/.jenkins/Workspace/atomsphere" folder.
- Output file (if any) will be also put inside this folder.
Usually the output files will be some file we want to use, for example a web app, the output might be the bundle files that we want to served.
Now everytime you click "Build Now" button, it will re-generate new files and discard the previous files. But we might want to keep history instead of throw those away.
7. Archive previous version files
We can actaully choose which files (folder) actually we want to keep. For web app, it might be just one "dist" folder.
Here we want to keep jar file which generated by comiler.
8. Now after we build again, we will get a copy:
9. You might also want to clean the files after some time, you can also chain the command together. such as:
mvn clean
mvn package
10. Those jenkins job are actually saved into a config.xml file inside "workspace/[job_name]" folder.
If anything change on this file manully, you can also click "Reload Configuration from Disk" to get latest changes.
[Jenkins] Creating Application builds的更多相关文章
- Jenkins(二)
官网:https://wiki.jenkins-ci.org/display/JENKINS/Meet+Jenkins 我的这篇文章不过简单的依据上文,介绍Jenkins提供了哪些功能.详细大家还是要 ...
- Jenkins(两)
官网:https://wiki.jenkins-ci.org/display/JENKINS/Meet+Jenkins 我的这篇文章不过简单的依据上文,介绍Jenkins提供了哪些功能.详细大家还是要 ...
- Jenkins Docker 插件
原文地址:https://wiki.jenkins.io/display/JENKINS/Docker+Plugin Created by magnayn -, last modified by Ni ...
- jenkins构建结果企业微信提醒
每当jenkin在构建之后我们想把构建结果SUCCESS/FAILURE或者其他信息通知给其他人,也许有人会说,不是有邮件提醒吗?但是我这里的环境邮件提醒的话所被通知者并不会第一时间去阅读,所以我们用 ...
- DEVOPS技术实践_15:使用Docker作为Jenkins的slave
前面实验了使用docker搭建一个jenkins,下面实验使用docker作为jenkins的slave节点 1. 环境准备 一个运行Docker的主机或者群集 Jenkins应该能访问互联网,方便安 ...
- Jenkins构建时报错:No Space left on device
Jenkins在自动化构建服务的同时也在消耗服务器的磁盘空间,如果构建的项目个数很多,而Jenkins 服务器磁盘空间又不是非常大的话,每隔一段时间磁盘空间就会爆满导致,就会出现磁盘空间不足无法构建的 ...
- jenkins 插件Copy Artifacts + Artifacts to copy
问题及遇到的错误: Unable to access upstream artifacts area /var/lib/jenkins/jobs/PROJECTNAME-Master-Branch/b ...
- Jenkins遇到问题二:Jenkins服务器磁盘空间管理策略
Jenkins在帮助我们自动化构建服务的同时也在消耗服务器的磁盘空间,试想如果构建的项目个数很多,而Jenkins 服务器磁盘空间又不是非常大的话,每隔一段时间磁盘空间就会爆满导致Jenkins出现磁 ...
- Jenkins的配置
原文:http://www.cnblogs.com/itech/archive/2011/11/04/2236230.html 1 修改jenkins的根目录,默认地在C:\Documents an ...
随机推荐
- Docker+Mongodb
原文:Docker+Mongodb docker search mongodb docker run -d -p 2701:27017 -v /usr/mongodb/data:/data/db - ...
- 【习题 7-2 UVA-225】Golygons
[链接] 我是链接,点我呀:) [题意] 在这里输入题意 [题解] 暴力枚举每次走哪里就好. 用一个二维数组来判重.(数据里,要求不能经过一个点两次->但路径可以相交 然后再用一个flag数组, ...
- 【2017 Multi-University Training Contest - Team 7】Kolakoski
[Link]:http://acm.hdu.edu.cn/contests/contest_showproblem.php?pid=1011&cid=765 [Description] 有一种 ...
- Core Animation 文档翻译—附录A(Layer样貌相关属性动画)
前言 在渲染过程中,核心动画获取Layer的各种属性并以特定的顺序渲染他们.这个顺序决定了Layer的最终的样貌.本节将会阐述通过设置不同的Layer样貌相关属性对应产生的渲染结果. 注意:Mac ...
- GO语言学习(十八)Go 语言接口
Go 语言接口 Go 语言提供了另外一种数据类型即接口,它把所有的具有共性的方法定义在一起,任何其他类型只要实现了这些方法就是实现了这个接口. 实例 /* 定义接口 */ type interface ...
- cocos2dx--vs2012+lua开发环境搭建
cocos2dx版本号:cocos2dx2.2.3 lua插件:babelua 1.5.3 下载地址:http://pan.baidu.com/s/1i3mPD8h 第一步:先关闭vs,双击下载下来 ...
- Varnish 实战
Varnish 实战项目 目录 实现基于Keepalived+Haproxy+Varnish+LNMP企业级架构 一.环境准备 1.1 相关配置 1.2 安装服务 1.3 关闭防火墙及selinu ...
- t_user is not mapped [from t_user as u where u.loginname = :loginname and u.password =:password]
转自:https://blog.csdn.net/u010876380/article/details/52714539 错误: Struts Problem Report Struts has de ...
- 使用javascript实现图片上下切换效果并且实现顺序循环播放
<!doctype html><html lang="en"><head> <meta charset="UTF-8" ...
- Java基础学习总结(50)——Java事务处理总结
一.什么是Java事务 通常的观念认为,事务仅与数据库相关. 事务必须服从ISO/IEC所制定的ACID原则.ACID是原子性(atomicity).一致性(consistency).隔离性(isol ...