Continuous integration delivery processing method, device, equipment and program product

By running CI/CD pipelines locally in containerized, the problem of public server resource limitation is solved, development efficiency and the accuracy of problem discovery is improved, and environmental consistency and resource utilization are ensured.

CN119311283AInactive Publication Date: 2025-01-14HUNDSUN TECH

Patent Information

Application Number
CN202411835282.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-13
Publication Date
2025-01-14
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

The existing CI/CD pipelines rely on public server resources, resulting in low development efficiency, poor pipeline configuration flexibility, and the inability to directly verify the quality of local codes. The local environment is inconsistent with the production environment, which affects R&D efficiency.

Method used

Run pipeline services through local containerization, use local resources to build and deliver pipelines, ensure localized operation of pipelines, provide a consistent operating environment, and destroy containers as soon as possible after pipeline construction is completed, and release resources.

Benefits of technology

It improves development efficiency and problem-solving efficiency, reduces resource consumption, ensures flexibility and environmental consistency of pipeline construction, avoids remote repeated compilation, and early detection of code errors.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119311283A_ABST
    Figure CN119311283A_ABST
Patent Text Reader

Abstract

The invention provides a continuous integration delivery processing method and device, equipment and a program product, and relates to the technical field of computers. The method comprises the following steps: in response to a configuration operation of a user on a user interface of a network service, obtaining assembly line configuration information corresponding to a target code; calling a local communication service in response to a construction instruction input by a user on the user interface; when the local communication service is executed, determining change information and construction information of the target code, determining a target container according to the construction information, starting and initializing the target container according to the assembly line configuration information and the construction information, and calling assembly line service in the target container; and when the assembly line service is executed, performing continuous integration and / or continuous delivery on the target code according to the assembly line function sequence and the change information of the target code. According to the method, local resources can be reasonably utilized, local containerization construction and operation of the assembly line are achieved, the flexibility of assembly line construction is improved, and the development efficiency is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to a continuous integration delivery processing method, device, equipment and program product. Background Art

[0002] In the computer field, continuous integration and continuous delivery (CI / CD) is a very important part of the software development process. CI / CD refers to the automation of code integration, testing, and delivery during the software development process to achieve rapid and frequent release of high-quality software. The CI / CD pipeline is an important tool that enables rapid and frequent release of high-quality software by automating the build, test, and deployment processes.

[0003] In the prior art, cloud services or public servers are usually used as server resources for CI / CD pipelines, source code is downloaded through a code hosting platform, and pipeline construction is performed through visual configuration.

[0004] However, the above methods usually severely affect development efficiency due to the shortage of server resources. Summary of the invention

[0005] The purpose of this application is to provide a continuous integration delivery processing method, device, equipment and program product to address the deficiencies in the above-mentioned prior art, so as to facilitate the local containerized construction and operation of the pipeline, increase the flexibility of pipeline construction, and improve development efficiency.

[0006] To achieve the above purpose, the technical solution adopted in the embodiment of the present application is as follows: In a first aspect, an embodiment of the present application provides a continuous integration delivery processing method, including: In response to a configuration operation of a user in a user interface of a network service, pipeline configuration information corresponding to the target code is obtained, wherein the pipeline configuration information includes: a local path of the target code, a container mapping path, a pipeline number, and a pipeline function sequence; In response to a build instruction input by a user in the user interface, calling a local communication service; When the local communication service is executed, the change information and the build information of the target code are determined, a target container is determined according to the build information, the target container is started and initialized according to the pipeline configuration information and the build information, and the pipeline service in the target container is called; When the pipeline service is executed, the target code is continuously integrated and / or continuously delivered according to the pipeline function sequence and the change information of the target code.

[0007] In a second aspect, an embodiment of the present application further provides a continuous integration delivery processing device, including: an acquisition module and a processing module; The acquisition module is used to respond to the configuration operation of the user in the user interface of the network service, and acquire the pipeline configuration information corresponding to the target code, wherein the pipeline configuration information includes: the local path of the target code, the container mapping path, the pipeline number and the pipeline function sequence; The processing module is used to call the local communication service in response to the construction instruction input by the user in the user interface; The processing module is used to determine the change information and the build information of the target code when the local communication service is executed, determine the target container according to the build information, start and initialize the target container according to the pipeline configuration information and the build information, and call the pipeline service in the target container; The processing module is used to continuously integrate and / or continuously deliver the target code according to the pipeline function sequence and the change information of the target code when the pipeline service is executed.

