首先需要安装搭建Jenkins环境,Git环境,Ant环境
Jenkins搭建:http://blog.csdn.net/qq_15792013/article/details/77528109
Git搭建:
Ant搭建:http://blog.csdn.net/qq_15792013/article/details/77507954
一、全局工具配置
入口:系统管理–>Global Tool Configuration
配置本地JDK
配置本地Git
配置本地Ant
二、系统设置
Jenkins Location
GitHub
**token的获取方法**
1)选择Add后“?”号
2)点击: personal access token
3)勾选如下权限
* admin:repo_hook - for managing hooks (read, write and delete old ones)
* repo - to see private repos
* repo:status - to manipulate commit statuse
4)创建后获得secret text
三、新建项目
新建一个自由风格的项目
General中勾选GitHub project,此项目中会出现GitHub菜单
源码管理——git
1)Repository URL:填写github仓库地址,Use https或者SSH均可
2)Credentials:Add中通过username and password类型认证
注:配置本地Git后就不会出现上面的错误提示,如果还有则切换一下github地址类型
构建——invoke ant
- 5.