Once the code is written, it’s all about automation integration

I. Jenkins service construction

1. Build Jenkins on Linux

War deployment: 1. Download the installation package jenkins.war; 2. 2. Under the installation root path, run the command java-jar jenkins.war --httpPort=8080 3. Open the browser and enter the link http://ip address :8080 4. Fill in the initial password and activate the system
# the default password: cat/var/lib/Jenkins/secrets/initialAdminPassword
Docker images are used to create an image that can be used to create a Docker image that can be used to create a Docker image.  mkdir -p /var/jenkins_node chmod -R 777 /var/jenkins_node docker run -d -uroot -p 80:8080 --name jenkins -v /var/jenkins_node:/var/jenkins_home Jenkins/Jenkins Check to see if the container is running: docker ps Go to the container: docker exec-it-uroot Jenkins /bin/bash

2. Linux set up Git environment

Yum install mkdir /xx/xx/CD /xx/xx git init/CD /xx/xx git init Git git pull origin + branch

Second, build the project

1. Configure Git code pull

Source management: Select the source address of the project, select Git, enter the repository address, and add the Credentials user validation

2. Set timed tasks

Build trigger selection: Timed construct (run every 15 minutes below) contains five fields per row, in order of minute, hour, day, month, and day of the week

H/15 * * * *

3, build

cd /home/paynewinn/ApiTest_Chinamobile
git pull --rebase origin main
python3 /home/paynewinn/ApiTest_Chinamobile/run_all_case.py

When you’re done, click Apply