jenkins principle of continuous integration, functionality, deployment, etc. Introduction

Super-detailed works jenkins continuous integration, functionality, deployment, etc. Introduction

Gregg said that the original operation and maintenance 2019-08-29 00:01:00

Outline

Today simply compiled a number of conceptual content jenkins, summarized as follows:


1, the concept of

jenkins is an open source project that provides an easy to use continuous integration system that allows developers freed from the complex integration, to focus on more important business logic implementation. Meanwhile Jenkins integrated real-time monitoring error exists, provides detailed log files and alerts, but also a trend graph form display the image of the project's construction and stability.

Jenkins can build an automated continuous integration environment can use it to "automate" compile, package, deploy distributed applications, it is compatible with ant, maven, gradle and other third-party tools to build, at the same time, git seamless integration with svn, also direct support, such as github, bitbucket direct integration with leading source code hosting site.

Super-detailed works jenkins continuous integration, functionality, deployment, etc. Introduction

2, Jenkins function

Super-detailed works jenkins continuous integration, functionality, deployment, etc. Introduction

1. The timing of pulling and compile

2. Static code analysis

3. Timing packaged and released Beta

4. The custom actions, such as running testing unit

5. reminded error

Super-detailed works jenkins continuous integration, functionality, deployment, etc. Introduction

3, the principle

Super-detailed works jenkins continuous integration, functionality, deployment, etc. Introduction

Here is a selection Gitlab as git server. Gitlab functions and Github almost, but is open source, can be used to build private git server, also provides a very powerful web GUI, such as developers review source code each time will be very convenient. Workflow system roughly divided into the following steps:

1> Developer version of the new push to git server (Gitlab).

2> Gitlab then triggers jenkins master node once build. (Or timing detection by web hook)

3> jenkins master node will build this task is assigned to a plurality of registered slave node in this slave node according to a pre-set script build. This script can do many things, such as compile, test, generate test reports, and more. These would otherwise require manual tasks can be handed over jenkins do.

4> We build to be compiled, used here distcc a distributed compiler to speed compilation.

Jenkins works is first copied from the source to the local copy of the gitlab then build according to the script provided. We can see, the key is that the whole system build script that tells the task in an integrated jenkins need to be performed.

But after I use Github as a git server. But actually similar.


4, deployment

1, jenkins triggered build:

Development environment for deployment, developers push code or merge code into the master branch gitlab project, jenkins correspond to deploy code to the server.

2, jenkins parametric Construction:

After the pre-wired for a test environment deployment environment, develop push code or merge code into the master branch gitlab project, and will not deploy code, but jenkins need to log into the web interface, click on the build button, passing in the corresponding parameter (such as parameters need to build the tag, need to deploy the branch) and then will be deployed.

3, jenkins Timing Construction:

APP for automatic packaging, the timing is based on parametric building built on to add, developers can log incoming jenkins manually tag is packaged, if not manually packaged, then the package will jenkins APP every morning to take the code from the latest drawing gitlab .


5, continuous integration of classification

Super-detailed works jenkins continuous integration, functionality, deployment, etc. Introduction

1. Continuous Integration: refers to programmers in the development project code, you can frequently deploy code to the trunk, and automated testing

2. Continued interaction: refers to the continuous integration of the foundation, will deploy code to the online testing environment

3. Continuous Deployment: refers to the interaction on an ongoing basis, the code will be deployed for automatic deployment, including ongoing interaction for deployment

Guess you like

Origin www.cnblogs.com/flytor/p/11428453.html