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.