Jenkins: A tool for continuous integration
GitHub: Remote Store code
Maven: Create a project with MAVEN, configure POM.XM dependencies
Git: Local repository, can commit code to remote (I use Git to submit code in git Bush here Command)
Linux: Operating system
(1) Create a MAVEN project (I created it using Eclipse)
(2) Submit Maven project to GitHub via local git
(3) Installing Jenkins on Linux
Download RPM installation package from official website address: https://jenkins.io/
Operation Steps:
Go to the official website and click Download
Drop-down, select the location shown (Linux system)
After clicking, select the version you want to download the RPM package
After the installation package is downloaded: Log in to the Linux server using Xshell, use the Xftp tool to upload the installation package to Linux, and start the installation
Installation Reference Link: http://blog.csdn.net/andyzhaojianhui/article/details/73472500 (refer to the second type of link)
Root User: Extract and install Jenkins using the Rpm-ih jenkins-2.7.1-1.1.noarch.rpm command
Use the Service Jenkins Start command to start the Jenkins service in the browser by entering http://Host ip:8080 access to Jenkins such as http://127.0.0.1:8080 (default port is 8080)
For registration please refer to the link: https://www.liaoxuefeng.com/article/001463233913442cdb2d1bd1b1b42e3b0b29eb1ba736c5e000
Sign up after Login: go to page
Click System Management First
Select Global Tool Configuration (Configure environment)
Only three items to configure (JDK, Maven,git)
JDK configuration: Aliases It doesn't matter what you fill out here, Java_home: Be sure to fill in the JDK installation path on your Linux
Git configuration: Like JDK, name doesn't matter, path to Git executeable must be populated with the installation path on Linux
MAVEN configuration: Name casually write, choose Automatic installation, version there to choose the right version according to your needs
Once this is configured, drop-down to save is OK.
Next build the project *************************************
Select New
Fill in the name: you can name one for example Demo1, choose Maven Project build, click OK
After the MAVEN project is built, start configuring the project ********************
Direct drop-down to source management: choose Git to fill out the remote link for your project (I use Github:http://github.com/dfx339/test.git)
Then click on add--"Jenkins, enter the login name of GitHub and password click Add in username and password respectively.
Then pull down here and add the pom.xml of the project on GitHub (if you write pom.xml directly under the project root, otherwise you will write with the path)
Then click Save, the configuration is finished (this is the simplest of them)
Then you can start clicking Build (red is build failure, Blue is build success)
The build results appear in the build history (shown here in the red box) to see the details (including GitHub's submission records, MAVEN's test results ...). )
Jenkins+github+maven+git+linux