Jenkins and Gradle+github Integration

Source: Internet
Author: User

1 installing Jenkins

This is the easiest way to download the latest war package files to the local Jenkins website
Then start the service via Java-jar Jenkins.war

2 Gradle GitHub related configuration

* * First install JDK Gradle Git on your machine and match environment variables.

After the Jenkins service starts, the browser accesses the http://localhost:8080/
(I have two tasks here, just created)

System Configuration
Click System Management and System settings to enter the system settings page

Configure Server Groups Center (for automatic deployment to your test environment after implementation)
First add a server Group, as shown in the following figure (your port may be 22)

And then add a server list

Server group Select the server group created above

Configure GitHub Server

API URL does not change https://api.github.com
Credentials: First generate a token on your GitHub page
Enter into yourself github->setting->personal access Tokens->new token
Follow the prompts to check the required options

After that, a token (a string that you can find a place to save) is generated.
You can then click the Add button after credentials to add the

Then select the token that you just had in the credentials option

Finally remember to apply Save

Then you can create a new task.

Go back to the main page and create a new task

Enter the task name and select the first item to build a free ...

is still some configuration of the task

As shown in the following illustration, the other default

After Setup is complete. Save

This enables Jenkins to automatically pull the code from GitHub and build and then upload the built-in jar file to your test server and execute the JAVA-JAR command for deployment whenever the push operation is made to the GitHub repository.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.