[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 ...
随机推荐
- 洛谷——V1772 巧妙填数
描述 将1,2,\cdots,91,2,⋯,9共99个数分成三组,分别组成三个三位数,且使这三个三位数构成1:2:31:2:3的比例. 试求出所有满足条件的三个三位数.例如:三个三位数192,384, ...
- 数学定理证明机械化的中国学派(II)
所谓"学派"是指:存在一帮人,具有同样或接近的学术观点或学术立场,採用某种特定的"方法"(或途径),在一个学术方向上共同开展工作.而且做出了相当有迎影响的学术成 ...
- Windows Server 2016 上配置 APACHE+SSL+PHP+perl
Windows Server 2016 上配置 APACHE+SSL+PHP+perl 安装环境 谷歌云实例 Windows Server 2016 Apache Apache/2.4.25 (win ...
- WebSocket兼容到低版本浏览器
就目前而言,WebSocket是最好的Web通信解决方案了.但是IE从10才开始兼容它,对于目前大量IE8存在的市场,原生的WebSocket显然不太实用,我们需要低版本兼容的解决方案.于是我模拟We ...
- Flume Sink Processors官网剖析(博主推荐)
不多说,直接上干货! Flume Sources官网剖析(博主推荐) Flume Channels官网剖析(博主推荐) Flume Channel Selectors官网剖析(博主推荐) Flume ...
- Apache/Tomcat/JBOSS/Nginx区别(转)
先说Apache和Tomcat的区别: Apache是世界使用排名第一的Web服务器软件.它可以运行在几乎所有广泛使用的计算机平台上,由于其跨平台和安全性被广泛使用,是最流行的Web服务器端软件之一. ...
- ARCGIS刷新的故事
转自原文章ARCGIS部分刷新 1, IActiveView.Refresh 全局刷新,即重绘地图中的所有内容,是效率最低的一种刷新方法.当数据量大时非常耗时.所以除非绝对必要,一般推荐使用IActi ...
- docker中发布springboot
http://note.youdao.com/noteshare?id=81a603b1b33731aaef7b7755c70f33fb
- Javascript和jquery事件--双击事件
在js中和jq中对应的命名都为dblclick,ondblclick,但是ondblclick和dom元素的属性相似,可以在行内设置,也可以使用attr设置. 同时,双击事件需要关注一个问题,那就是双 ...
- JMeter--聚合报告之 90% Line 正确理解
90% Line 参数正确的含义: 虽然,我的上面理解有一定的道理,显然它(90% 用户的响应时间)是错误的.那看看JMeter 官网是怎么说的? 90% Line - 90% of the samp ...