CN109558147A - A kind of continuous integrating platform construction method based on Jenkins and Gitlab - Google Patents
A kind of continuous integrating platform construction method based on Jenkins and Gitlab Download PDFInfo
- Publication number
- CN109558147A CN109558147A CN201811443662.0A CN201811443662A CN109558147A CN 109558147 A CN109558147 A CN 109558147A CN 201811443662 A CN201811443662 A CN 201811443662A CN 109558147 A CN109558147 A CN 109558147A
- Authority
- CN
- China
- Prior art keywords
- jenkins
- gitlab
- construction method
- continuous integrating
- platform
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/60—Software deployment
- G06F8/61—Installation
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/36—Preventing errors by testing or debugging software
- G06F11/3604—Software analysis for verifying properties of programs
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/36—Preventing errors by testing or debugging software
- G06F11/3664—Environments for testing or debugging software
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- General Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Software Systems (AREA)
- Computer Hardware Design (AREA)
- Quality & Reliability (AREA)
- Stored Programmes (AREA)
Abstract
The invention discloses a kind of continuous integrating platform construction method based on Jenkins and Gitlab, include the following steps: the interface for customizing Jenkins, according to cpu busy percentage, content free time degree and the automatic adverse Agent of disk size;Container mirror image is made according to environment configurations, after the plug-in unit after customization reads the first configuration file, reads the second configuration file and third configuration file automatically according to demand;The Gitlab is used for store code, carries out Version Control, the Jenkins executes the instruction for generating App, and the instruction that the execution generates App is pushed to remote warehouse.Continuous integrating platform construction method provided by the invention based on Jenkins and Gitlab, can be used the mode of containerization, using backup is locally stored, realize key deployment.
Description
Technical field
The present invention relates to a kind of platform construction method more particularly to a kind of continuous integratings based on Jenkins and Gitlab
Platform construction method.
Background technique
Gitlab is distributed code management server, and developer services code Push to the Gitlab of new version App
Device, Gitlab can trigger Jenkins master and carry out a Build while saving code.
Jenkins is a continuous integrating tool, allows master slave mode.After Gitlab triggers Jenkins master,
Build task can be distributed to several registered Agent nodes by Jenkins master node, and Agent node can basis
The script set in advance carries out Build, and script can compile, and tests, and generates test report etc..
The plug-in unit of the owned very abundant of Jenkins, is customized according to self-demand.Be first for
The interface at the interface Jenkins, Jenkins itself can distribute task, but be the absence of the collection to Agent node resource, and push away
Recommend problem.Though Jenkins plug-in unit is more, mostly third party is developed, and customization is poor.
In the prior art, App upgrading is directed to application version control with bug reparation, and program file, configuration file is all
It is very huge data volume.If this is simple on the server with the format management of file, for administrator, it is
Catastrophic challenge.The distributed management that Gitlab is provided, can be good at solving the problems, such as this.The interface UI of Web can mention
For the management intuitively changed, facilitates push and pull code or configuration file.These files can be used in Jenkins, generate corresponding
App, be published to platform.But there is problems: 1.Gitlab builds complexity;The interface 2.Jenkins ease for use is poor;
3.Jenkins build in the works cannot replacement agent in need, if necessary can only by different build plan come
It realizes.
Therefore, it is necessary to provide a kind of platform construction method, it is able to solve problem above.
Summary of the invention
Technical problem to be solved by the invention is to provide a kind of platform construction methods, are able to use the mode of containerization,
Using backup is locally stored, key deployment is realized.
The present invention is to solve above-mentioned technical problem and the technical solution adopted is that provide a kind of based on Jenkins and Gitlab
Continuous integrating platform construction method, include the following steps: the interface for customizing Jenkins, it is idle according to cpu busy percentage, content
Degree and the automatic adverse Agent of disk size;Container mirror image is made according to environment configurations, the plug-in unit after customization reads the first configuration
After file, the second configuration file and third configuration file are read automatically according to demand;The Gitlab is used for store code, into
Row Version Control, the Jenkins executes the instruction for generating App, and the instruction for executing generation App is pushed to long-range storehouse
Library.
Preferably, the Jenkins includes customizing Jenkins mirror image, and the Jenkins mirror image includes third side plug
With customization plug-in unit.
Preferably, the Jenkins uses the scheduling strategy of marathon, is mentioned by the flexible resource distribution of Mesos
High resource utilization.
Preferably, the remote warehouse downloading source code sends a notification message if failed download to the platform.
Preferably, the remote warehouse downloads source code, if downloaded successfully, operational safety scans the App.
Preferably, start Build after operational safety scans the App, if Build fails, send notice and disappear
The platform is ceased, if Build success, is environmentally installed in BVT test, if testing environmentally install failure in BVT,
It then sends a notification message to the platform.
Preferably, if BVT test environmentally install successfully, installed in deployed environment and send a notification message to
The platform.
Preferably, if environmentally installed successfully in BVT test, but environmentally fail in test, then send notice and disappear
The platform is ceased, if environmentally succeeded in test, runs BVT.
Preferably, if operation BVT failure, sends a notification message to the platform, if operation BVT success,
It installs and is sent a notification message to the platform in deployed environment.
The present invention compare the prior art have it is following the utility model has the advantages that it is provided by the invention it is a kind of based on Jenkins and
The continuous integrating platform construction method of Gitlab, can be used the mode of containerization, using backup is locally stored, realize a key portion
Administration, and the function and correctness of code can be detected by automatic test.
Detailed description of the invention
Fig. 1 is continuous integrating platform construction method of one of the embodiment of the present invention based on Jenkins and Gitlab
Frame diagram;
Fig. 2 is continuous integrating platform construction method of one of the embodiment of the present invention based on Jenkins and Gitlab
Flow chart;
Fig. 3 is continuous integrating platform construction method of one of the embodiment of the present invention based on Jenkins and Gitlab
Another flow chart.
Specific embodiment
In the following description, in order to provide thorough understanding of the invention, many concrete details are elaborated.However, this hair
Bright to practice in the case where these no concrete details, this will be aobvious and easy for the common technical staff in this field
See.Therefore, concrete details elaboration is only exemplary, and concrete details can be changed by bold and unrestrained spirit and scope
And it is still considered as within the spirit and scope of the present invention.
Fig. 1 is continuous integrating platform construction method of one of the embodiment of the present invention based on Jenkins and Gitlab
Frame diagram.With reference to Fig. 1, Gitlab with Jenkins master is connected, and the Jenkins is connected with multiple Agent, multiple
Agent is separately connected exploitation server, testing service device and product servers.
In order to Jenkins master and Agent can normal communication, establishment of connection must be two-way.Usually have with
Under several connection types:
SSH:master connects slave by the SSH agreement of standard.
Java Web Start:Java is applied to be started on agent host, and Master and agent are established by TCP and connected
It connects.This method often uses in the case that master cannot be initiated the connection inside firewall in agnet.
Windows service: this method is that registration agnet is serviced on remote host as one.
Gitlab is distributed code management server, and the code of new version App is pushed to Gitlab and serviced by developer
Device, Gitlab can trigger Jenkins Master and carry out a Build while saving code.
Jenkins is a continuous integrating tool, allows master slave mode.After Gitlab triggers Jenkins master,
Build task is distributed to several registered Agent nodes by Jenkins master node, and Agent node can be according to thing
The script first set carries out Build, and script can compile, and tests, and generates test report etc..
The plug-in unit of the owned very abundant of Jenkins, is customized according to self-demand, for Jenkins circle
The interface in face, Jenkins itself can distribute task.
Fig. 2 is continuous integrating platform construction method of one of the embodiment of the present invention based on Jenkins and Gitlab
Flow chart.Referring now to Figure 2, a kind of continuous integrating platform construction method based on Jenkins and Gitlab, including step 21:
The interface customizations of the Jenkins, according to cpu busy percentage, content free time degree and the automatic adverse Agent of disk size;Also
Including step 22: making container mirror image according to environment configurations, after the plug-in unit after customization reads the first configuration file, according to demand certainly
It is dynamic to read the second configuration file and third configuration file;Further include step 23: the Gitlab is used for store code, carries out version
This control, the Jenkins executes the instruction for generating App, and the instruction for executing generation App is pushed to remote warehouse.
In specific implementation, the Jenkins includes customizing Jenkins mirror image, and the Jenkins mirror image includes third
Side plug and customization plug-in unit.The Jenkins uses the scheduling strategy of marathon, is distributed by the flexible resource of Mesos
To improve resource utilization.
Fig. 3 is continuous integrating platform construction method of one of the embodiment of the present invention based on Jenkins and Gitlab
Another flow chart.
Full name Build the Verification Test, BVT of BVT only verifies the success and failure of build building, not deep
Enter function, the performance etc. of the build that test is built.BVT is to have checked in the code of oneself in all Developmental Engineer,
Project team's compiling carries out after generating the version on the same day, main purpose be the software version that is newly generated of verifying functionally whether
Completely, whether main software feature is correct.Such as without big problem, so that it may carry out corresponding functional test.Referring now to figure
3, a kind of continuous integrating platform construction method based on Jenkins and Gitlab, including step 311: start to dispatch, step 312:
Judge that the remote warehouse downloading source code jumps to step 321 if failed download: sending a notification message to the platform.
Step 312: judging the remote warehouse downloading source code, if downloaded successfully, operational safety scans the App.Step 314:
Start Build after operational safety scans the App, if Build fails, jumps to step 321: sending a notification message
To the platform, if Build success, to step 315: environmentally being installed in BVT test, if tested environmentally in BVT
Install failure then jumps to step 321: sending a notification message to the platform.If environmentally installed successfully in BVT test,
It then jumps to step 317: being installed in deployed environment and sent a notification message to the platform.Step 318: if judgement exists
BVT test is environmentally installed successfully, but is environmentally failed in test, then jumps to step 321: sending a notification message to described
Platform jumps to step 319 if environmentally succeeded in test: operation BVT.If running BVT failure, step is jumped to
Rapid 321: sending a notification message to the platform, if operation BVT success, jumps to step 320: installing in deployed environment
And it sends a notification message to the platform.
The present invention compare the prior art have it is following the utility model has the advantages that it is provided by the invention it is a kind of based on Jenkins and
The continuous integrating platform construction method of Gitlab, can be used the mode of containerization, using backup is locally stored, realize a key portion
Administration, and the function and correctness of code can be detected by automatic test.
Although the present invention is disclosed as above with preferred embodiment, however, it is not to limit the invention, any this field skill
Art personnel, without departing from the spirit and scope of the present invention, when can make a little modification and perfect therefore of the invention protection model
It encloses to work as and subject to the definition of the claims.
Claims (9)
1. a kind of continuous integrating platform construction method based on Jenkins and Gitlab, which comprises the steps of:
The interface for customizing Jenkins, according to cpu busy percentage, content free time degree and the automatic adverse Agent of disk size;
Container mirror image is made according to environment configurations, it is automatic according to demand to read after the plug-in unit after customization reads the first configuration file
Second configuration file and third configuration file;
The Gitlab is used for store code, carries out Version Control, and the Jenkins executes the instruction for generating App, and will be described
The instruction for executing generation App is pushed to remote warehouse.
2. the continuous integrating platform construction method according to claim 1 based on Jenkins and Gitlab, feature exist
In the Jenkins includes customizing Jenkins mirror image, and the Jenkins mirror image includes third side plug and customizes slotting
Part.
3. the continuous integrating platform construction method according to claim 1 based on Jenkins and Gitlab, feature exist
In the Jenkins uses the scheduling strategy of Marathon, improves resource utilization by the flexible resource distribution of Mesos.
4. the continuous integrating platform construction method according to claim 1 based on Jenkins and Gitlab, feature exist
In the remote warehouse downloading source code sends a notification message if failed download to the platform.
5. the continuous integrating platform construction method according to claim 1 based on Jenkins and Gitlab, feature exist
In the remote warehouse downloads source code, if downloaded successfully, operational safety scans the App.
6. the continuous integrating platform construction method according to claim 5 based on Jenkins and Gitlab, feature exist
In, start Build after operational safety scans the App, if Build fails, send a notification message to the platform,
If Build success, is environmentally installed in BVT test, if testing environmentally install failure in BVT, send notice and disappear
Cease the platform.
7. the continuous integrating platform construction method according to claim 6 based on Jenkins and Gitlab, feature exist
In, if BVT test environmentally install successfully, install and sent a notification message to the platform in deployed environment.
8. the continuous integrating platform construction method according to claim 7 based on Jenkins and Gitlab, feature exist
In, if environmentally installed successfully in BVT test, but environmentally fail in test, then send a notification message to the platform,
If environmentally succeeded in test, BVT is run.
9. the continuous integrating platform construction method according to claim 7 based on Jenkins and Gitlab, feature exist
In if operation BVT failure, sends a notification message to the platform, if operation BVT success, pacifies in deployed environment
It fills and sends a notification message to the platform.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811443662.0A CN109558147A (en) | 2018-11-29 | 2018-11-29 | A kind of continuous integrating platform construction method based on Jenkins and Gitlab |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811443662.0A CN109558147A (en) | 2018-11-29 | 2018-11-29 | A kind of continuous integrating platform construction method based on Jenkins and Gitlab |
Publications (1)
Publication Number | Publication Date |
---|---|
CN109558147A true CN109558147A (en) | 2019-04-02 |
Family
ID=65867979
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201811443662.0A Pending CN109558147A (en) | 2018-11-29 | 2018-11-29 | A kind of continuous integrating platform construction method based on Jenkins and Gitlab |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109558147A (en) |
Cited By (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110188049A (en) * | 2019-06-10 | 2019-08-30 | 北京阿尔山金融科技有限公司 | Container Management method, apparatus and electronic equipment |
CN110941550A (en) * | 2019-11-19 | 2020-03-31 | 基蛋生物科技股份有限公司 | Integrated automation test method |
CN111562942A (en) * | 2020-04-30 | 2020-08-21 | 中国银行股份有限公司 | Gitlab-based mobile APP continuous integration device and method |
CN112416524A (en) * | 2020-11-25 | 2021-02-26 | 电信科学技术第十研究所有限公司 | Implementation method and device of cross-platform CI/CD (compact disc/compact disc) based on docker and kubernets offline |
CN112799704A (en) * | 2021-02-06 | 2021-05-14 | 读书郎教育科技有限公司 | System and method for upgrading and synchronizing self-research class library |
CN113590485A (en) * | 2021-08-02 | 2021-11-02 | 瀚高基础软件股份有限公司 | Multi-management system integration method and computer readable storage medium |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106873975A (en) * | 2016-12-30 | 2017-06-20 | 武汉默联股份有限公司 | Devops based on Docker persistently pays and automated system and method |
CN107562472A (en) * | 2017-08-24 | 2018-01-09 | 四川长虹电器股份有限公司 | Micro services system and method based on docker containers |
-
2018
- 2018-11-29 CN CN201811443662.0A patent/CN109558147A/en active Pending
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106873975A (en) * | 2016-12-30 | 2017-06-20 | 武汉默联股份有限公司 | Devops based on Docker persistently pays and automated system and method |
CN107562472A (en) * | 2017-08-24 | 2018-01-09 | 四川长虹电器股份有限公司 | Micro services system and method based on docker containers |
Non-Patent Citations (3)
Title |
---|
WEITAO ZHOU: ""基于Jenkins, Apache Mesos和Marathon的弹性高可用的持续集成环境(上篇)"", 《HTTP:https://VITAN.GITHUB.IO/SCALE/CI/2015/05/12/JENKINS-ON-MESOS-1.HTML》 * |
优云数智: ""智能运维 | 如何做好持续集成——Jenkins on Mesos 实践"", 《HTTPS:https://SEGMENTFAULT.COM/A/1190000005790435》 * |
虫子宴: ""Jenkins 使用slave管理进行持续集成测试说明"", 《HTTPS:https://WWW.CNBLOGS.COM/BUGU/P/6472495.HTML》 * |
Cited By (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110188049A (en) * | 2019-06-10 | 2019-08-30 | 北京阿尔山金融科技有限公司 | Container Management method, apparatus and electronic equipment |
CN110941550A (en) * | 2019-11-19 | 2020-03-31 | 基蛋生物科技股份有限公司 | Integrated automation test method |
CN111562942A (en) * | 2020-04-30 | 2020-08-21 | 中国银行股份有限公司 | Gitlab-based mobile APP continuous integration device and method |
CN111562942B (en) * | 2020-04-30 | 2024-04-19 | 中国银行股份有限公司 | Gitlab-based mobile APP continuous integration device and method |
CN112416524A (en) * | 2020-11-25 | 2021-02-26 | 电信科学技术第十研究所有限公司 | Implementation method and device of cross-platform CI/CD (compact disc/compact disc) based on docker and kubernets offline |
CN112416524B (en) * | 2020-11-25 | 2023-06-23 | 电信科学技术第十研究所有限公司 | Method and device for implementing CI/CD of cross-platform based on docker and kubernetes offline |
CN112799704A (en) * | 2021-02-06 | 2021-05-14 | 读书郎教育科技有限公司 | System and method for upgrading and synchronizing self-research class library |
CN113590485A (en) * | 2021-08-02 | 2021-11-02 | 瀚高基础软件股份有限公司 | Multi-management system integration method and computer readable storage medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109558147A (en) | A kind of continuous integrating platform construction method based on Jenkins and Gitlab | |
CN110572436B (en) | Multi-place cross-cluster server deployment method and system | |
US9485151B2 (en) | Centralized system management on endpoints of a distributed data processing system | |
CN102437938B (en) | Large-scale network monitoring oriented virtual deployment system and method | |
CN103793259B (en) | Virtual device generating and deploying method | |
CN102609281B (en) | Distributed software patch update method and system | |
US20030046682A1 (en) | System and method for the automatic installation and configuration of an operating system | |
CN110752947A (en) | K8s cluster deployment method and device, and deployment platform | |
CN104508627A (en) | Hybrid cloud environment | |
CN111324412A (en) | Service deployment method, device and storage medium | |
CN104731580A (en) | Automation operation and maintenance system based on Karaf and ActiveMQ and implement method thereof | |
CN111198695A (en) | Automatic deployment method of micro-service administration management platform and electronic equipment | |
WO2020000811A1 (en) | Application component deployment method and apparatus, and computer storage medium | |
CN110912728B (en) | Operating system patch batch automatic update management method and system | |
WO2017041499A1 (en) | Software upgrade method and system, and computer-readable storage medium | |
US20100293201A1 (en) | Nfs agent upgrade | |
US10318284B2 (en) | System and method of generating and managing computing tasks | |
CN115357258B (en) | Application deployment method and device, storage medium and electronic device | |
CN113434155A (en) | Automatic deployment system in mixed cloud mode | |
US9207928B2 (en) | Computer-readable medium, apparatus, and methods of automatic capability installation | |
CN118227264A (en) | Container arrangement system for realizing continuous integration based on Kubernetes | |
Lovrek et al. | Improving software maintenance by using agent-based remote maintenance shell | |
CN114253564A (en) | Container cluster mirror image template generation method and device | |
EP2746938A1 (en) | System and method for activating a software module | |
CN107181629B (en) | Component upgrading method and system |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
WD01 | Invention patent application deemed withdrawn after publication | ||
WD01 | Invention patent application deemed withdrawn after publication |
Application publication date: 20190402 |