Jenkins multi-node build configuration

1.Environment preparation

Install Java

# 进入操作目录
cd /root/java

# 下载解压安装
wget https://builds.openlogic.com/downloadJDK/openlogic-openjdk/8u282-b08/openlogic-openjdk-8u282-b08-linux-x64.tar.gz
tar openlogic-openjdk-8u282-b08-linux-x64.tar.gz
mv jdk1.8.0_251 /usr/local/java

# 环境变量
echo "" >> /etc/profile
echo 'export JAVA_HOME=/usr/local/java' >> /etc/profile
echo 'export PATH=$JAVA_HOME/bin:$PATH' >> /etc/profile
echo "" >> /etc/profile
source /etc/profile

java -version

Install git

#直接yum安装
yum install -y git 

2.JenKins configure node node

The specific steps are shown in the figure:

1.

2.

3.

4.

5.

6.

7.

Leave other options as default, click Save

8. Precautions

The security group where the jenkins node is located and the security group of the build target server need to be mutually exclusive.

To pull the code from the jenkins node, you need to create an ssh key, ssh-keygen, and upload the key to the ssh key management of the code warehouse for authentication when pulling the code (the jenkins node uses ssh to pull the code, not https )

Guess you like

Origin blog.csdn.net/ArrogantB/article/details/126062140