[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 ...
随机推荐
- STM32 输入捕获的脉冲宽度及频率计算
输入捕获模式可以用来测量脉冲宽度或者测量频率.STM32 的定时器,除了 TIM6 和 TIM7,其他定时器都有输入捕获功能.以下是对脉冲宽度及频率的计算. 1.脉冲宽度 如下图所示,采集该高电平脉冲 ...
- CList 点击表头排序 (3)两种排序的第二种
在头两篇中介绍了CListCtrl::SortItems() 方法的使用和其中的一个排序方法,这篇介绍另一种方法 CList 点击表头排序 (1)SortItems函数 CList 点击表头排序 (2 ...
- MySQL 5.7 多实例安装部署实例
1. 背景 MySQL数据库的集中化运维,可以通过在一台服务器上,部署运行多个MySQL服务进程,通过不同的socket监听不同的服务端口来提供各自的服务.各个实例之间是相互独立的,每个实例的dat ...
- [TS] Implement a doubly linked list in TypeScript
In a doubly linked list each node in the list stores the contents of the node and a pointer or refer ...
- golang encoding/json
package main import ( "bytes" "encoding/json" "fmt" ) type ColorGroup ...
- Oracle调用Java类开发的存储过程、函数的方法
oracle调用java类的基本步骤 1. 编写java代码,后续可以直接使用java代码,class文件或者jar包 2. 将写好的java代码导入到oracle数据库中,有两种方法:一种是使用lo ...
- 无法显式调用运算符或访问器 错误处理方法 DLL study
无法显式调用运算符或访问器 错误处理方法 转 无法显式调用运算符或访问器 错误处理方法 反汇编一个dll类库,导出的项目会报出很多bug,其中主要的就是“无法显式调用运算符或访问器”这个错误,看了一下 ...
- vb.net 调用api
Public Declare Function GetDC Lib "user32" Alias "GetDC" (ByVal hwnd As Integer) ...
- 原生js大总结三
021.定义函数的几种方式 1.关键字函数:function fnName(){}; 2.字面量函数:var fn = function(){}; 3.构造函数:var fn = new ...
- Java Web学习总结(14)——JSP基础语法
任何语言都有自己的语法,JAVA中有,JSP虽然是在JAVA上的一种应用,但是依然有其自己扩充的语法,而且在JSP中,所有的JAVA语句都可以使用. 一.JSP模版元素 JSP页面中的HTML内容称之 ...