[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 ...
随机推荐
- gdbserver 使用方法
1.分别编译出在宿主机运行的交叉调试器arm-linux-gdb和在目标板上运行的gdbserver: 2.在目标板开启gdbserver#gdbserver 宿主机ip:任意指定端口号 ./待调试 ...
- hdu5387 Clock
Problem Description Give a time.(hh:mm:ss).you should answer the angle between any two of the minute ...
- ViewPager+Fragmrnt最简单结合方法
Fragment和ViewPager 本博文系本菜鸟第一次博文展示,有错误之处请虽然提出 FragmentPagerAdapter 谷歌官方提供了这么一个adapter(FragmentPagerAd ...
- matlab 可视化 —— 高级 api(montage)、insertObjectAnnotation、insertMaker
1. montage:同时显示多个图像 thumbnails = train_x(:, :, :, 1:100); thumbnails = imresize(thumbnails, [64, 64] ...
- 数据类型的提升(promotion)
假如参与运算的数据类型不同或者取值范围过小,编译器会自动将其转换为相同的类型,这个类型就叫数据类型的提升(promotion). 1. C++ 语言环境的规定 unsigned char a = 17 ...
- mysql数据库忘记密码时如何修改(转)
当我们忘记mysql数据库密码时我们就无法正常进入数据库,也就无法修改密码,那么这时该怎么修改密码呢,这里教大家一个简单常用修改密码的方式. (如果图简单快速修改密码的话,直接跳过查询步骤,依照图上执 ...
- PHP服务器环境打开配置文件
MAC 1. cd /usr/local/etc/nginx/servers vim www.xxx.com 2. 在/usr/local/etc/nginx/servers目录下,不同的 .con ...
- JSON序列化和解析
1.JSON.stringfy()用于将 JavaScript 值转换为 JSON 字符串 2.JSON.parse()用于将一个 JSON 字符串转换为 JavaScript 对象. 3.JSON. ...
- poj 3122
Pie Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 10309 Accepted: 3651 Special Ju ...
- 宏的使用 extern
声明全局变量使用的技术. 有些时候C语言的一些条条框框就像语法.学会C语言就是学会了语法. 但是语法怎样使用就又是另一回事了. 我希望自己能多学习一些技巧,而不是一些固定的C语言语法. 这篇文章真的很 ...