CN112486565A - Containerization-based continuous integration method and equipment - Google Patents

Containerization-based continuous integration method and equipment Download PDF

Info

Publication number
CN112486565A
CN112486565A CN202011440107.XA CN202011440107A CN112486565A CN 112486565 A CN112486565 A CN 112486565A CN 202011440107 A CN202011440107 A CN 202011440107A CN 112486565 A CN112486565 A CN 112486565A
Authority
CN
China
Prior art keywords
code
client
source code
management system
auditing
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
Application number
CN202011440107.XA
Other languages
Chinese (zh)
Inventor
张言
季俊
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shanghai Xinyi Intelligent Technology Co ltd
Original Assignee
Shanghai Xinyi Intelligent Technology Co ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Shanghai Xinyi Intelligent Technology Co ltd filed Critical Shanghai Xinyi Intelligent Technology Co ltd
Priority to CN202011440107.XA priority Critical patent/CN112486565A/en
Publication of CN112486565A publication Critical patent/CN112486565A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/71Version control; Configuration management
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/40Transformation of program code
    • G06F8/41Compilation

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Stored Programmes (AREA)

Abstract

The application aims at providing a continuous integration method and equipment based on containerization, and the method comprises a code management system, wherein the code management system comprises a code auditing tool and an application container engine; the code management system receives a source code sent by at least one client, and manages and configures the source code corresponding to each client; respectively auditing the source codes corresponding to each client through a code auditing tool to obtain approved source codes corresponding to each client and submitting the approved source codes to a code management system; in the application container engine, the source codes corresponding to at least one client and passing the auditing are packaged to obtain a code packet corresponding to at least one client, so that the full-flow communication in the software development process is realized, tools are utilized to run through basic compiling and testing, then the source codes corresponding to all the clients are audited through a code auditing tool, the possibility of logic errors is reduced, and the research and development efficiency is further improved.

Description