[0008] In a third aspect, an embodiment of the present application provides an electronic device, comprising: a processor, a storage medium and a bus, wherein the storage medium stores machine-readable instructions executable by the processor. When the electronic device is running, the processor and the storage medium communicate through the bus, and the processor executes the machine-readable instructions to implement the continuous integration delivery processing method provided in the first aspect.

[0009] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the continuous integration delivery processing method provided in the first aspect is executed.

[0010] In a fifth aspect, an embodiment of the present application provides a computer program product, which includes a computer program code. When the computer program code is executed by a computing device, the computing device executes the continuous integration delivery processing method provided in the first aspect.

[0011] The beneficial effects of this application are: The present application provides a continuous integration delivery processing method, device, equipment and program product, including: responding to the configuration operation of the user in the user interface of the network service, obtaining the pipeline configuration information corresponding to the target code; responding to the build instruction input by the user in the user interface, calling the local communication service; when the local communication service is executed, determining the change information and build information of the target code, determining the target container according to the build information, starting and initializing the target container according to the pipeline configuration information and the build information, and calling the pipeline service in the target container; when the pipeline service is executed, the target code is continuously integrated and / or continuously delivered according to the pipeline function sequence and the change information of the target code. The method can obtain the configuration information of the pipeline through the user interface provided by the network service. Based on the build instruction, the network service can call the local communication service of the local terminal to execute, so as to start and initialize the local container through the local communication service, and call the pipeline service in the container to run, so as to continuously integrate and / or continuously deliver the target code according to the pipeline configuration information. By calling the pipeline service in the local target container to build the pipeline, the local containerized operation of the pipeline can be realized, and local resources can be reasonably used, so that the construction of the pipeline no longer depends on public server resources, increasing the flexibility of pipeline construction and improving development efficiency. And using the local container as the operation carrier of the pipeline can ensure the consistency of the pipeline operation environment and the production environment. The program that has passed the local compilation does not need to be recompiled on the remote server, which can improve the efficiency of integrated delivery. At the same time, based on the local construction of the pipeline, code errors can be discovered earlier and more accurately, improving the efficiency of problem solving.

[0012] In addition, after the pipeline service in the target container ends, it can be destroyed immediately after use, and the target container can be destroyed and the virtual disk space corresponding to the target container can be automatically compressed and released, which reduces disk pressure and reduces the consumption of local resources. BRIEF DESCRIPTION OF THE DRAWINGS

[0013] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments will be briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present application and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.

[0014] Figure 1 A schematic diagram of a pipeline construction system provided in an embodiment of the present application; Figure 2 A schematic diagram of the overall framework of a continuous integration delivery processing method provided in an embodiment of the present application; Figure 3A flowchart of a continuous integration delivery processing method provided in an embodiment of the present application; Figure 4 A flowchart of another continuous integration delivery processing method provided in an embodiment of the present application; Figure 5 A flowchart of another continuous integration delivery processing method provided in an embodiment of the present application; Figure 6 A flowchart of another continuous integration delivery processing method provided in an embodiment of the present application; Figure 7 A schematic diagram of a continuous integration delivery processing device provided in an embodiment of the present application; Figure 8 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0015] To make the purpose, technical scheme and advantages of the embodiments of the present application clearer, the technical scheme in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. It should be understood that the drawings in the present application only serve the purpose of explanation and description and are not used to limit the scope of protection of the present application. In addition, it should be understood that the schematic drawings are not drawn in real proportion. The flowchart used in this application shows the operations implemented according to some embodiments of the present application. It should be understood that the operations of the flowchart can be implemented out of sequence, and the steps without logical context can be reversed in order or implemented simultaneously. In addition, those skilled in the art can add one or more other operations to the flowchart under the guidance of the content of the present application, or remove one or more operations from the flowchart.

[0016] In addition, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. The components of the embodiments of the present application described and shown in the drawings here can be arranged and designed in various configurations. Therefore, the following detailed description of the embodiments of the present application provided in the drawings is not intended to limit the scope of the application claimed for protection, but merely represents the selected embodiments of the present application. Based on the embodiments of the present application, all other embodiments obtained by those skilled in the art without making creative work belong to the scope of protection of the present application.

[0017] It should be noted that the term "comprising" will be used in the embodiments of the present application to indicate the existence of the features declared thereafter, but does not exclude the addition of other features.

[0018] At present, cloud services or public services are mainly used as server resources for CI / CD pipelines, and source code is downloaded through code hosting platforms such as SVN / GIT, and pipeline construction is carried out through visual configuration.

[0019] However, the above method has the following defects: First, when R&D personnel need to build one or more pipelines individually, they are usually limited by cluster resources, so they can only create public pipelines. This will cause congestion in the public pipelines during the peak period of project development, thereby reducing R&D efficiency.

