First of all, I would like to introduce the author’s small training projects: based on SpringCloud, Docker container deployment, code hosting with Git, Jenkins continuous integration. All right, let’s cut to the chase.

A brief introduction to Jenkins

Jenkins, formerly Hudson but changed to its current name in 2011, is an open source software tool for continuous integration. Jenkins monitors integration errors, provides detailed log files and alerts, and visualizes the trend and stability of project construction in the form of charts.

Jenkins characteristics:

Easy installation:

Just a java-jar jenkins.war, download the file from the official website and run it directly without additional installation, let alone database installation;

Easy configuration:

Provides a friendly GUI configuration interface;

Changes to support

Jenkins can get and generate the code update list from the code repository (Subversion/CVS) and output it to the compilation output information.

Support permalink:

Jenkins is accessed via the Web, and the links to these Web pages are permalink addresses, so you can use the links directly in various documents;

Integrated E-mail/RSS/IM:

These tools tell you the results of an integration in real time when it’s done (as FAR as I know, it takes time to build an integration, so you can do other things while you wait for the results);

JUnit/TestNG Test Report:

That is, to provide detailed test report functionality in charts and other forms;

Support for distributed builds:

Jenkins can distribute the work of integration construction to multiple computers.

File fingerprint information:

Jenkins keeps build records of which integration builds produced which jars, which integration builds used which jars, etc.

Support third-party plug-ins:

Made Jenkins go from strength to strength

Ii. Jenkins installation

Installing the JDK

The installation of Jenkins depends on JDK. Please be sure to install JDK and set environment variables before installing Jenkins.

Install Jenkis

In Linux:

  1. To download, type the command: wget PKG. Jenkins. IO/redhat/jenk… Or visit pkg.jenkins-ci.org/redhat/, select a suitable version, download it, and upload it to the Linux directory
  2. Install the installation input command: sudo RPM ‐ivh Jenkins-2.226-1.1.noarch.rpm
  3. JENKINS_USER=”root” JENKINS_PORT=”8888″
  4. Start the service systemctl start Jenkins
  5. Visit http://ip:8888 from/var/lib/Jenkins/secrets/initialAdminPassword obtained initial password string

  1. Initial Configuration

    Wait for completion;

  2. Install the Git and Maven plug-ins