Windows system installation jenkins service war package form

1. First download the jenkins war package

Note that it matches the jdk version
https://www.jenkins.io/zh/download/

2. Configure jenkins environment variables

If you do not configure environment variables, the main directory of Jenkins is generated under the c drive by default.
How to configure environment variables? Please Baidu yourself
Insert image description here

3. Run the jar package

Pay attention to modifying the war package path

java -jar  /data/jenkins/jenkins.war  --httpPort=8763

4. Modify the jenkins image source

Find the file hudson.model.UpdateCenter.xml in the directory of the jenkins environment variable
and modify the address to the Ali mirror:
https://mirrors.aliyun.com/jenkins/updates/update-center.json

5.Access jenkins

Add the server IP to the startup port
. Check the war running log and enter the secret key.
Install the recommended plug-in and wait for the installation to complete.

6. Install the gitlab plug-in and configure it

Log in to gitlab and enter the token information acquisition page
Enter the name, select api, click the generate button, and then copy for backup
Insert image description here
! [Insert picture description here](https://img-blog.csdnimg.cn/e00d706d77124f4b80e5ee53b7b63b31.png
Insert image description here

Log in to jenkins and click System Management -> Plug-in Management -> Search gitlab Installation
Restart jenkins
Insert image description here
Insert image description here

7 Configure gitlab

Enter the gitlab configuration page,
Insert image description here
Insert image description here
fill in the name, customize the name,
fill in the gitlab domain name
, click Add, and select Jenkins

Type select gitlab api token
api token to fill in the token just generated in gitlab
and then enter a custom id
Insert image description here
Insert image description here
to go back to the page just added and select the authentication token just added. Then save
Insert image description here
so far, the relevant configuration has been completed, if there is no maven plug-in to continue Search maven in the plug-in management and install the maven plug-in.

Guess you like

Origin blog.csdn.net/weixin_44931584/article/details/128717372