[0020] Second, public pipelines reduce the flexibility of pipeline configuration. When server resources are limited, it is impossible to build personalized pipelines according to personal needs, and there is a lack of personalized testing processes.

[0021] Third, the built pipeline usually relies on submitting the code to the code hosting platform first, and cannot directly verify the quality of the code that has not been submitted locally, causing quality problems to be exposed later, increasing the cost of problem solving, and thus affecting R&D efficiency.

[0022] Fourth, there is the inconsistency between the local desktop system environment and the production environment. For example, the code that passes local compilation may not pass compilation after submission, which makes the local compilation results unreliable.

[0023] Based on this, the present application provides a continuous integration delivery processing method, which runs in a local containerized manner, uses a local container as the running carrier of the pipeline service, runs the pipeline service in the local container, and makes full use of local service resources, so that the construction and operation of the pipeline are no longer limited to public server resources, increasing the flexibility of pipeline construction; discovering problems earlier and more accurately, improving the efficiency of problem solving; ensuring that all users are provided with a consistent operating environment in different environments; and due to the consistency of the operating environment, after the local pipeline is compiled, the downstream pipeline no longer needs to be compiled repeatedly in the remote service, and only the coupling code needs to be compiled, reducing redundant links in the process and improving the efficiency of integrated delivery; after the pipeline construction is completed, it can be destroyed on demand, reducing disk space pressure.

[0024] Figure 1 A schematic diagram of a pipeline construction system provided in an embodiment of the present application. Figure 1As shown, the system may include: a network service end and a local terminal. A network service (web service) is deployed on the network service end, and a local communication service is deployed on the local terminal. A user may open the user interface of the network service on the local terminal through a network link or the like, perform configuration operations, and issue build instructions. The network service may obtain pipeline configuration information in response to the configuration operation, and may call the local communication service to run in response to the build instruction. When the local communication service is running, the local container is started and initialized. After the container is started and initialized, the local communication service calls the pipeline service in the local container to trigger the pipeline service to run. When the pipeline service is running, continuous integration and / or continuous delivery of the code is performed according to the pipeline configuration information.

[0025] Figure 2 The overall framework diagram of a continuous integration delivery processing method provided in the embodiment of the present application is combined with Figure 1 as well as Figure 2 As shown, the applications involved in this architecture mainly include network services, local communication services, containerized services, pipeline services, and log push services. Users can perform configuration operations and issue build instructions in the user interface of the network service to start building the pipeline. The network service obtains the pipeline configuration information and calls the local communication service. When the local communication service is executed, the build information is initialized, the container is determined according to the build information, the incremental or full information in the local path of the target code is obtained, and the containerized service is started. When the containerized service is running, the container environment variables are initialized, the container is started and initialized according to the pipeline configuration information and the build information, and the files in the local path are uploaded incrementally or fully according to the status of the container. The containerized service calls the pipeline service and starts the construction of the pipeline. When the pipeline service is running, each pipeline function is executed in sequence according to the pipeline function sequence in the pipeline configuration information, and the target code is continuously integrated and / or continuously delivered, and the log push service is started. Through the log push service, log data is generated during the execution of the pipeline function, and the log data is transmitted to the network service for display. After the execution of the pipeline service is completed, the pipeline service is stopped through the local communication service, and the container is stopped and destroyed to automatically release the virtual disk space.

[0026] Figure 3 A flow chart of a continuous integration delivery processing method provided in an embodiment of the present application; the method can be applied to the above-mentioned pipeline construction system, such as Figure 3 As shown, the method may include: S301. Respond to a configuration operation of a user in a user interface of a network service, and obtain pipeline configuration information corresponding to a target code.

[0027] The pipeline configuration information includes: the local path of the target code, the container mapping path, the pipeline number, and the pipeline function sequence.

[0028] Optionally, steps S301-S302 are performed by the above network service. That is, in step S301, the network service obtains the above pipeline configuration information according to the configuration operation of the user in the user interface. In step S302, the network service calls the local communication service according to the build instruction initiated by the user in the user interface.

[0029] The user may input configuration operations through the user interface, and in response to the configuration operations, the network service may obtain the pipeline configuration information created by the user for the target code.

[0030] The user interface can provide a variety of pipeline functions, which can include, for example: C++ compilation function, static scanning function, unit testing function, quality checkpoint function, deployment service function, automated case testing function, etc. Users can select pipeline functions that can meet the requirements from multiple pipeline functions according to the integrated delivery requirements of the target code, and arrange the selected pipeline functions according to the execution logic of the requirements to obtain a pipeline function sequence.

