Article directory
1. gitlab configuration
1. Install the gitlab plug-in and configure it
Log in to gitlab and enter the token information acquisition page
. Enter the name, select the api, click the generate button, and then copy for later use.
Log in to jenkins and click System Management -> Plug-in Management -> Search gitlab Installation
Restart jenkins
2. Configure gitlab
Enter the gitlab configuration page,
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 Fill in the token just generated in gitlab
and enter a custom id
Return to the page just now and select the authentication token you just added. Then save
Second maven configuration
1. Install maven plug-in
Select this, here is what I have installed
2. Configure maven environment
If you have not installed maven, you can directly use the maven provided by jenkins to install it.
If you have installed maven, you need to fill in the maven address on the service.
Note: If you use docker to install jenkins, you need to fill in the path address of jenkins in docker.
For example: This is my The docker start command,
I mapped /var/jenkins_home to /home/data/jenkins_data,
so my maven must be placed in the /home/data/jenkins_data directory, and jenkins can access it,
so the actual path of maven is /home/data /jenkins_data/apache-maven-3.6.3
but /var/jenkins_home/apache-maven-3.6.3 needs to be filled in the jenkins configuration
Then find this module and fill in the setting file of mavne.
The configuration is completed.
Three nodejs configuration
1. Install nodejs plug-in
Enter the jenkins plug-in management module,
search node
and select this
2. Configure nodejs
Enter the tool management module,
find the nodejs installation module
, because my server does not have nodesjs installed, so I choose automatic installation here
, give an alias, select the adapted version, and save it
Four ssh configurations
basic configuration
Enter system configuration
Enter ssh configuration
Configure
and click Advanced to select Use Password, then enter the user password
Build configuration
Enter the post-build operation and select send build artifacts over ssh