Article directory
1. Use Docker to build Jenkins
Blog address: https://blog.csdn.net/YZL40514131/article/details/130044163
2. Configure the execution node for Jenkins
1. Enter the management page
2. Create a new node
3. Configure node information
4. The child node connects to the master node
The node is not online
5. Run the command copied above on the child node machine
The child node needs to have a java 11 environment.
The child node has the curl command.
The child node can communicate with the master network (can ping each other).
The child node can access the 50000 port of the master (can be tested by telnet master-ip 50000)
echo f4f697ceb0359d2b6eab5419b9e38cdc6c3a2a0a3bc403cc294eab952815cd42 > secret-file
curl -sO http://192.168.22.3:8080/jnlpJars/agent.jar
java -jar agent.jar -jnlpUrl http://192.168.22.3:8080/manage/computer/docker%20%5Fnode1/jenkins-agent.jnlp -secret @secret-file -workDir "/root/jenkins_list"
6. Check whether the child node is online
3. Create a simple job
1. Enter the creation page
2. Set the job name
3. Configure job related information