[0031] Exemplarily: During the program development phase, a self-test pipeline or a code debugging pipeline may be constructed.

[0032] The pipeline function sequence corresponding to the self-test pipeline can be, for example, C++ compilation function-unit test function-quality checkpoint function, etc. The pipeline function sequence corresponding to the management and operation pipeline can be, for example, deployment service function-automated use case test function, etc.

[0033] The local path of the target code refers to the path on the local terminal used to store the target code; the container mapping path refers to the path corresponding to the local path in the container. Through the local path and the container mapping path, files in the local path can be uploaded to the container mapping path, so that the pipeline service in the container can read the relevant information of the target code from the container mapping path when running.

[0034] S302: In response to a construction instruction input by a user in a user interface, a local communication service is called.

[0035] Exemplarily, the user may input a build instruction by clicking a build button in the user interface, and the network service may respond to the build instruction and call a local communication service on the local terminal to start building the pipeline.

[0036] S303, when the local communication service is executed, the change information and the build information of the target code are determined, the target container is determined according to the build information, the target container is started and initialized according to the pipeline configuration information and the build information, and the pipeline service in the target container is called.

[0037] Optionally, when the local communication service is executed, an initialization action may be performed to determine the change information and construction information of the target code.

[0038] The build information may include, but is not limited to: container ID, build number, build time, pipeline number, etc.

[0039] Exemplarily, the container identifier may be a container name.

[0040] According to the determined build information, the target container can be queried and determined, and the target container can be started and initialized based on the pipeline configuration information and the build information. After the target container is started and initialized successfully, the local communication service can call the pipeline service in the target container to run.

[0041] S304: When the pipeline service is executed, the target code is continuously integrated and / or continuously delivered according to the pipeline function sequence and the change information of the target code.

[0042] When the pipeline service in the target container is running, the pipeline function sequence in the pipeline configuration information can be obtained, and the target code can be continuously integrated and / or continuously delivered according to the pipeline function sequence and the change information of the target code.

[0043] When continuously integrating and / or continuously delivering the target code based on the target code change information, you can perform continuous integration and / or continuous delivery only on the changed part of the target code, or you can perform continuous integration and / or continuous delivery on all the target code, depending on the operation requirements of the pipeline.

[0044] By calling the pipeline service in the target container to build the pipeline, the local containerized operation of the pipeline can be realized, local resources can be reasonably utilized, and the construction of the pipeline no longer depends on public server resources, thereby improving development efficiency.

[0045] In summary, the continuous integration delivery processing method provided by this embodiment includes: responding to the configuration operation of the user in the user interface of the network service, obtaining the pipeline configuration information corresponding to the target code; responding to the build instruction input by the user in the user interface, calling the local communication service; when the local communication service is executed, determining the change information and build information of the target code, determining the target container according to the build information, starting and initializing the target container according to the pipeline configuration information and the build information, and calling the pipeline service in the target container; when the pipeline service is executed, the target code is continuously integrated and / or continuously delivered according to the pipeline function sequence and the change information of the target code. This method can obtain the configuration information of the pipeline through the user interface provided by the network service. Based on the build instruction, the network service can call the local communication service of the local terminal to execute, so as to start and initialize the local container through the local communication service, and call the pipeline service in the container to run, so as to continuously integrate and / or continuously deliver the target code according to the pipeline configuration information. By calling the pipeline service in the local target container to build the pipeline, the local containerized operation of the pipeline can be realized, and local resources can be reasonably used, so that the construction of the pipeline no longer depends on public server resources, increasing the flexibility of pipeline construction and improving development efficiency. And using the local container as the operation carrier of the pipeline can ensure the consistency of the pipeline operation environment and the production environment. The program that has passed the local compilation does not need to be recompiled on the remote server, which can improve the efficiency of integrated delivery. At the same time, based on the local construction of the pipeline, code errors can be discovered earlier and more accurately, improving the efficiency of problem solving.

[0046] Figure 4 A flowchart of another continuous integration delivery processing method provided by an embodiment of the present application; Optionally, in step S303, determining the change information and build information of the target code may include: S401, determining the target file that has been changed in the local path, and obtaining the change information of the target code according to the path where the target file is located and the file name of the target file.

[0047] The changed target file can be searched from the local path by scanning the local path. The target file may include one or more. The determined target file may be a newly generated file or a file whose file content has been modified.

[0048] According to the determined file name of the target file and the path where the target file is located, the change information of the target code can be obtained.

[0049] As an example, the change information may include the file names of all changed target files and the relative path of each target file.

[0050] S402: Execute initialization processing to obtain construction information.

[0051] The network service calls the local communication service to perform initialization actions and obtain build information. The initialization actions may include, for example, generating a container name, a build number, and a build time.

