jenkins performs gitlab, maven, nodejs, ssh configuration

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.
Insert image description here
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

2. 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 Fill in the token just generated in gitlab
and enter a custom id
Insert image description here
Insert image description here
Return to the page just now and select the authentication token you just added. Then save
Insert image description here

Second maven configuration

1. Install maven plug-in

Insert image description here
Insert image description here
Select this, here is what I have installed
Insert image description here

2. Configure maven environment

Insert image description here
Insert image description here
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,
Insert image description here
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

Insert image description here
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,
Insert image description here
search node
Insert image description here
and select this
Insert image description here

2. Configure nodejs

Enter the tool management module,
Insert image description here
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
Insert image description here

Four ssh configurations

basic configuration

Enter system configuration
Insert image description here
Enter ssh configuration

Insert image description here
Configure
Insert image description here
and click Advanced to select Use Password, then enter the user password

Insert image description here

Build configuration

Enter the post-build operation and select send build artifacts over ssh
Insert image description here
Insert image description here

Guess you like

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