This is the sixth day of my participation in Gwen Challenge
Jenkins is an open source continuous integration (CI) tool that provides a user-friendly interface. Originated in Hudson (Hudson is commercial), Jenkins is mainly used for continuous, automated building/testing of software projects, monitoring the execution of external tasks, For the convenience of deployment, we deploy this platform to improve the development efficiency. We adopt Tomcat installation and deployment. First, install Tomcat, download Jenkins installation package, put it under Tomcat webApp, start Tomcat, set server. XML viewing port, Enter http://your_ip:your_port/jenkins on the web page and press EnterCopy the code
Then enter your password and click ContinueCopy the code
The left side is to install the plugins recommended by Jenkins, and the right side is to select the plugins you need to install, any of which will do (the left side is recommended for beginners).Copy the code
After the plug-in is successfully installed, create a userCopy the code
After successful creation, enter the home page (there are tasks THAT I have already created, which can be ignored)Copy the code
Then I choose New task, which can be of different types according to different requirements. I choose to build a multi-configuration projectCopy the code
# yum -- y install git # yum -- y install git # yum -- y install git Git --version looks at the version, whereis git looks at the file pathCopy the code
Obtain the git path and configure it in the global tool configurationCopy the code
Then go to task configuration to configure git repository. If the following figure is displayed, you need to configure identity authentication
Create new credentials Create different credentials depending on how you are connected to Git (SSH and password)Copy the code
After the creation is complete, select the credentials in task configuration, save the configuration, and view the log. Finished: Success is displayedCopy the code
After pull code to build compilation, if need to compile, need to configure maven and JDK environment in the global tool, can be compiled, if you have multiple pom file can be configured in advanced, specify the pom file location choice, and then build, if be micro service architecture, pack to order may have a problem, So you can set triggers to choose the packaging order, you can choose a variety of trigger rules, I am using other projects to build after the trigger, when my common task is packaged, the task will be packaged, if the timing of the build requires some CRon time expression, according to different needs of the free choiceCopy the code
You can generate the required JAR or WAR, and if you need to do something else you can add multiple build steps, choosing different types of build steps based on your requirementsCopy the code
The above is the most simple basic process of Jenkins, any questions welcome to point out!!Copy the code