[0052] A container name may be generated by performing an operation of generating a container name.

[0053] By executing the build number operation, you can get the last build number and generate the current build number based on the last build number. In addition to indicating the build number, the build number can also be used to update the pipeline status and display the log in real time.

[0054] By executing the operation of generating the build time, the current time can be obtained and used as the build time. The build time can be used to indicate the time point of the current build. Furthermore, the time consumption of this build and other information can be determined based on the build time.

[0055] The above exemplary lists several types of construction information. In practical applications, the determined construction information may also include, for example: a port number of a container, a local path name, and a container mapping path name.

[0056] Optionally, in step S303, determining the target container according to the construction information includes: determining the target container according to a container identifier in the construction information.

[0057] For example, the target container can be determined based on the container name.

[0058] In this embodiment, the target container can be determined according to the container identifier in the construction information, wherein the target container can be created based on local idle resources, or a local existing target container can be called. The local communication service can query the container status according to the container identifier, and determine to create a target container or call an existing container according to the container status.

[0059] Figure 5 A flowchart of another continuous integration delivery processing method provided by an embodiment of the present application; optionally, in step S303, starting and initializing the target container according to the pipeline configuration information and the build information may include: S501: Determine the current state of the target container.

[0060] The local communication service may check the current state of the target container, and may check the container state corresponding to the container identifier according to the container identifier.

[0061] The current state of the target container can be any of the following states: None, which means that the target container does not exist; Stopped, which means that the target container has stopped running; Running, which means that the target container is running; Created, which means that the target container is being created.

[0062] S502: Start and initialize the target container according to the current state of the target container, pipeline configuration information, and build information.

[0063] According to the current state of the target container, the target container can be started and initialized according to the container startup and initialization method corresponding to the current state based on the pipeline configuration information and the build information.

[0064] Optionally, in step S502, starting and initializing the target container according to the current state of the target container, pipeline configuration information and build information may include: if the current state of the target container is non-existent, creating the target container, uploading and storing all files under the local path to the container mapping path, starting the target container, and initializing the environment variables of the target container according to the build information.

[0065] Optionally, if the current state of the target container is non-existent, it means that the target container has never been created or has been destroyed. In this case, the target container can be created, and the above container identifier is used as the identifier of the target container. The full file in the local path is uploaded and stored in the container mapping path.

[0066] In the case of creating a target container, the container mapping path of the target container does not contain any files, so all files in the local path of the target code need to be uploaded to the container mapping path.

[0067] The full files here may include relevant business codes, external tools, plug-ins and dependent libraries of the target code.

[0068] After the full file upload is completed, the target container can be started, and the data in the build information is passed to the corresponding parameters in the environment variables of the target container to complete the initialization of the environment variables of the target container.

[0069] Optionally, in step S502, starting and initializing the target container according to the current state of the target container, the pipeline configuration information, and the build information may include: if the current state of the target container is stopped, uploading and storing the incremental change files under the local path to the container mapping path according to the change information of the target code, starting the target container, and initializing the environment variables of the target container according to the build information.

[0070] Optionally, if the current state of the target container is stopped, there is no need to create the target container, but the container corresponding to the container identifier is used as the target container.

[0071] In this case, the target container may already contain historical files of the target code. Based on the determined change information of the target code, the changed target file and the directory where the target file is located can be obtained. On this basis, the incremental change file under the local path, that is, the changed target file, is uploaded and stored in the container mapping path. Similarly, the target container is started, and the target container environment variables are initialized according to the build information in the above manner.

[0072] If the current state of the target container is running, you can choose to wait for the target container to finish running and then start the target container to initialize the environment variables of the target container; or you can immediately terminate the current running task of the target container and initialize the environment variables of the target container.

[0073] Of course, this solution also supports concurrent running of containers. If the target container is running, the environment variables of the target container can be initialized through concurrent running without terminating the current running tasks of the target container to build the user's pipeline.

[0074] Figure 6 A flowchart of another continuous integration and delivery processing method provided by an embodiment of the present application; optionally, in step S304, continuously integrating and / or continuously delivering the target code according to the pipeline function sequence and the change information of the target code may include: S601. Execute each pipeline function in sequence according to the order of each pipeline function in the pipeline function sequence to perform continuous integration and / or continuous delivery of the target code.

[0075] After the target container is started, the local communication service can call the pipeline service in the target container to run. When the pipeline service is running, it can continuously integrate and / or continuously deliver the target code according to the pipeline function sequence in the pipeline configuration information.

