As you all know, Jenkins supports distributed deployment, how does it integrate with GitHub for continuous integration? Here's how it's implemented:
To install the application:
Java, Jenkins, git, maven
MAVEN is not required for all environments and can be installed according to your actual environment.
Jenkins installation Tutorial Reference http://xunmeng.blog.51cto.com/1092116/1795093;
-
Install git and maven
-
Git installs in a simpler way, using Yum to install
-
Yum install-y git
-
wget http://mirror.reverse.net/pub/apache/ maven/maven-3/3.3.9/binaries/apache-maven-3.3.9-bin.tar.gz
-
Tar zxvf apache-maven-3.3.9-bin.tar.gz
-
mv apache-maven-3.3.9/usr/local
-
echo "Export m2_home=/usr/local/apache-maven-3.0.5 ">>/etc/profile
Echo" path= $PATH: $JAVA _home/bin: $M 2_home/bin ">>/etc/profile
-
Export m2_home=/usr/local/apache-maven-3.0.5
Export m2= $M 2_home/bin
Export path= $M 2: $PATH
Echo path=$ PATH: $JAVA _home/bin: $M 2_home/bin ">>/etc/profile
source/etc/profile
Creates a new Jenkins user in all machines and generates the SSH key for that user.
Useradd Test (This user runs the Jenkins working directory)
Ssh-keygen-t rsa-f ~/.ssh/id_rsa-p "#生成无密码key, set the password in single quotes
Sign in to GitHub to add server KEY
Login github,http://www.github.com
Open setting find the KEY in SSH key,copy id_rsa.pub to GitHub
Test SSH Connection
ssh-t [email protected]
After the login is successful, the hello * * (your github username) will be displayed ..... Omit what's behind
Open the browser, access the Jenkins Master host, and start configuring Jenkins.
The configuration tutorial is not written, because any tutorial is not suitable for all production environments, please leave a message if you need to configure.
This article is from the "Ant Dream" blog, please be sure to keep this source http://xunmeng.blog.51cto.com/1092116/1828690
Jenkins in conjunction with GitHub continuous integration environment build