Construction method, system and equipment for software development continuous integration assembly line
By versioning the CI description file in the configuration repository and developing a new version pipeline on the feature branch, the problem of difficulty in issuing configuration updates in continuous integration pipelines is solved, and configuration efficiency and traceability of version updates are improved.
Patent Information
- Application Number
- CN202510110634.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-23
- Publication Date
- 2025-05-30
AI Technical Summary
In the prior art, configuration updates of continuous integration pipelines are difficult to achieve global issuance, resulting in low configuration efficiency and lack of traceability in version updates of CI description files.
By saving CI description files in the configuration repository, the version control of CI description files is realized, and when a new version pipeline construction request is received, a feature branch is created for development. If the target CI description file is reviewed by grayscale verification and merge requests, the feature branch is merged into the trunk branch.
It improves the efficiency of pipeline configuration, realizes the traceability of version updates of CI description files, and solves the problem that configuration updates are difficult to issue globally.
Smart Images

Figure CN120066610A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the technical field of software development, and in particular, to a method, system, and device for constructing a continuous integration pipeline for software development. Background Art
[0002] Continuous integration (CI) is the continuous integration of personal or team-developed code into the main branch of the team's central repository. In this integration process, steps such as code static analysis, code unit testing, and compilation pre-building are introduced to ensure that the code merged into the main branch meets the requirements, and finally an artifact to be released that meets the basic standards is generated. A continuous integration pipeline, or simply a pipeline, is a pipeline that automatically completes the CI process, and a CI description file is a file that defines the pipeline configuration. In related technologies, the configuration method of the continuous integration pipeline does not have version control capabilities and global distribution capabilities, and the efficiency of continuous integration implementation is relatively low. Summary of the Invention
[0003] This application provides a method, system, and device for constructing a continuous integration pipeline for software development, which solves the technical problem that it is difficult to globally distribute the update of the pipeline configuration, and achieves the technical effects of improving the pipeline configuration efficiency and making the version update of the CI description file traceable.
[0004] To achieve the above object, the main technical solutions adopted in this application include:
[0005] In a first aspect, an embodiment of this application provides a method for constructing a continuous integration pipeline for software development, and the method includes: configuring and generating a corresponding pipeline according to the CI plug-ins and CI processes defined in the CI description file, where the CI description file is stored in a configuration repository for version control of the CI description file; when receiving a new version pipeline construction request, creating a feature branch from the main branch of the configuration repository, and developing the target CI description file corresponding to the new version pipeline on the feature branch; if the target CI description file passes the gray-scale verification and merge request review, merging the feature branch into the main branch.
[0006] The method for constructing a software development continuous integration pipeline provided by an embodiment of the present application includes: configuring and generating a corresponding pipeline according to the CI plugins and CI processes defined in a CI description file, where the CI description file is stored in a configuration repository for version control of the CI description file; when receiving a new version pipeline construction request, creating a feature branch from the main branch of the configuration repository, and developing the target CI description file corresponding to the new version pipeline on the feature branch; if the target CI description file passes the gray-scale verification and merge request review, merging the feature branch into the main branch, solving the technical problem that it is difficult to globally distribute pipeline configuration updates, and achieving the technical effects of improving the pipeline configuration efficiency and making the configuration update traceable.
[0007] Optionally, the gray-scale verification and merge request review specifically include: performing gray-scale testing on the target CI description file in the gray-scale range business code repository to obtain a gray-scale verification result; if the gray-scale verification result meets the preset standard, initiating a merge request to the main branch; when receiving the merge request, performing a merge request review on the target CI description file.
[0008] Optionally, the method further includes: if the gray-scale verification result does not meet the preset standard, analyzing the deviation points, and performing corresponding code optimization on the feature branch according to the deviation points, where the deviation points include that the implementation of the required function deviates from the preset effect, the running steps of the pipeline deviate from the preset order, and the running performance efficiency deviates from the preset efficiency value.
[0009] Optionally, the content of the merge request review includes the correctness of logical function implementation, code style and format, code security, and code modularity.
[0010] Optionally, the configuration repository and the gray-scale range business code repository are Git code repositories for version tracing of the CI description file.
[0011] Optionally, in the pipeline configuration file of the application, reference the configuration repository that hosts the corresponding CI description file, so that the pipeline configuration of the application is synchronously updated.
[0012] Optionally, the reference includes the branch name, commit number, and tag information of the configuration repository.
[0013] Optionally, the CI plugin is a program written in Python or Go language; the CI process is used to concatenate the complex logic encapsulated by the CI plugin and the simple logic encapsulated by the scripting language.
[0014] In a second aspect, an embodiment of the present application provides a construction system for a software development continuous integration pipeline. The system includes: a construction module for configuring and generating a corresponding pipeline according to CI plugins and CI processes defined in a CI description file, where the CI description file is stored in a configuration repository for version control of the CI description file; a development module for creating a feature branch from the main branch of the configuration repository when receiving a new version pipeline construction request, and developing a target CI description file corresponding to the new version pipeline on the feature branch; and a merging module for merging the feature branch into the main branch if the target CI description file passes the gray-scale verification and the merge request review.
[0015] In a third aspect, an embodiment of the present application provides a computer device, including: a memory and a processor, which are communicatively connected to each other. The memory stores computer instructions, and the processor executes the computer instructions to execute the above-mentioned method for constructing a software development continuous integration pipeline.
[0016] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, on which computer instructions are stored, and the computer instructions are used to cause a computer to execute the above-mentioned method for constructing a software development continuous integration pipeline.
[0017] In a fifth aspect, an embodiment of the present application provides a computer program product, including computer instructions, and the computer instructions are used to cause a computer to execute the above-mentioned method for constructing a software development continuous integration pipeline. Description of the Drawings
[0018] In order to more clearly illustrate the specific embodiments of the present application or the technical solutions in the prior art, the following will briefly introduce the drawings required for use in the description of the specific embodiments or the prior art. Obviously, the drawings in the following description are some embodiments of the present application. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.
[0019] Figure 1 It is a flowchart of the method for constructing a software development continuous integration pipeline provided by an embodiment of the present application;
[0020] Figure 2 It is a flowchart of the gray-scale verification and the merge request review provided by an embodiment of the present application;
[0021] Figure 3 It is a schematic diagram of a pipeline configuration file of an application program referring to a configuration repository provided by an embodiment of the present application;
[0022] Figure 4Schematic diagram of a construction system for a software development continuous integration pipeline provided by an embodiment of the present application;
[0023] Figure 5 It is a schematic structural diagram of a computer device provided by an embodiment of the present application. Specific implementation manners
[0024] To make the objectives, technical solutions, and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present application. Apparently, the described embodiments are some, but not all, of the embodiments of the present application. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present application without creative efforts shall fall within the protection scope of the present application.
[0025] Continuous integration (CI) is the continuous integration of the code developed by individuals or teams into the main branch of the team's central repository. In this integration process, steps such as code static analysis, code unit testing, and compilation pre-building are introduced to ensure that the code merged into the main branch meets the requirements, and finally a release-ready artifact that meets the basic standards is generated. A continuous integration pipeline, that is, a pipeline, is a pipeline that automatically completes the CI process, and a CI description file is a file that defines the pipeline configuration. The CI description file determines the implementation efficiency, learning cost, standardization, and maintenance cost of continuous integration, and thus affects the implementation effect of continuous integration. In related technologies, the pipeline configuration methods defined by CI description files are generally divided into two types: one is graphical, and the pipeline process is arranged by dragging and dropping to complete the pipeline configuration; the other is code-based, and a dedicated domain description language is used to complete the pipeline configuration.
[0026] Among them, for the graphical pipeline configuration method, the pipeline arrangement can be completed by dragging and dropping, with a low learning cost and convenient problem troubleshooting. However, since each arrangement node of the pipeline needs to be adjusted one by one, the implementation efficiency of continuous integration is low. At the same time, the graphical pipeline configuration method depends on graphical templates, and the graphical templates do not have version control capabilities, and the update of graphical templates does not have the ability to be globally distributed. For the code-based pipeline configuration method, by copying the existing template code and adjusting the code segments, the implementation efficiency of continuous integration is average. However, since a dedicated domain description language needs to be mastered, the learning cost is high, and it is for pure log-based problem troubleshooting, with a high mental burden. At the same time, the code-based pipeline configuration method depends on template code, and the template code does not have version control capabilities, and when the template code is updated, it does not have the ability to be globally distributed.
[0027] According to an embodiment of the present application, an embodiment of a method for constructing a software development continuous integration pipeline is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions. And although the logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in a different order than here.
[0028] Please refer to Figure 1 , Figure 1 which is a flowchart of the method for constructing a software development continuous integration pipeline provided by an embodiment of the present application. As Figure 1 shown, the process includes the following steps:
[0029] Step S1, configure and generate a corresponding pipeline according to the CI plugins and CI process defined in the CI description file, where the CI description file is stored in a configuration repository for version control of the CI description file.
[0030] Specifically, the flexibility of the CI scripting language is the basis for the wide applicability of the pipeline. At the same time, the flexibility of the scripting language also leads to a relatively high maintenance cost for the pipeline. The CI description file in the embodiment of the present application is used to define the configuration of CI and mainly consists of two parts, including CI plugins and CI processes. By encapsulating complex logic through CI plugins, the maintainability of complex logic can be improved and the probability of errors can be reduced. Embedding CI plugins into the CI process and utilizing the flexibility of the CI scripting language, low-cost and fast CI process orchestration can be achieved. CI plugins are the key components for implementing the CI process. For example, CI plugins can connect functions such as code management, compilation, quality management, artifact management, and release deployment to form an automated workflow. Using a configuration repository to host the CI description file can achieve tracking of the version change history of the CI description file and standardize the change management of the CI description file. The CI description file in the configuration repository contains information such as the parameters, steps, and environment settings of the pipeline.
[0031] Among them, the CI plugin is a small program written in languages with good engineering properties such as Python and Go and embedded in the CI process, thus reducing the maintenance complexity. At the same time, unit tests are carried out using the unit test framework of the language, which can further enhance the robustness of the plugin function, thus providing a reliable engineering foundation for the CI description file. The CI process can be divided into three parts: buildscript (build script), build settings (build configuration), and help functions (auxiliary functions). It is compatible with the Jenkinsfile ecosystem and Yaml configuration, and can make full use of the flexibility and convenience of the scripting language. By concatenating the complex logic encapsulated by the CI plugin and the simple logic encapsulated by the build script language, the expected process can be achieved. The CI description file is hosted in the Git code repository, and each change to the CI description file corresponds to a separate commit, which is submitted to the Git code repository. Each modification to the CI description file corresponds to a unique commit ID. By viewing the commit history in the Git code repository, the version traceability of the CI description file can be achieved. For example, if it is necessary to roll back to a previous version, the CI description file of that version can be directly checked out from the Git code repository and restored to the corresponding process configuration.
[0032] Step S3, when receiving a new version pipeline construction request, create a feature branch from the main branch of the configuration repository, and develop the target CI description file corresponding to the new version pipeline on the feature branch.
[0033] Specifically, the configuration repository is a Git code repository that stores the CI description file and has version control capabilities. The Git code repository refers to a Git code hosting tool. When receiving a new version pipeline construction request, create a new feature branch from the main branch of the configuration repository, and implement the required functions on the feature branch. By developing the target CI description file of the new version pipeline on the feature branch, the stability of the main branch and the efficient operation of the project's continuous integration process can be maintained.
[0034] Step S5, if the target CI description file passes the gray-scale verification and merge request review, merge the feature branch into the main branch.
[0035] After the development of the target CI description file of the new version pipeline is completed, it is necessary to perform gray-scale verification and merge request review (i.e., MR review) on the target CI description file of the new version pipeline. After passing the gray-scale verification and merge request review, the feature branch can be merged into the main branch, so that the CI description files of all pipelines are updated to obtain the latest process configuration, without the need to modify the CI description files of each pipeline separately, realizing the low-cost update of the global distribution workflow.
[0036] The method for constructing a software development continuous integration pipeline provided by this embodiment includes configuring and generating a corresponding pipeline according to the CI plugins and CI processes defined in the CI description file, where the CI description file is stored in a configuration repository for version control of the CI description file; when receiving a new version pipeline construction request, creating a feature branch from the main branch of the configuration repository, and developing the target CI description file corresponding to the new version pipeline on the feature branch; if the target CI description file passes the gray-scale verification and merge request review, merging the feature branch into the main branch. In the embodiment of the present application, taking GitOps as the methodology, without adding additional mental burden to the team, the provided method for constructing a software development continuous integration pipeline solves the technical problem that it is difficult to globally distribute pipeline configuration updates in the related art, and achieves the technical effects of improving pipeline configuration efficiency and traceability of configuration updates.
[0037] In some embodiments, the gray-scale verification and merge request review specifically include: performing gray-scale testing on the target CI description file in the gray-scale range business code repository to obtain a gray-scale verification result; if the gray-scale verification result meets the preset standard, initiating a merge request to the main branch; when receiving the merge request, performing a merge request review on the target CI description file.
[0038] Among them, the gray-scale range business code repository is a Git code repository for storing business code. The gray-scale effect is evaluated from the perspectives of CI functions, CI execution performance, etc.
[0039] Please refer to Figure 2 , Figure 2 which is the flowchart of the gray-scale verification and merge request review provided by the embodiment of the present application. As Figure 2 shown, after creating the feature branch, develop the target CI description file corresponding to the new version pipeline on the feature branch. If the gray-scale verification fails, that is, the gray-scale verification result does not reach the predetermined gray-scale effect, it is necessary to analyze the deviation point, re-develop and adjust the function implementation on the feature branch, and perform gray-scale verification again.
[0040] Specifically, if the gray-scale verification result does not reach the predetermined gray-scale effect, analyze the deviation point, and adjust the code development of the feature branch according to the deviation point. The deviation point includes the deviation of the implementation effect of the required function from the preset effect, the deviation of the order of pipeline running steps from the preset order, and the deviation of the running performance efficiency from the preset efficiency value. That is, starting from the pipeline requirements, analyze the deviation from the aspects of the correctness of the implementation effect of the required function, the correctness of the order of pipeline running steps, whether the running performance efficiency reaches the set threshold, the usability of pipeline logs, etc., and re-develop and adjust the function implementation on the feature branch accordingly.
[0041] If the gray-scale verification passes, an automated tool or script can be used to automatically initiate a merge request (MR) to the configuration repository after the gray-scale verification passes. In the case of receiving a merge request, the trunk branch administrator or branch reviewer conducts a merge request review (i.e., MR review). The content of the merge request review includes the correctness of the logical function implementation, code style and format, code security, and code modularity. Specifically, as the last quality assurance before the global update, the MR review focuses on whether the logical function implementation is correct; whether the code style is good; whether there are information security risks such as plaintext storage of passwords or plaintext output of passwords in the steps; whether the code modularity is good and whether it is convenient for subsequent expansion and maintenance, etc.
[0042] If the MR review fails, based on the MR review conclusion, the feature branch code is modified again. The modified feature branch needs to undergo gray-scale verification and MR review again until it meets the trunk merge-in criteria. For example, if the MR review conclusion is that the password is stored in plaintext, then according to this review conclusion, the CI description file developer modifies the feature branch code again and encrypts the plaintext password using an encryption algorithm. Another example is that if the MR review conclusion is that the code modularity is poor, then according to this review conclusion, the modularity of the code module with code style problems is improved. The merge-in criteria include conforming to good code style, no information security risks, good modularity, etc.
[0043] In some embodiments, the configuration repository and the gray-scale range business code repository are Git code repositories for version tracing of CI description files.
[0044] In some embodiments, in the pipeline configuration file of the application, a configuration repository hosting the corresponding CI description file is referenced, so that the pipeline configuration of the application is synchronously updated.
[0045] Specifically, by referencing the CI description file in the configuration repository, it is possible to avoid repeatedly writing the same pipeline parameters and configurations in multiple places. This can reduce errors and inconsistencies caused by copy-pasting or manual updates. Centralizing the hosting of CI description files in a configuration repository facilitates unified management and maintenance. When it is necessary to update or adjust the pipeline parameters, only one modification is required in the configuration repository, and all application pipelines referencing this configuration will be automatically updated, ensuring the consistency and synchronization of all pipelines.
[0046] Please refer to Figure 3 , Figure 3 For the schematic diagram of the application's pipeline configuration file referencing the configuration repository provided by the embodiments of this application. When each R & D team uses it, only a reference to the configuration repository and an application parameter list need to be maintained. For example, as Figure 3As shown, in the pipeline configuration files corresponding to Application 1, Application 2, and Application 3, a reference to the configuration repository pointing to the managed CI description file is described by a single line of code. This reference includes the version information of the target CI description file, and only includes the branch name, Commit (commit number), and tag information of the configuration repository. Through this reference, the pipeline instances in each application are synchronized and aligned with the pipeline parameters defined in the CI description file in the configuration repository in a low-cost maintenance manner.
[0047] In some embodiments, the CI plugin is a program written in Python or Go language; the CI process is used to concatenate the complex logic encapsulated by the CI plugin and the simple logic encapsulated by the scripting language.
[0048] Please refer to Figure 4 , Figure 4 which is a schematic diagram of the construction system of the software development continuous integration pipeline provided by the embodiments of the present application. As Figure 4 shown, the embodiments of the present application provide a construction system of a software development continuous integration pipeline, and the system includes: a construction module, configured to configure and generate a corresponding pipeline according to the CI plugin and CI process defined in the CI description file, where the CI description file is stored in the configuration repository for version control of the CI description file; a development module, configured to create a feature branch from the main branch of the configuration repository when receiving a new version pipeline construction request, and develop the target CI description file corresponding to the new version pipeline on the feature branch; a merging module, configured to merge the feature branch into the main branch if the target CI description file passes the gray-scale verification and the merge request review.
[0049] The further functional descriptions of the above-mentioned various modules and units are the same as those in the corresponding embodiments above, and will not be elaborated here.
[0050] The construction system of the software development continuous integration pipeline in this embodiment is presented in the form of functional units. Here, the unit refers to an ASIC (Application Specific Integrated Circuit) circuit, a processor and a memory that execute one or more software or fixed programs, and / or other devices that can provide the above functions.
[0051] Please refer to Figure 5 , Figure 5 which is a schematic diagram of the structure of a computer device provided by the embodiments of the present application. As Figure 5As shown, the computer device includes: one or more processors 10, a memory 20, and interfaces for connecting the components, including a high-speed interface and a low-speed interface. Each component communicates with each other using different buses and can be installed on a common motherboard or installed in other ways as needed. The processor can process instructions executed within the computer device, including instructions stored in the memory or on the memory to display graphical information of the GUI on an external input / output device (such as a display device coupled to the interface). In some alternative embodiments, if necessary, multiple processors and / or multiple buses can be used together with multiple memories and multiple memories. Similarly, multiple computer devices can be connected, and each device provides some necessary operations (for example, as a server array, a set of blade servers, or a multi-processor system). Figure 5 Taking one processor 10 as an example in
[0052] The processor 10 can be a central processing unit, a network processor, or a combination thereof. Among them, the processor 10 can further include a hardware chip. The above hardware chip can be an application-specific integrated circuit, a programmable logic device, or a combination thereof. The above programmable logic device can be a complex programmable logic device, a field programmable gate array, a general array logic, or any combination thereof.
[0053] Among them, the memory 20 stores instructions executable by at least one processor 10, so that the at least one processor 10 executes the method shown in the above embodiments.
[0054] The memory 20 can include a program storage area and a data storage area. Among them, the program storage area can store an operating system and application programs required for at least one function; the data storage area can store data created according to the use of the computer device. In addition, the memory 20 can include a high-speed random access memory and can also include a non-transitory memory, such as at least one disk storage device, a flash memory device, or other non-transitory solid-state storage devices. In some alternative embodiments, the memory 20 can optionally include a memory remotely set relative to the processor 10, and these remote memories can be connected to the computer device through a network. Examples of the above network include but are not limited to the Internet, an enterprise intranet, a local area network, a mobile communication network, and a combination thereof.
[0055] The memory 20 can include a volatile memory, such as a random access memory; the memory can also include a non-volatile memory, such as a flash memory, a hard disk, or a solid-state drive; the memory 20 can also include a combination of the above types of memories.
[0056] The computer device further includes a communication interface 30 for the computer device to communicate with other devices or communication networks.
[0057] The embodiments of the present application also provide a computer-readable storage medium. The method according to the embodiments of the present application can be implemented in hardware, firmware, or be implemented as computer code that can be recorded on a storage medium, or be implemented as computer code that is originally stored in a remote storage medium or a non-transitory machine-readable storage medium and downloaded through a network and will be stored in a local storage medium, so that the method described herein can be stored as such software processing on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. Among them, the storage medium can be a magnetic disk, an optical disk, a read-only memory, a random access memory, a flash memory, a hard disk, or a solid-state drive, etc.; further, the storage medium can also include a combination of the above-mentioned types of memories. It can be understood that a computer, a processor, a microprocessor controller, or programmable hardware includes a storage component that can store or receive software or computer code, and when the software or computer code is accessed and executed by the computer, the processor, or the hardware, the method shown in the above embodiments is implemented.
[0058] The embodiments of the present application provide a computer program product. The computer program product includes computer instructions, and the computer instructions are stored in a computer-readable storage medium. The processor of the computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the method of any embodiment of the present application.
[0059] Although the embodiments of the present application are described in conjunction with the accompanying drawings, those skilled in the art can make various modifications and variations without departing from the spirit and scope of the present application, and such modifications and variations all fall within the scope defined by the appended claims.
[0060] The system or module illustrated in the above embodiments can be specifically implemented by a computer chip or an entity, or by a product with a certain function. A typical implementation device is a computer. Specifically, the computer can be, for example, a personal computer, a laptop computer, a cellular phone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or a combination of any of these devices.
[0061] For the convenience of description, when describing the above device, it is described by dividing it into various units according to functions. Of course, when implementing the present application, the functions of each unit can be implemented in the same or multiple software and / or hardware.
[0062] Those skilled in the art should understand that the embodiments of the present application can be provided as a method, a system, or a computer program product. Therefore, the present application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Moreover, the present application can take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk memory, CD-ROM, optical memory, etc.) that contain computer-usable program code.
[0063] The present application is described with reference to the flowcharts and / or block diagrams of methods, systems, and computer program products according to the embodiments of the present application. It should be understood that each flow and / or block in the flowchart and / or block diagram, as well as the combination of flows and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to the processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing devices to generate a machine, such that the instructions executed by the processor of the computer or other programmable data processing devices generate means for implementing the functions specified in Figure 1 one flow or multiple flows and / or blocks Figure 1 one block or multiple blocks.
[0064] These computer program instructions can also be stored in a computer-readable memory that can direct a computer or other programmable data processing device to work in a specific manner, such that the instructions stored in the computer-readable memory generate a manufactured article including instruction means that implement the functions specified in Figure 1 one flow or multiple flows and / or blocks Figure 1 one block or multiple blocks.
[0065] These computer program instructions can also be loaded onto a computer or other programmable data processing device, such that a series of operation steps are executed on the computer or other programmable device to generate a computer-implemented process, and thus the instructions executed on the computer or other programmable device provide steps for implementing the functions specified in Figure 1 one flow or multiple flows and / or blocks Figure 1 one block or multiple blocks.
[0066] It should also be noted that the term "comprising", "including", or any other variant thereof is intended to cover non-exclusive inclusion, such that a process, method, commodity, or device including a series of elements not only includes those elements but also includes other elements not explicitly listed, or further includes elements inherent to such process, method, commodity, or device. Without further limitation, an element defined by the statement "including one..." does not exclude the existence of additional identical elements in the process, method, commodity, or device including the said element.
[0067] Each embodiment in this specification is described in a progressive manner. For the same or similar parts among the embodiments, reference can be made to each other, and the key point of each embodiment is to illustrate the differences from other embodiments. In particular, for the system embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and reference can be made to the corresponding part of the method embodiment for relevant content.
[0068] The above description is only for the embodiments of the present application and is not intended to limit the present application. For those skilled in the art, various changes and modifications can be made to the present application. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included within the scope of the claims of the present application.
[0069] Although the embodiments of the present application are described in conjunction with the accompanying drawings, those skilled in the art can make various modifications and variations without departing from the spirit and scope of the present application, and such modifications and variations fall within the scope defined by the appended claims.
Claims
1. A method for constructing a software development continuous integration pipeline, characterized in that: The method comprises: Configure and generate corresponding pipelines according to the CI plug-in and CI process defined in the CI description file, wherein the CI description file is stored in the configuration repository to perform version control on the CI description file; When a new version pipeline build request is received, a feature branch is created from the main branch of the configuration repository, and the target CI description file corresponding to the new version pipeline is developed on the feature branch; If the target CI description file passes the grayscale verification and merge request review, the feature branch will be merged into the main branch.
2. The method according to claim 1, characterized in that The grayscale verification and merge request review specifically include: performing grayscale testing on the target CI description file in the grayscale range business code repository to obtain a grayscale verification result; If the grayscale verification result meets the preset standard, a merge request is initiated to the main branch; When a merge request is received, a merge request review is performed on the target CI description file.
3. The method according to claim 2, characterized in that The method also includes: if the grayscale verification result does not meet the preset standard, then analyzing the deviation points, and performing corresponding code optimization on the feature branch according to the deviation points, the deviation points include the deviation of the required function implementation from the preset effect, the deviation of the pipeline operation steps from the preset order, and the deviation of the operation performance efficiency from the preset efficiency value.
4. The method according to claim 2, characterized in that: The merge request review content includes the correctness of logical function implementation, code style and format, code security and code modularity.
5. The method according to claim 2, characterized in that: The configuration repository and the grayscale range business code repository are Git code repositories, which are used for version tracing of CI description files.
6. The method according to claim 1, characterized in that In the pipeline configuration file of the application, reference the configuration repository that hosts the corresponding CI description file so that the pipeline configuration of the application can be updated synchronously.
7. The method according to claim 6, characterized in that The reference includes the branch name, commit number, and tag information of the configuration repository.
8. A system for building a continuous integration pipeline for software development, characterized in that: The system comprises: A construction module is used to configure and generate a corresponding pipeline according to the CI plug-in and CI process defined in the CI description file, wherein the CI description file is stored in the configuration repository to perform version control on the CI description file; The development module is used to create a feature branch from the main branch of the configuration repository when receiving a new version pipeline build request, and develop the target CI description file corresponding to the new version pipeline on the feature branch; The merge module is used to merge the feature branch into the main branch if the target CI description file passes the grayscale verification and merge request review.
9. A computer device, characterized in that: include: A memory and a processor, wherein the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the method for constructing a software development continuous integration pipeline according to any one of claims 1 to 7 by executing the computer instructions.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a computer to execute the method for constructing a software development continuous integration pipeline according to any one of claims 1 to 7.