1. I wanted to put the python code in the server, and then start jenkins in the server to run this program through docker, and found that the path after startup is the jenkins path in the container: var/jenkins_home/workspace/
Ignoring that the container and the host are file isolation, so the command is executed to copy the python file in the server to the jenkins container.
docker cp jenkins:/var/jenkins_home/workspace/ /wechat_test/test_case.py
2. Then configure it through jenkins
Here because I created the first_pyhton project, I need to switch to the first_pyhton directory first.
3. Next, click Build and open the console output to see the execution result.