[0076] In one implementation, the pipeline service may execute the functional program of each pipeline function in sequence based on the pipeline function order arranged in the pipeline function sequence, and perform continuous integration and / or continuous delivery of the target code.

[0077] Optionally, when the pipeline service is running, the full file of the target code can be read from the container mapping path, or the incremental change file of the target code can be read according to the aforementioned change information, so as to execute each pipeline function on the full file or the incremental change file in sequence, and perform continuous integration and / or continuous delivery of the target code.

[0078] It is worth noting that, based on the execution requirements of the pipeline, it can be determined whether to execute on the full file or on the change information.

[0079] For example, when the pipeline is executed this time, it does not focus on the change information, but needs to execute the full file, then the full path of the target code can be read from the container mapping path to execute each pipeline function. If only the change information is concerned during this execution, only the incremental change file needs to be read.

[0080] S602: Start the log push service, and when executing each pipeline function, generate and upload log data through the log push service.

[0081] In some embodiments, during the operation of the pipeline service, a log push service can be started, so that during the operation of the pipeline service, a build result log can be generated through the log push service and pushed to the log service center. The network service can periodically call the interface of the log service center for log display.

[0082] It should be noted that when generating a build result log, you can generate a build result log corresponding to the pipeline of this build according to the build number of the pipeline, and write the build time, container ID, etc. as log data into the result log.

[0083] You can then query the build result log of the corresponding pipeline based on the build number of the pipeline.

[0084] Optionally, the method of the present application further includes: when the pipeline service execution ends, the local communication service triggers to stop the pipeline service, and stops and destroys the target container.

[0085] In some embodiments, after the execution of the pipeline service is completed, the local communication service can trigger the stop of the pipeline service, stop and automatically destroy the target container, and automatically compress the virtual disk. The virtual disk stores relevant configuration files and various components of the target container. By destroying the target container and automatically compressing the virtual disk, the disk space pressure can be reduced and the resource consumption of the local system can be reduced.

[0086] In summary, the continuous integration delivery processing method provided by this embodiment includes: responding to the configuration operation of the user in the user interface of the network service, obtaining the pipeline configuration information corresponding to the target code; responding to the build instruction input by the user in the user interface, calling the local communication service; when the local communication service is executed, determining the change information and build information of the target code, determining the target container according to the build information, starting and initializing the target container according to the pipeline configuration information and the build information, and calling the pipeline service in the target container; when the pipeline service is executed, the target code is continuously integrated and / or continuously delivered according to the pipeline function sequence and the change information of the target code. This method can obtain the configuration information of the pipeline through the user interface provided by the network service. Based on the build instruction, the network service can call the local communication service of the local terminal to execute, so as to start and initialize the local container through the local communication service, and call the pipeline service in the container to run, so as to continuously integrate and / or continuously deliver the target code according to the pipeline configuration information. By calling the pipeline service in the local target container to build the pipeline, the local containerized operation of the pipeline can be realized, and local resources can be reasonably used, so that the construction of the pipeline no longer depends on public server resources, increasing the flexibility of pipeline construction and improving development efficiency. And using the local container as the operation carrier of the pipeline can ensure the consistency of the pipeline operation environment and the production environment. The program that has passed the local compilation does not need to be recompiled on the remote server, which can improve the efficiency of integrated delivery. At the same time, based on the local construction of the pipeline, code errors can be discovered earlier and more accurately, improving the efficiency of problem solving.

[0087] In addition, after the pipeline service in the target container ends, it can be destroyed immediately after use, and the target container can be destroyed and the virtual disk space corresponding to the target container can be automatically compressed and released, which reduces disk pressure and reduces the consumption of local resources.

[0088] The following describes the apparatus, device, storage medium, etc. used to execute the continuous integration delivery processing method provided by this application. The specific implementation process and technical effects are described above and will not be repeated below.

[0089] Figure 7 This is a schematic diagram of a continuous integration delivery processing device provided in an embodiment of the present application. The functions implemented by the continuous integration delivery processing device correspond to the steps performed by the above method. Figure 7 As shown, the device may include: an acquisition module 710 and a processing module 720; The acquisition module 710 is used to respond to the configuration operation of the user in the user interface of the network service, and acquire the pipeline configuration information corresponding to the target code, the pipeline configuration information including: the local path of the target code, the container mapping path, the pipeline number and the pipeline function sequence; The processing module 720 is used to respond to the building instruction input by the user in the user interface and call the local communication service; The processing module 720 is used to determine the change information and the build information of the target code when the local communication service is executed, determine the target container according to the build information, start and initialize the target container according to the pipeline configuration information and the build information, and call the pipeline service in the target container; The processing module 720 is used to continuously integrate and / or continuously deliver the target code according to the pipeline function sequence and the change information of the target code when the pipeline service is executed.

