Detailed explanation of Jenkins configuration and use

This article begins to introduce the simple use of Jenkins. For the installation of Jenkins, please refer to Getting Started with Jenkins-Installation;
Example: In the linux environment, the installed jenkins, integrated svn, tomcat environment, the project is a maven project.

Jenkins configuration

On the Jenkins home page, click Manage Jenkins, then click Manage Plugins to install the necessary plugins, svn, maven, ssh, etc.

Detailed explanation of Jenkins configuration and use Jenkins configuration and detailed explanation of use

Then on the Jenkins home page, click Manage Jenkins, then click Global Tool Configuration tool configuration, configure JDK, Maven, etc.

Detailed explanation of Jenkins configuration and use Jenkins configuration and detailed explanation of use

Detailed explanation of Jenkins configuration and use Jenkins configuration and detailed explanation of use

Jenkins uses

Step 1: Create a new task on the homepage, fill in the task name, and select a free-style project
 

Detailed explanation of Jenkins configuration and use Jenkins configuration and detailed explanation of use

Detailed explanation of Jenkins configuration and use Jenkins configuration and detailed explanation of use

The second step, the project name, can not be modified

Detailed explanation of Jenkins configuration and use Jenkins configuration and detailed explanation of use

Step 3: Add svn address, and set up, user name and password

Detailed explanation of Jenkins configuration and use Jenkins configuration and detailed explanation of use

Step 4: When building, there are two situations

Case 1, use maven to build the project and use the plug-in to publish

Detailed explanation of Jenkins configuration and use Jenkins configuration and detailed explanation of use

After construction, use the plug-in to publish the project and release the project. The plug-in that needs to be used for project release is (Deploy to container Plugin). To publish to tomcat, you need to use the user name and password of tomcat. Tomcat users can configure it in the conf/tomcat-users.xml file in tomcat

Detailed explanation of Jenkins configuration and use Jenkins configuration and detailed explanation of use

tomcat-users.xml configuration

Detailed explanation of Jenkins configuration and use Jenkins configuration and detailed explanation of use

Case 2, use the shell command to build the project, and then publish it directly with the command . When executing tomcat startup, you need to add the command export BUILD_ID=dontKillMe

Detailed explanation of Jenkins configuration and use Jenkins configuration and detailed explanation of use

Jenkins build output results

Detailed explanation of Jenkins configuration and use Jenkins configuration and detailed explanation of use

Guess you like

Origin blog.csdn.net/yaxuan88521/article/details/131912937