Jenkins集成Github

Posted 自动化测试工作记录

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Jenkins集成Github相关的知识,希望对你有一定的参考价值。


Install Github Plugin

Dependence Pluginplain-credentials git  credentials  github-api


Configure Github Plugin

  1. Manage Jenkinsà System Configurationà Github Plugin Configuration

  2. Set “Github user.name” and “Github user.email” as your Github account

  3. Set Github name and path in “Global Tool Configuration”    Jenkins集成Github


Create a new Job in Jenkins

Input Item name, select “Freestyle project”, and click “OK”

 

Jenkins集成Github


Configure Job

  1. Select Git in Source Code Management

    Jenkins集成Github


Enter Repositories URL and Credentials

1)     Open your Github repository, and click “Clone or download”, copy the URL into Jenkins

Jenkins集成Github

2) Generating a new SSH key and adding it to the ssh-agent

Follow the step of  https://help.github.com/articles/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent/ , copy your .ssh folder underJenkin home

3)     Set Credentials using SSH key generated last step


4)     Select “Build HP test from file system” under “Build”, set your tests,then click OK to create job


5)     Click “Build Now”, you will see the result after building


Issue solution aboutGithub

1.  Permission Denied

http://www.oschina.net/question/1182280_118510

2.    Proxy CONNECT aborted

http://stackoverflow.com/questions/30537386/connection-error-with-cocoapods-proxy-connect-aborted

 

 



以上是关于Jenkins集成Github的主要内容,如果未能解决你的问题,请参考以下文章

jira是怎么与jenkins集成的

jenkins 集成rancher

12.Jenkins持续集成企业实战

Jenkins——持续集成介绍及Jenkins安装部署(插件+用户权限+凭据+Maven打包)

Jenkins持续集成

Jmeter+Jenkins持续集成(三集成到Jenkins)