First, Download Jenkins
jenkins:https://jenkins.io/download/
Here we download the Jenkins.war
Second, start Jenkins
There are two ways to start Jenkins under Linux, one is to use commands in Jenkins.war's storage directory Java-jar Jenkins.war Boot, the other is to put Jenkins.war in the Tomcat WebApps directory, and then start Tomcat, such as:
Third, install Jenkins
Enter http://192.168.182.130:8080/jenkins/in the browser, pop up the following page:
Initialize the administrator password to go to the red box inside the file to find
After you enter the initialization administrator password, you need to install the plug-in, such as:
We choose to install the recommended plugins
After installing the plug-in, you need to create an administrator user, such as:
Four, install Git
git:https://mirrors.edge.kernel.org/pub/software/scm/git/
The download here is git-2.9.5.tar.gz
1 tar zxvf git-2.9. 5 . tar.gz 2 cd git-2.9. 5 3 ./configure prefix=/usr/local/git4 make && make install
Adding git to an environment variable
1 export git_home=/usr/local/GIT2 export path= $GIT _home/bin: $PATH
After the environment variable is in effect, enter on the command line: Git version will show git versions, such as:
Five, git install directory configuration
Enter the system Management-Global Tools Configuration page in Jenkins to add the following configuration, such as:
Vi.. Project configuration
When set up, there will be no error, such as:
After saving, start building, such as:
The build succeeds, but the execution fails, and the build steps need to be added, such as:
After adding the build steps, Save as:
Build again, execute Python file failed, hint missing related module, such as:
After installing the corresponding module using the command PIP3 install + module name, build again and execute the python file successfully, such as:
Jenkins Continuous Integration Environment deployment