Containerization-based continuous integration method and equipment
Technical Field
The present application relates to the field of computers, and in particular, to a containerization-based persistent integration method and apparatus.
Background
With the continuous development of continuous integration technology, the team development of software becomes more and more common, and the team collaborative development of the software can be more convenient due to the continuous integration. However, the current continuous integration also has the following disadvantages:
1. compiling is troublesome, and the problems of compiling dependence, compiling version and compiling per se need to be solved every time a service is newly added; 2. the integration method in the prior art has less management and specification introduction of Code, has no unified specification and is not universal enough; 3. the related codes after continuous integration still have more deployment problems, and the problems of version, server local link library and the like mainly exist.
Disclosure of Invention
One objective of the present application is to provide a containerization-based persistent integration method and apparatus, so as to achieve full-flow communication in a software development process, utilize tools to run through basic compilation and unit testing, and then reduce the possibility of logic errors through code auditing, thereby further improving the efficiency of research and development.
According to an aspect of the present application, there is provided a method of containerization-based persistent integration, wherein the method comprises:
a code management system, wherein the code management system comprises a code auditor and an application container engine; wherein the content of the first and second substances,
the code management system receives a source code sent by at least one client, and manages and configures the source code corresponding to each client;
respectively auditing the source code corresponding to each client through the code auditing tool to obtain the source code which passes the auditing and is corresponding to each client, and submitting the source code to the code management system;
and in the application container engine, packaging the approved source code corresponding to the at least one client to obtain a code packet corresponding to the at least one client.
Further, in the method for continuous integration based on containerization, the source code corresponding to the client is obtained by the client after performing code writing, code compiling and unit testing.
Further, in the persistent integration method based on containerization, the respectively auditing the source code corresponding to each client by the code auditing tool to obtain the source code that passes the auditing corresponding to each client includes:
and respectively carrying out style check and logic check on the source code corresponding to each client by the code auditing tool to obtain the source code which is approved by auditing and corresponds to each client.
Further, in the persistent integration method based on containerization, the code management system is a GitLab management system.
Further, in the method for persistent integration based on containerization, the packaging, in the application container engine, the approved source code corresponding to the at least one client to obtain a code package corresponding to the at least one client includes:
and in the application container engine, packing the approved source code corresponding to the at least one client by adopting the operating environment in the GitLab management system to obtain a code package corresponding to the at least one client.
Further, in the persistent integration method based on containerization, after the code auditor audits the source code corresponding to each client, the method further includes:
and returning the source code which is not checked and passed and corresponds to the client.
According to another aspect of the present application, there is also provided a non-volatile storage medium having stored thereon computer-readable instructions which, when executed by a processor, cause the processor to implement a method of containerization-based persistent integration as described above.
According to another aspect of the present application, there is also provided a containerization-based persistent integration apparatus, wherein the apparatus comprises:
one or more processors;
a non-volatile storage medium for storing one or more computer-readable instructions,
when executed by the one or more processors, cause the one or more processors to implement a method for containerization-based persistent integration as described above.
Compared with the prior art, the method comprises the steps that the code management system comprises a code auditor and an application container engine; the code management system receives source codes sent by at least one client, and manages and configures the source codes corresponding to each client; respectively auditing the source code corresponding to each client through the code auditing tool to obtain the source code which passes the auditing and is corresponding to each client, and submitting the source code to the code management system; in the application container engine, the source codes corresponding to the at least one client and passing the auditing are packaged to obtain the code packet corresponding to the at least one client, so that the full-flow communication in the software development process is realized, the tool run-through basic compiling and testing is utilized, then the source codes corresponding to the clients are audited through the code auditing tool, the possibility of logic errors is reduced, and the research and development efficiency is further improved.
Drawings
Other features, objects and advantages of the present application will become more apparent upon reading of the following detailed description of non-limiting embodiments thereof, made with reference to the accompanying drawings in which:
FIG. 1 illustrates a flow diagram of a method for containerization-based persistent integration, according to one aspect of the subject application.
The same or similar reference numbers in the drawings identify the same or similar elements.
Detailed Description
The present application is described in further detail below with reference to the attached figures.
In a typical configuration of the present application, the terminal, the device serving the network, and the trusted party each include one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
The memory may include forms of volatile memory in a computer readable medium, Random Access Memory (RAM) and/or non-volatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM). Memory is an example of a computer-readable medium.
Computer-readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), Read Only Memory (ROM), Electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), Digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include non-transitory computer readable media (transient media), such as modulated data signals and carrier waves.
Fig. 1 is a schematic flow diagram of a method for containerization-based persistent integration according to one aspect of the present application. The containerized Docker is an open-source application container engine, and can enable a developer to package related codes into a portable Docker (container), and then can deploy a task into a machine of Docker basic service, the Docker can directly run on an operating system of a host, call Cgroup and other Linux characteristics on a bottom layer, directly call a system call interface of the operating system, and the containerized Docker has the characteristics of low cost, low container complexity, quick start and the like.
The method comprises a code management system, wherein the code management system comprises a code auditor and an application container engine, and specifically comprises the following steps:
firstly, the code management system receives a source code sent by at least one client, and manages and configures the source code corresponding to each client; the number of the clients can be one or multiple, and all source codes written by the clients can be sent to the code management system to manage and configure the codes. In a preferred embodiment of the present application, the number of the clients may be preferably 6, that is, in a development process, 6 developers perform research and development together and are respectively responsible for a part of a project, at this time, there are 6 clients, after each client completes a corresponding source code, the source code corresponding to each client is uploaded to the code management system, and the code management system receives the source code sent by the 6 clients and manages and configures the source code sent by the 6 clients.
And then, respectively auditing the source codes corresponding to the clients through the code auditing tool to obtain the source codes which are approved by the corresponding clients and submit the source codes to the code management system.
It should be noted that the code review tool includes, but is not limited to, a visual code review tool Phabricator, and the Phabricator is used to respectively review the source codes corresponding to each client, and of course, the review of the source codes may be a machine review or a manual review, for example, a developer initiates a code review through the Phabricator and sends the source codes to be reviewed to a code reviewer, so that the code reviewer reviews the source codes through the Phabricator to realize the manual review of the codes, and if the source codes pass the manual review, the code reviewer is submitted to the code management system. The Server comprises a Server, a client, a Server and a Server, wherein the Server is a set of open source software developed by Facebook and integrating functions of task tracking, documents, code bases, file storage and the like, the functions are complete, the Server is a very good management tool for entrepreneurial companies, small companies and even large companies, and the Server is written by PHP language and provides services through a commonly used Web Server.
And in the application container engine, packaging the approved source code corresponding to the at least one client to obtain a code packet corresponding to the at least one client.
It should be noted that the application container engine includes but is not limited to a Docker, for example, after the source codes sent by the 6 clients are manually checked by the Phabricator, the source codes are submitted to the code management system, and the code management system submits the source codes that are checked to the Docker for packaging, so as to obtain the code packets corresponding to the 6 clients.
The containerization-based persistent integration method in the embodiment of the present application includes a code management system, where the code management system includes a code auditor and an application container engine; the code management system receives source codes sent by at least one client, and manages and configures the source codes corresponding to each client; respectively auditing the source code corresponding to each client through the code auditing tool to obtain the source code which passes the auditing and is corresponding to each client, and submitting the source code to the code management system; in the application container engine, the source codes which are passed through the auditing corresponding to the at least one client are packaged to obtain the code packet corresponding to the at least one client, so that the whole process is opened in the software development process, the tool run-through basic compiling and testing is utilized, then the source codes are audited through a visual code review tool (Phabracter), the possibility of logic errors is reduced, and the research and development efficiency is further improved.
Next to the above embodiment of the present application, in the method for continuous integration based on containerization, the source code corresponding to the client is obtained by the client after performing code writing, code compiling, and unit testing.
As shown in fig. 1, a developer performs related operations such as code writing, code compiling, unit testing, and the like on the client, eliminates some basic errors, obtains a source code corresponding to the client, and then sends the source code corresponding to the client to the code management system.
Next to the foregoing embodiment of the present application, in the method for persistent integration based on containerization, the respectively auditing, by the code auditing tool, the source code corresponding to each client to obtain the source code that is approved by the audit and corresponds to each client includes:
and respectively carrying out style check and logic check on the source code corresponding to each client by the code auditing tool to obtain the source code which is approved by auditing and corresponds to each client.
The style check is automatically checked by the Phabricator, and the logic check is manually checked by the developer through the Phabricator, for example, if 1 × 6 is wrongly written as 1+6, the developer needs to find the style check through the logic check.
Following the above-described embodiments of the present application, in the above-described method for persistent integration based on containerization, the code management system is a GitLab management system.
Here, the management and configuration of the code is performed in the GitLab management system.
Next, in the foregoing embodiment of the present application, in the method for persistent integration based on containerization, the packaging, in the application container engine, the approved source code corresponding to the at least one client to obtain a code package corresponding to the at least one client includes:
and in the application container engine, packing the approved source code corresponding to the at least one client by adopting the operating environment in the GitLab management system to obtain a code package corresponding to the at least one client.
It should be noted that, the operating environment in the GitLab management system includes, but is not limited to, a GitLab Runner, for example, after the source codes that are passed through the audits corresponding to the 6 clients are submitted to the GitLab management system, the source codes that are passed through the audits corresponding to the 6 clients are packaged by using the Runner in the GitLab management system, so as to obtain the code packages corresponding to the 6 clients. The web service is a web service which is developed by GitLab Inc., uses a network-based Git warehouse management tool with MIT license to open a source project, has wiki and issue tracking functions, uses Git as a code management tool and is built on the basis of the code management tool.
Next to the foregoing embodiment of the present application, in the persistent integration method based on containerization, after the code auditing tool respectively audits the source code corresponding to each client, the method further includes:
and returning the source code which is not checked and passed and corresponds to the client.
It should be noted that, if the source Code corresponding to the client passes the audit, the source Code corresponding to the client is returned to the client again until the source Code corresponding to the client passes the audit, for example, after the source codes corresponding to the 6 clients pass the manual audit of the Phabricator, and a source Code1 corresponding to a client1 does not pass the audit, the source Code1 is returned to the client1 corresponding to the client again until the source Code1 passes the audit.
According to another aspect of the present application, there is also provided a non-volatile storage medium having stored thereon computer-readable instructions which, when executed by a processor, cause the processor to implement a method of containerization-based persistent integration as described above.
According to another aspect of the present application, there is also provided a containerization-based persistent integration apparatus, wherein the apparatus comprises:
one or more processors;
a non-volatile storage medium for storing one or more computer-readable instructions,
when executed by the one or more processors, cause the one or more processors to implement a method for containerization-based persistent integration as described above.
For details of each embodiment of the apparatus for persistent integration based on containerization, reference may be made to corresponding parts of the above-mentioned method for persistent integration based on containerization, and details are not described herein again.
In summary, the present application includes a code management system, wherein the code management system includes a code auditor and an application container engine; the code management system receives source codes sent by at least one client, and manages and configures the source codes corresponding to each client; respectively auditing the source code corresponding to each client through the code auditing tool to obtain the source code which passes the auditing and is corresponding to each client, and submitting the source code to the code management system; in the application container engine, the source codes corresponding to the at least one client and passing the auditing are packaged to obtain the code packet corresponding to the at least one client, so that the full-flow communication in the software development process is realized, the tool run-through basic compiling and testing is utilized, then the source codes corresponding to the clients are audited through the code auditing tool, the possibility of logic errors is reduced, and the research and development efficiency is further improved.
It should be noted that the present application may be implemented in software and/or a combination of software and hardware, for example, implemented using Application Specific Integrated Circuits (ASICs), general purpose computers or any other similar hardware devices. In one embodiment, the software programs of the present application may be executed by a processor to implement the steps or functions described above. Likewise, the software programs (including associated data structures) of the present application may be stored in a computer readable recording medium, such as RAM memory, magnetic or optical drive or diskette and the like. Additionally, some of the steps or functions of the present application may be implemented in hardware, for example, as circuitry that cooperates with the processor to perform various steps or functions.
In addition, some of the present application may be implemented as a computer program product, such as computer program instructions, which when executed by a computer, may invoke or provide methods and/or techniques in accordance with the present application through the operation of the computer. Program instructions which invoke the methods of the present application may be stored on a fixed or removable recording medium and/or transmitted via a data stream on a broadcast or other signal-bearing medium and/or stored within a working memory of a computer device operating in accordance with the program instructions. An embodiment according to the present application comprises an apparatus comprising a memory for storing computer program instructions and a processor for executing the program instructions, wherein the computer program instructions, when executed by the processor, trigger the apparatus to perform a method and/or a solution according to the aforementioned embodiments of the present application.
It will be evident to those skilled in the art that the present application is not limited to the details of the foregoing illustrative embodiments, and that the present application may be embodied in other specific forms without departing from the spirit or essential attributes thereof. The present embodiments are therefore to be considered in all respects as illustrative and not restrictive, the scope of the application being indicated by the appended claims rather than by the foregoing description, and all changes which come within the meaning and range of equivalency of the claims are therefore intended to be embraced therein. Any reference sign in a claim should not be construed as limiting the claim concerned. Furthermore, it is obvious that the word "comprising" does not exclude other elements or steps, and the singular does not exclude the plural. A plurality of units or means recited in the apparatus claims may also be implemented by one unit or means in software or hardware. The terms first, second, etc. are used to denote names, but not any particular order.