[0090] Optionally, the processing module 720 is specifically used to determine the target file that has been changed in the local path, and obtain the change information of the target code according to the path where the target file is located and the file name of the target file; Perform initialization processing and obtain build information.

[0091] Optionally, the processing module 720 is specifically configured to determine a target container according to a container identifier in the build information.

[0092] Optionally, the processing module 720 is specifically configured to determine a current state of the target container; Start and initialize the target container based on the current state of the target container, pipeline configuration information, and build information.

[0093] Optionally, the processing module 720 is specifically used to create a target container if the current state of the target container is non-existent, upload and store all files under the local path to the container mapping path, start the target container, and initialize the environment variables of the target container according to the build information.

[0094] Optionally, the processing module 720 is specifically used to upload and store the incremental change files under the local path to the container mapping path according to the change information of the target code if the current state of the target container is stopped, start the target container, and initialize the environment variables of the target container according to the build information.

[0095] Optionally, the processing module 720 is specifically configured to sequentially execute each pipeline function according to the order of each pipeline function in the pipeline function sequence, so as to continuously integrate and / or continuously deliver the target code; Start the log push service and generate and upload log data through the log push service when executing each pipeline function.

[0096] Optionally, the processing module 720 is also used for triggering the local communication service to stop the pipeline service, and stop and destroy the target container when the pipeline service is finished executing.

[0097] The above-mentioned device is used to execute the method provided by the aforementioned embodiment, and its implementation principle and technical effect are similar, which will not be repeated here.

[0098] The above modules may be one or more integrated circuits configured to implement the above methods, such as one or more application specific integrated circuits (ASIC), or one or more digital singnal processors (DSP), or one or more field programmable gate arrays (FPGA). For another example, when a module is implemented in the form of a processing element scheduling program code, the processing element may be a general-purpose processor, such as a central processing unit (CPU) or other processor that can call program code. For another example, these modules may be integrated together and implemented in the form of a system-on-a-chip (SOC).

[0099] The above modules can be connected or communicated with each other via a wired connection or a wireless connection. The wired connection may include a metal cable, an optical cable, a hybrid cable, etc., or any combination thereof. The wireless connection may include a connection in the form of a LAN, a WAN, Bluetooth, a ZigBee, or NFC, or any combination thereof. Two or more modules may be combined into a single module, and any one module may be divided into two or more units. Those skilled in the art will clearly understand that for the convenience and simplicity of description, the specific working process of the system and device described above can refer to the corresponding process in the method embodiment, and will not be repeated in this application.

[0100] Figure 8 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application, which may be a computing device with data processing capabilities.

[0101] The device includes: a processor 801 and a storage medium 802 .

[0102] The storage medium 802 is used to store programs, and the processor 801 calls the programs stored in the storage medium 802 to execute the above method embodiment. The specific implementation method and technical effect are similar and will not be repeated here.

[0103] Among them, the storage medium 802 stores program code, and when the program code is executed by the processor 801, the processor 801 executes various steps in the continuous integration delivery processing method according to various exemplary embodiments of the present application described in the above "Exemplary Method" section of this specification.

[0104] The processor 801 may be a general-purpose processor, such as a central processing unit (CPU), a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, and may implement or execute the methods, steps and logic block diagrams disclosed in the embodiments of the present application. A general-purpose processor may be a microprocessor or any conventional processor, etc. The steps of the method disclosed in the embodiments of the present application may be directly embodied as being executed by a hardware processor, or may be executed by a combination of hardware and software modules in the processor.

[0105] The storage medium 802, as a non-volatile computer-readable storage medium, can be used to store non-volatile software programs, non-volatile computer executable programs and modules. The storage medium may include at least one type of storage medium, for example, a flash memory, a hard disk, a multimedia card, a card-type storage medium, a random access storage medium (Random Access Memory, RAM), a static random access storage medium (Static Random Access Memory, SRAM), a programmable read-only storage medium (Programmable Read Only Memory, PROM), a read-only storage medium (Read Only Memory, ROM), an electrically erasable programmable read-only storage medium (Electrically Erasable Programmable Read-Only Memory, EEPROM), a magnetic storage medium, a disk, an optical disk, and the like. The storage medium is any other medium that can be used to carry or store the desired program code in the form of an instruction or data structure and can be accessed by a computer, but is not limited thereto. The storage medium 802 in the embodiment of the present application can also be a circuit or any other device that can realize a storage function, for storing program instructions and / or data.

[0106] Optionally, the present application also provides a program product, such as a computer-readable storage medium, including a program, which is used to execute the above method embodiment when executed by a processor.

