Automatic Packaging and Publishing of Code by Jenkins+Maven+Svn

Time:2019-10-9

Preface

Maybe many small partners know that in the early days of general interconnected enterprises, most of them use manual packaging to upload and publish code. The common way is to use packaging tools to manually package, upload to WEB server, backup the original code files, publish new code, restart service and check whether the release is successful.

With the passage of time, the number of WEB clusters is increasing. This manual operation will greatly reduce production efficiency. Therefore, a kind of “continuous integration” has been implemented. As for what is “continuous integration”, please Baidu or Google.

Today, Migrant Worker Brother tells you about a small part of “continuous integration”: the function of automatic packaging and code release, which is also commonly used in production environment.

Install JDK, Tomcat environment

Install jdk, Tomcat environment

[[email protected]centos6 ~]# tar zxf jdk-8u111-linux-x64.tar.gz -C /usr/local/

[[email protected] ~]# tar zxf apache-tomcat-8.5.9.tar.gz -C /usr/local/

[[email protected] local]# export JAVA_HOME=/usr/local/jdk1.8.0_111

[[email protected] local]# export CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar

[[email protected] local]# export PATH=$JAVA_HOME/bin:$PATH

[[email protected] local]# export CATALINA_HOME=/usr/local/apache-tomcat-8.5.9

[[email protected] local]# source /etc/profile

[[email protected] local]# java -version

java version "1.8.0_111"

Java(TM) SE Runtime Environment (build 1.8.0_111-b14)

Java HotSpot(TM) 64-Bit Server VM (build 25.111-b14, mixed mode)

Install and configure Jenkins

Download Installation Pack on Official Website

[[email protected] ~]# wget http://mirrors.jenkins.io/war-stable/latest/jenkins.war

[[email protected] ~]#cp jenkins.war /usr/local/apache-tomcat-8.5.9/webapps/

[[email protected] webapps]#../bin/startup.sh &

Login WEB interface for configuration

Automatic Packaging and Publishing of Code by Jenkins+Maven+Svn

Prompt for password

Automatic Packaging and Publishing of Code by Jenkins+Maven+Svn

You can find the initial password in the following file

[[email protected] webapps]# cat /root/.jenkins/secrets/initialAdminPassword

0d647a32992149b3b43f77e4bda93809

Enter your password and jump to the next interface

Then choose to install the plug-in, the next step is OK.

Automatic Packaging and Publishing of Code by Jenkins+Maven+Svn
installation is complete

Creating Users and Passwords

Automatic Packaging and Publishing of Code by Jenkins+Maven+Svn

After completion, you can go to the home page interface to configure and manage it.

Automatic Packaging and Publishing of Code by Jenkins+Maven+Svn

Next install the following plug-ins

Install Maven plug-ins through system management-management plug-ins

Because uploading pictures often fails and there are many pictures in installation steps, you can access the following address if you need to see the full text:
Portal

Automatic Packaging and Publishing of Code by Jenkins+Maven+Svn

Recommended Today

Crackme023

Crackme023 reverse analysis 1. Program observation When the sequence number entered is correct, the following state should change. 2. Simple shell check Written in assembly language, no shell. 3. Program analysis Using OD loader, search string You can see that the string in the status bar appears inside, and we go into the corresponding code […]