Claims (8)

1. A method of containerization-based persistent integration, wherein the method comprises:
a code management system, wherein the code management system comprises a code auditor and an application container engine; wherein the content of the first and second substances,
the code management system receives a source code sent by at least one client, and manages and configures the source code corresponding to each client;
respectively auditing the source code corresponding to each client through the code auditing tool to obtain the source code which passes the auditing and is corresponding to each client, and submitting the source code to the code management system;
and in the application container engine, packaging the approved source code corresponding to the at least one client to obtain a code packet corresponding to the at least one client.
2. The method of claim 1, wherein the source code corresponding to the client is obtained by the client after code writing, code compiling and unit testing.
3. The method according to claim 1, wherein the obtaining the source code that passes the audit corresponding to each client by respectively auditing the source code corresponding to each client through the code auditor includes:
and respectively carrying out style check and logic check on the source code corresponding to each client by the code auditing tool to obtain the source code which is approved by auditing and corresponds to each client.
4. The method of claim 1, the code management system being a GitLab management system.
5. The method of claim 4, wherein the packaging, in the application container engine, the audited source code corresponding to the at least one client to obtain a code package corresponding to the at least one client includes:
and in the application container engine, packing the approved source code corresponding to the at least one client by adopting the operating environment in the GitLab management system to obtain a code package corresponding to the at least one client.
6. The method of claim 3, wherein after the code auditor audits the source code corresponding to each client, the method further comprises:
and returning the source code which is not checked and passed and corresponds to the client.
7. A non-transitory storage medium having stored thereon computer readable instructions which, when executed by a processor, cause the processor to implement the method of any one of claims 1 to 6.
8. A containerization-based continuously integrated apparatus, wherein the apparatus comprises:
one or more processors;
a non-volatile storage medium for storing one or more computer-readable instructions,
when executed by the one or more processors, cause the one or more processors to implement the method of any one of claims 1-6.
CN202011440107.XA 2020-12-10 2020-12-10 Containerization-based continuous integration method and equipment Pending CN112486565A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011440107.XA CN112486565A (en) 2020-12-10 2020-12-10 Containerization-based continuous integration method and equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011440107.XA CN112486565A (en) 2020-12-10 2020-12-10 Containerization-based continuous integration method and equipment

