Jenkins自动构建 和docker安装
2016-03-07 12:16 youxin 阅读(1256) 评论(0) 编辑 收藏 举报Jenkins is an award-winning, cross-platform, continuous integration and continuous delivery application that increases your productivity. Use Jenkins to build and test your software projects continuously making it easier for developers to integrate changes to the project, and making it easier for users to obtain a fresh build. It also allows you to continuously deliver your software by providing powerful ways to define your build pipelines and integrating with a large number of testing and deployment technologies.
http://jenkins-ci.org/
Hudson是Jenkins的前身,是基于Java开发的一种持续集成工具。
系统设置
在已运行的Jenkins主页中,点击左侧的系统管理—>系统设置进入如下界面:
- 配置svn
- 配置构建触发条件
- 配置构建触发执行动作,将执行生成报告脚本
自动运行Build
触发一个build:
- Builds in Jenkins can be triggered periodically (on a schedule, specified in configuration) 这里定义schedule的语法是unix常见的cron语法。
- Or when source changes in the project have been detected
可以设置Jenkins定时检查SVN是否发生了变化,也可以手动检查:http://YOURHOST/jenkins/job/PROJECTNAME/pollong。也可以设置Jenkins为post-commit,这个方式尤其适用于那些检查是否代码改变会花费很长时间的情况。
- Or they can be automatically triggered by requesting the URL:
http://YOURHOST/jenkins/job/PROJECTNAME/build
- 设置构建后操作
- 构建效果
jenkins下搭建c++持续集成环境
docker安装jenkins:
Jenkins安装包有两种,一种是LTS,一种是Weekly。LTS是稳定版,Weekly每周会更新一次,一般使用LTS就行了,
docker pull jenkins/jenkins:lts
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】凌霞软件回馈社区,博客园 & 1Panel & Halo 联合会员上线
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步