[0107] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0108] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0109] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of hardware plus software functional units.

[0110] The above-mentioned integrated unit implemented in the form of a software functional unit can be stored in a computer-readable storage medium. The above-mentioned software functional unit is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) or a processor (English: processor) to perform some steps of the methods of each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only storage medium (English: Read-Only Memory, referred to as: ROM), random access storage medium (English: Random Access Memory, referred to as: RAM), disk or optical disk and other media that can store program codes.

Claims

1. A continuous integration delivery processing method, characterized in that: include: In response to a configuration operation of a user in a user interface of a network service, pipeline configuration information corresponding to the target code is obtained, wherein the pipeline configuration information includes: a local path of the target code, a container mapping path, a pipeline number, and a pipeline function sequence; In response to a build instruction input by a user in the user interface, calling a local communication service; When the local communication service is executed, the change information and the build information of the target code are determined, a target container is determined according to the build information, the target container is started and initialized according to the pipeline configuration information and the build information, and the pipeline service in the target container is called; When the pipeline service is executed, the target code is continuously integrated and / or continuously delivered according to the pipeline function sequence and the change information of the target code.

2. The method according to claim 1, characterized in that The determining of the change information and construction information of the target code includes: Determine the target file that has been changed in the local path, and obtain the change information of the target code according to the path where the target file is located and the file name of the target file; Perform initialization processing to obtain the construction information.

3. The method according to claim 1, characterized in that: The determining the target container according to the construction information includes: The target container is determined according to the container identifier in the build information.

4. The method according to claim 1, characterized in that: The starting and initializing the target container according to the pipeline configuration information and the construction information includes: Determining a current state of the target container; The target container is started and initialized according to the current state of the target container, the pipeline configuration information, and the build information.

5. The method according to claim 4, characterized in that The starting and initializing the target container according to the current state of the target container, the pipeline configuration information, and the construction information includes: If the current state of the target container is non-existent, the target container is created, all files under the local path are uploaded and stored under the container mapping path, the target container is started, and the environment variables of the target container are initialized according to the build information.

6. The method according to claim 4, characterized in that The starting and initializing the target container according to the current state of the target container, the pipeline configuration information, and the construction information includes: If the current state of the target container is stopped, the incremental change file under the local path is uploaded and stored in the container mapping path according to the change information of the target code, the target container is started, and the environment variables of the target container are initialized according to the build information.

7. The method according to claim 1, characterized in that The continuously integrating and / or continuously delivering the target code according to the pipeline function sequence and the change information of the target code includes: Executing each pipeline function in sequence according to the order of each pipeline function in the pipeline function sequence to continuously integrate and / or continuously deliver the target code; The log push service is started, and when each pipeline function is executed, log data is generated and uploaded through the log push service.

8. The method according to any one of claims 1 to 7, characterized in that: Also includes: When the execution of the pipeline service ends, the local communication service triggers to stop the pipeline service, and stops and destroys the target container.

9. A continuous integration delivery processing device, characterized in that: include: Acquisition module and processing module; The acquisition module is used to respond to the configuration operation of the user in the user interface of the network service, and acquire the pipeline configuration information corresponding to the target code, wherein the pipeline configuration information includes: the local path of the target code, the container mapping path, the pipeline number and the pipeline function sequence; The processing module is used to call the local communication service in response to the construction instruction input by the user in the user interface; The processing module is used to determine the change information and the build information of the target code when the local communication service is executed, determine the target container according to the build information, start and initialize the target container according to the pipeline configuration information and the build information, and call the pipeline service in the target container; The processing module is used to continuously integrate and / or continuously deliver the target code according to the pipeline function sequence and the change information of the target code when the pipeline service is executed.

10. An electronic device, characterized in that: include: A processor, a storage medium and a bus, wherein the storage medium stores program instructions executable by the processor, and when the electronic device is running, the processor and the storage medium communicate through the bus, and the processor executes the program instructions to implement the continuous integration delivery processing method as described in any one of claims 1 to 8.

11. A computer program product, characterized in that The computer program product includes computer program code. When the computer program code is executed by a computing device, the computing device executes the continuous integration delivery processing method according to any one of claims 1 to 8.

Citation Information

Patent Citations

  • Multi-task scheduling automated testing method and system based on Docker container

    CN108427641A

  • Program development method and device

    CN109508178A

  • Test method, test platform and target server

    CN110399307A

  • Container-based load balancing distributed compiling system and method

    CN111061487A

  • Method and device for controlling state of assembly line task

    CN113778527A

Cited By

  • Continuous integration method and system for embedded software development

    CN120803472A