Publications (1)

Publication Number Publication Date
CN112486565A true CN112486565A (en) 2021-03-12

Family

ID=74941496

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011440107.XA Pending CN112486565A (en) 2020-12-10 2020-12-10 Containerization-based continuous integration method and equipment

Country Status (1)

Country Link
CN (1) CN112486565A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113672507A (en) * 2021-08-16 2021-11-19 深圳供电局有限公司 Software source code detection method and device, computer equipment and storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107463371A (en) * 2017-07-01 2017-12-12 广州视源电子科技股份有限公司 Code management-control method and system
CN109683899A (en) * 2017-10-18 2019-04-26 中移(苏州)软件技术有限公司 A kind of software integrating method and device
CN111984246A (en) * 2020-09-02 2020-11-24 重庆可兰达科技有限公司 Enterprise-level system automatic deployment method and device in distributed environment

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107463371A (en) * 2017-07-01 2017-12-12 广州视源电子科技股份有限公司 Code management-control method and system
CN109683899A (en) * 2017-10-18 2019-04-26 中移(苏州)软件技术有限公司 A kind of software integrating method and device
CN111984246A (en) * 2020-09-02 2020-11-24 重庆可兰达科技有限公司 Enterprise-level system automatic deployment method and device in distributed environment

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113672507A (en) * 2021-08-16 2021-11-19 深圳供电局有限公司 Software source code detection method and device, computer equipment and storage medium

Similar Documents

Publication Publication Date Title
US9218270B2 (en) Functional software testing framework for determinate level testing
US9971593B2 (en) Interactive content development
CN107122296B (en) Method and apparatus for data assertion for test interface
US20170091041A1 (en) Method and apparatus for transferring data between databases
CN107483221B (en) Cross-application problem troubleshooting method, device and system
US20080046259A1 (en) State-dependent entity based implementation of a service oriented architected application
US10834059B2 (en) Secure message handling of an application across deployment locations
CN112286829B (en) Test script generation method and device
CN104168250B (en) Business Process Control method and device based on CGI frames
US11200048B2 (en) Modification of codified infrastructure for orchestration in a multi-cloud environment
CN108427636A (en) Test method, system and the electronic equipment of application
Curty et al. Blockchain application development using model-driven engineering and low-code platforms: A survey
CN112486565A (en) Containerization-based continuous integration method and equipment
US20200294057A1 (en) Business processing method, apparatus, and equipment
CN116450107A (en) Method and device for secondary development of software by low-code platform and electronic equipment
CN114491662B (en) Block chain-based data asset auditing method, system and equipment
CN111435495A (en) Service processing method, device and equipment
CN115712794A (en) Page management method and device, processor and electronic equipment
CN112199080B (en) Webpack construction method and equipment for vuejs project
CN108228145A (en) Data processing method, system and the mobile equipment of mixed type application program
US9146720B1 (en) Binary file application processing
CN111949259A (en) Risk decision configuration method, system, electronic equipment and storage medium
CN113641644B (en) Data pushing system
CN110347607A (en) A kind of data cochain test method
US11693977B2 (en) Software defined data security layer

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