A container-based continuous integration method, device and electronic device
By pre-creating and storing container images of multiple architecture versions, applications from other hardware platforms are directly compiled in the current environment, solving the problem of continuous integration of multiple hardware devices, reducing the complexity of continuous integration and resource waste.
Patent Information
- Application Number
- CN202210447647.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-04-26
- Publication Date
- 2024-11-12
- Estimated Expiration
- 2042-04-26
AI Technical Summary
The prior art is difficult to achieve continuous integration for a variety of different hardware devices, and the use of cross-compilation tools is cumbersome, resulting in high complexity of continuous integration and waste of resources.
By pre-creating multiple container images, creating multiple image versions for hardware platforms of different architectures, and storing them in the mirror warehouse. Extracting the corresponding image from the warehouse according to integration requests creates integrated containers. If the architecture does not match, use a binary conversion unit for translation. , directly compile applications from other architecture platforms in the current environment.
It realizes the direct compilation of applications supported by other hardware platforms in the current running environment without cross-compilation tools, reducing the complexity of continuous integration and resource waste, and solving the continuous integration problem of multiple hardware devices.
Smart Images

Figure CN114816424B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of software pipelines, and in particular to a container-based continuous integration method, device and electronic equipment. Background Art
[0002] In the field of intelligent driving of construction machinery, it is necessary to frequently maintain and upgrade the software programs burned into the domain controllers of construction machinery. In order to cope with the continuous software upgrade work, the most commonly used technical means at present is software pipeline technology, so as to achieve continuous delivery of software programs to domain controllers. Software pipelines usually use specific servers for continuous integration, continuous delivery, and continuous deployment, resulting in various dependencies and third-party packages pre-installed on the server. With the increase of software pipelines, servers are becoming more and more bloated, and at the same time, machine classification builds will be increased, such as specific machines building specific languages; the front end and back end are built on different machines. However, the pipeline is not running all the time, which will inevitably lead to a waste of server resources. In order to solve this problem, software pipelines based on container technology came into being.
[0003] Document CN112363733A discloses a continuous integration method based on Docker containers. The method mentions that the files to be processed are loaded into the continuous integration environment; then the corresponding Docker image is selected according to the type of the files to be processed; then the corresponding Docker container is started according to the Docker image; and finally the files to be processed are processed in the corresponding Docker container.
[0004] However, the above solutions are mainly implemented for the same hardware platform. For example, if the current server is an x86 architecture, then the various container images it runs are also x86 architecture images. Different container images are used to integrate components with different functions, but the integrated components can only be used in the development board of the x86 architecture. However, in real scenarios, users use a variety of devices. How to continuously integrate various hardware devices based on container technology is an urgent problem to be solved. Summary of the invention
[0005] In view of this, the embodiments of the present invention provide a container-based continuous integration method, apparatus, and electronic device, thereby realizing the function of continuous integration for various hardware devices based on container technology.
[0006] According to a first aspect, an embodiment of the present invention provides a container-based continuous integration method, the method comprising: receiving an integration request, and parsing an architecture type and a function type in the integration request; extracting a container image according to the architecture type and the function type, and creating an integrated container based on the container image; if the architecture type is different from the architecture of the current operating environment, translating the architecture of the integrated container into the architecture of the current operating environment, and running the translated integrated container; pulling the target code into the translated integrated container for compilation.
[0007] Optionally, translating the architecture of the integrated container into the architecture of the current operating environment includes: creating a binary translation unit; and continuously translating binary instructions of the integrated container into an instruction set format of the current operating environment through the binary translation unit.
[0008] Optionally, the creating a binary conversion unit includes: entering a user mode of a QEMU simulator; and registering the binary conversion unit through a binfmt_misc mechanism.
[0009] Optionally, pulling the target code into the translated integrated container for compiling includes: statically scanning the pulled target code in the integrated container; and compiling the target code if the static scan meets requirements.
[0010] Optionally, before compiling the target code, the method further includes: executing preset test cases through the target code to generate a test report; sending the test report to the client; if qualified test report information fed back by the client is received, returning to the step of compiling the target code.
[0011] Optionally, if the integration request includes multiple architecture types, multiple container images are extracted accordingly and integrated containers corresponding to each container image are created. Then, after each integrated container is translated, the target code is simultaneously pulled into each integrated container for compilation.
[0012] Optionally, the method is applied to a slave node server, which is a server selected by a master node server in a container management system based on resource occupancy information, and is used to receive an integration request sent by the master node server. The resource occupancy information is information generated by the master node server by estimating the resources occupied by the integration task in the integration request.
[0013] According to the second aspect, an embodiment of the present invention provides a container-based continuous integration device, which includes: a request module, used to receive an integration request, and parse the architecture type and function type in the integration request; a container creation module, used to extract a container image according to the architecture type and the function type, and create an integrated container based on the container image; an architecture translation module, used to translate the architecture of the integrated container into the architecture of the current running environment if the architecture type is different from the architecture of the current running environment, and run the translated integrated container; an integration module, used to pull the target code into the translated integrated container for compilation.
[0014] According to the third aspect, an embodiment of the present invention provides an electronic device, comprising: a memory and a processor, the memory and the processor being communicatively connected to each other, the memory storing computer instructions, and the processor executing the method described in the first aspect or any optional implementation manner of the first aspect by executing the computer instructions.
[0015] According to a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium, wherein the computer-readable storage medium stores computer instructions, and the computer instructions are used to enable the computer to execute the method described in the first aspect or any optional implementation manner of the first aspect.
[0016] The technical solution provided by this application has the following advantages:
[0017] The technical solution provided by the present application first pre-creates multiple container images for program codes with different functions, and creates images of multiple architecture versions for each container image for hardware platforms with different architectures, and then pre-stores all the created images in the image warehouse. Afterwards, at the beginning of the continuous integration project of the target code, the project pre-declares the functional type of the target code and the architecture type of the hardware platform for which this integration is aimed. The server extracts the corresponding container image from the image warehouse according to the architecture type and function type, and then copies the container image to create an integrated container. Afterwards, it is determined whether the integrated container is an architecture that can be run on the current hardware platform. If it cannot run, the embodiment of the present invention translates the instructions of the integrated container through a pre-created architecture translation program to realize the operation of container images of other architectures in the current operating environment. Thereby, in the current operating environment, applications supported by other hardware platforms are directly compiled based on the integrated container, without the need to use cross-compilation tools for processing. Not only does it solve the problem of continuous integration for various hardware devices, but it also reduces the complexity of continuous integration compared to the use of cross-compilation tools. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] The features and advantages of the present invention will be more clearly understood by referring to the accompanying drawings, which are schematic and should not be construed as limiting the present invention in any way. In the accompanying drawings:
[0019] Figure 1 A schematic diagram of the steps of a container-based continuous integration method in one embodiment of the present invention is shown;
[0020] Figure 2 A schematic diagram of a process of a container-based continuous integration method in one embodiment of the present invention is shown;
[0021] Figure 3 A schematic diagram of the structure of a container-based continuous integration device in one embodiment of the present invention is shown;
[0022] Figure 4 A schematic structural diagram of an electronic device in one embodiment of the present invention is shown. DETAILED DESCRIPTION
[0023] In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present invention.
[0024] See also Figure 1 and Figure 2 In one embodiment, a container-based continuous integration method specifically includes the following steps:
[0025] Step S101: receiving an integration request, and parsing the architecture type and function type in the integration request.
[0026] Step S102: extracting a container image according to the architecture type and the function type, and creating an integrated container based on the container image.
[0027] Step S103: determining whether the architecture type is the same as the architecture of the current operating environment; if not, translating the architecture of the integrated container into the architecture of the current operating environment, and running the translated integrated container.
[0028] Step S104: Pull the target code into the translation integrated container for compilation.
[0029] Specifically, container technology is a lightweight virtualization technology. Container technology and host machines share hardware resources and operating systems, and can realize dynamic allocation of resources. Compared with virtual machines, virtual machines are system-level isolation, and containers are process-level isolation. They occupy fewer hardware resources, are smaller in size, and run faster. Therefore, in order to increase the speed of continuous integration and reduce the waste of server hardware resources, a container-based software pipeline method is proposed. However, in the prior art, there is a problem similar to that contained in the file CN112363733A that cannot be continuously integrated for a variety of hardware devices. In order to solve this problem, the prior art usually deploys a cross-compilation tool in the server. Programs of different architectures are compiled by cross-compilation tools. For example: the current operating environment is a server with an x86 architecture, running an x86 architecture container, and can compile an x86 architecture application, but if you want the application to run in an arm architecture platform, you need to use a cross-compilation tool to cross-compile the x86 code into the arm code, which is very cumbersome to implement.
[0030] Based on this, the embodiment of the present invention proposes a method for directly compiling different architecture platform applications through containers, without the need for cross-compilation tools, to further improve the speed of continuous integration. Specifically, the embodiment of the present invention first pre-creates multiple container images for program codes of different functions, and creates images of multiple architecture versions for each container image for hardware platforms of different architectures, and then pre-stores all created images in a private image warehouse. For example: the current operating environment is an x86 environment, and the default x86 environment can only create container images of the x86 architecture. Taking the container image of the arm architecture as an example, the qemu-user-static virtual machine (an emulator for running other architectures using the current operating system) can be registered in the user mode of QEMU (a simulator for virtualization), and then the DockerFile in Docker (a container management engine) is used to build an image that supports the arm architecture system, thereby realizing the construction of an arm architecture image in the x86 architecture. In this way, the architecture types supported for construction include but are not limited to armv7l, ppc64le, s390x, aarch64, armv7l, ppc64le. The above steps of creating different architecture images are prior art, and the detailed configuration process is not repeated.
[0031] Afterwards, at the beginning of the continuous integration project of the target code, the project pre-declares the functional type of the target code and the architecture type of the hardware platform for which this integration is targeted. The server extracts the corresponding container image from the image repository according to the architecture type and the functional type, and then copies the container image to create an integrated container. Since the prerequisite for the image to run is that the architecture of the image needs to be consistent with the architecture of the operating environment, for example: the container image is an arm architecture, and the current server is an x86 architecture, then the integrated container created according to the image cannot be run in the current server. Therefore, after the integrated container is created, the embodiment of the present invention determines whether the integrated container is an architecture that can be run on the current hardware platform. If it cannot run, the embodiment of the present invention translates the instructions of the integrated container through a pre-created architecture translation program, thereby realizing the operation of container images of other architectures in the current operating environment. Thus, in the current operating environment, applications supported by other hardware platforms are directly compiled based on the integrated container, without the need to use a cross-compilation tool for processing. Not only does it solve the problem of continuous integration for various hardware devices, but it also reduces the complexity of continuous integration compared to using a cross-compilation tool.
[0032] Specifically, in one embodiment, the above step S103 specifically includes the following steps:
[0033] Step 1: Create a binary translation unit.
[0034] Step 2: The binary instructions of the integrated container are continuously translated into the instruction set format of the current operating environment through the binary translation unit.
[0035] Specifically, different architecture platforms support different binary instruction sets. Therefore, based on the format of the instruction set, the embodiment of the present invention pre-creates a binary conversion unit to perform format translation for different binary instructions. Translating one architecture of a container to another architecture is like directly running the binary file of the target platform architecture on the local server in terms of operating effect. Therefore, the target code can be tested and compiled in the integrated container of the target platform architecture, avoiding the use of cross-compilation tools.
[0036] Specifically, in this embodiment, the above step 1 specifically includes the following steps:
[0037] Step 3: Enter the user mode of the QEMU emulator.
[0038] Step 4: Register the binary translation unit through the binfmt_misc mechanism.
[0039] Specifically, if the current virtual machine kernel is a Linux kernel, on Linux, QEMU can simulate a complete operating system in addition to another mode called user mode (User mod). In this mode, there is a mechanism called binfmt_misc mechanism, which is similar to the Windows platform, where files with specific extensions can be bound and opened with specific programs. For example, PDF files are opened with Acrobat Reader, which greatly facilitates the user experience. On the Linux platform, binfmt_misc provides similar functions, and is even more powerful in a sense. Through the binfmt_misc mechanism, it is possible to set which program to use to open a specific file. Based on this mechanism, the present embodiment first enters the user mode of QEMU, and then determines the corresponding relationship of the instruction set for the same function according to the instruction sets of two different architectures in the Linux kernel, thereby pre-registering a binary conversion handler, and then using the registered binary conversion program as a binary conversion unit. When it is necessary to run an integrated container, the binary conversion unit is used to open the integrated container, and the binary file can be dynamically translated when the program is running, thereby running the integrated container.
[0040] Take a specific scenario as an example: download the container image qemu-aarch64-static, which is the arm architecture aarch64. Then, when running the image, mount the qemu-aarch64-static file to the / usr / bin / path of the arm image, and then run the aarch64 image. Similarly, the same method can be used to run images of other arm architectures on an x86 machine, including but not limited to armv7l, ppc64le, s390x, aarch64, armv7l, and ppc64le.
[0041] Specifically, in one embodiment, the above step S104 specifically includes the following steps:
[0042] Step 5: Perform a static scan on the pulled target code in the integrated container.
[0043] Step 6: If the static scan meets the requirements, compile the target code.
[0044] Specifically, in this embodiment, Jenkins (a continuous integration tool) is installed in the Docker engine. When a new software pipeline project is created, the scheduled image is declared in the pipeline. After the pipeline is run, the image is extracted, the container is created, and the container is run. The target code is then pulled from the code repository to a specific directory in the container. Before compiling the code, the embodiment of the present invention also performs a comprehensive static scan of the code, thereby improving the accuracy of the code and ensuring the reliability of continuous integration. For example: when the code coverage of the static scan meets the preset requirements, such as the code coverage is above 80%, the target code is compiled. The present invention is only taken as an example and is not limited to this.
[0045] In order to simplify the complexity of static scanning, the embodiment of the present invention directly introduces the sonarqube tool for static scanning (sonarqube is an open source code quality management tool), opens up the interaction between Jenkins and sonarqube tools, and integrates a C++ plug-in in the sonarqube tool to achieve static scanning of the target code of this embodiment.
[0046] Specifically, in one embodiment, before the above step 6, the container-based continuous integration method provided by the embodiment of the present invention further includes the following steps:
[0047] Step 7: Execute the preset test cases through the target code and generate a test report.
[0048] Step 8: Send the test report to the client.
[0049] Step 9: If the test report feedback from the client is qualified, return to the step of compiling the target code.
[0050] Specifically, in this embodiment, unit testing is also performed after static checking. To execute the test unit, it is necessary to write corresponding test cases according to the test framework. The embodiment of the present invention creates test cases based on the gtest test framework, and uses the gcovr tool to generate test reports for sonarqube to parse. After sonarqube parses, the results of the execution of each step of the entire test case can be intuitively observed. After that, the test report is sent to the client for R&D personnel to check. After the R&D personnel check, they will send the test report qualification information to the current server through the client. After receiving the test report qualification information, the current server will compile the target code, thereby further improving the reliability of the target code compilation.
[0051] Specifically, in one embodiment, if the integration request includes multiple architecture types, multiple container images are extracted and integrated containers are created, and then the target code is pulled and compiled simultaneously through each integrated container. For example: when the integration request requires the simultaneous compilation of applications for two or more hardware platforms, assuming the armv7l architecture and the ppc64le structure. This embodiment directly calls two or more pre-configured different container environments by integrating the compilation tool chain. The architecture of each container is then translated. After the container is translated, the target code is pulled from two or more containers at the same time for parallel testing and compilation. The compiled multiple executable files are then published to the corresponding environment. Based on the concurrent construction of containers, the efficiency of continuous integration is further improved.
[0052] Specifically, an embodiment of the present invention provides a container-based continuous integration method, which is applied to a slave node server. The slave node server is a server selected by a master node server in a container management system based on resource occupancy information, and is used to receive an integration request sent by the master node server. The resource occupancy information is information generated by the master node server by estimating the resources occupied by the integration task in the integration request.
[0053] Specifically, in an embodiment of the present invention, the Docker container engine is deployed in a container management system, such as a k8s container management system. Thus, the scheduling mechanism of the system is based on the master node server. The integration request is received through the master node server, and then the hardware resource usage and integration time are estimated in advance according to the code to be integrated in the integration request, and resource usage information is obtained, so that the master node server selects a relatively idle target server from a number of slave node servers to integrate the target code, further avoiding the waste of hardware resources and the problem of low efficiency of continuous integration, and then in the above-mentioned target server, the work of steps S101 to S104 is performed, and the solution provided in the embodiment of the present invention is combined with the k8s container management system technology to further improve the speed of continuous integration.
[0054] Through the above steps, the technical solution provided by the present application first pre-creates multiple container images for program codes with different functions, and creates images of multiple architecture versions for each container image for hardware platforms with different architectures, and then pre-stores all the created images in the image warehouse. Afterwards, at the beginning of the continuous integration project of the target code, the project pre-declares the functional type of the target code and the architecture type of the hardware platform for which this integration is aimed. The server extracts the corresponding container image from the image warehouse according to the architecture type and the function type, and then copies the container image to create an integrated container. Afterwards, it is determined whether the integrated container is an architecture that can be run on the current hardware platform. If it cannot run, the embodiment of the present invention translates the instructions of the integrated container through a pre-created architecture translation program to realize the operation of container images of other architectures in the current operating environment. Thereby, in the current operating environment, applications supported by other hardware platforms are directly compiled based on the integrated container, without the need to use cross-compilation tools for processing. Not only does it solve the problem of continuous integration for various hardware devices, but it also reduces the complexity of continuous integration compared to the use of cross-compilation tools.
[0055] like Figure 3 As shown, this embodiment also provides a container-based continuous integration device, which includes:
[0056] The request module 101 is used to receive an integration request and parse the architecture type and function type in the integration request. For details, please refer to the relevant description of step S101 in the above method embodiment, which will not be repeated here.
[0057] The container creation module 102 is used to extract the container image according to the architecture type and the function type, and create an integrated container based on the container image. For details, please refer to the relevant description of step S102 in the above method embodiment, which will not be repeated here.
[0058] The architecture translation module 103 is used to translate the architecture of the integrated container into the architecture of the current operating environment if the architecture type is different from the architecture of the current operating environment, and run the translated integrated container. For details, please refer to the relevant description of step S103 in the above method embodiment, which will not be repeated here.
[0059] The integration module 104 is used to pull the target code into the translation integration container for compilation. For details, please refer to the relevant description of step S104 in the above method embodiment, which will not be repeated here.
[0060] A container-based continuous integration device provided in an embodiment of the present invention is used to execute a container-based continuous integration method provided in the above embodiment. Its implementation method and principle are the same. For details, please refer to the relevant description of the above method embodiment, which will not be repeated here.
[0061] Through the collaborative cooperation of the above-mentioned components, the technical solution provided by the present application first pre-creates multiple container images for program codes with different functions, and creates images of multiple architecture versions for each container image for hardware platforms with different architectures, and then pre-stores all the created images in the image warehouse. Afterwards, at the beginning of the continuous integration project of the target code, the project pre-declares the functional type of the target code and the architecture type of the hardware platform for which this integration is aimed. The server extracts the corresponding container image from the image warehouse according to the architecture type and function type, and then copies the container image to create an integrated container. Afterwards, it is determined whether the integrated container is an architecture that can be run on the current hardware platform. If it cannot run, the embodiment of the present invention translates the instructions of the integrated container through a pre-created architecture translation program to realize the operation of container images of other architectures in the current operating environment. Thereby, in the current operating environment, applications supported by other hardware platforms are directly compiled based on the integrated container, without the need to use cross-compilation tools for processing. Not only does it solve the problem of continuous integration for various hardware devices, but it also reduces the complexity of continuous integration compared to the use of cross-compilation tools.
[0062] Figure 4 An electronic device according to an embodiment of the present invention is shown, the device includes a processor 901 and a memory 902, which can be connected via a bus or other means. Figure 4 The example of connecting through bus is taken in the following.
[0063] The processor 901 may be a central processing unit (CPU). The processor 901 may also be other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, or a combination of the above chips.
[0064] The memory 902 is a non-transitory computer-readable storage medium that can be used to store non-transitory software programs, non-transitory computer executable programs and modules, such as program instructions / modules corresponding to the methods in the above method embodiments. The processor 901 executes various functional applications and data processing of the processor by running the non-transitory software programs, instructions and modules stored in the memory 902, that is, implementing the methods in the above method embodiments.
[0065] The memory 902 may include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required by at least one function; the data storage area may store data created by the processor 901, etc. In addition, the memory 902 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other non-volatile solid-state storage device. In some embodiments, the memory 902 may optionally include a memory remotely arranged relative to the processor 901, and these remote memories may be connected to the processor 901 via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0066] One or more modules are stored in the memory 902 , and when executed by the processor 901 , the method in the above method embodiment is executed.
[0067] The specific details of the above electronic device can be understood by referring to the corresponding descriptions and effects in the above method embodiments, and will not be repeated here.
[0068] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be implemented by instructing the relevant hardware through a computer program. The implemented program can be stored in a computer-readable storage medium, and the computer-readable storage medium is located in a remote cloud server. The remote cloud server is a slave node server in a server cluster deployed by the k8s system, which is used to upgrade the software program in the engineering machinery domain controller. When the program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, the storage medium can be a disk, an optical disk, a read-only memory (ROM), a random access memory (RAM), a flash memory (Flash Memory), a hard disk (Hard Disk Drive, abbreviated as: HDD) or a solid-state drive (SSD), etc.; the storage medium can also include a combination of the above-mentioned types of memory.
[0069] Although the embodiments of the present invention have been described in conjunction with the accompanying drawings, those skilled in the art may make various modifications and variations without departing from the spirit and scope of the present invention, and such modifications and variations are all within the scope defined by the appended claims.
Claims
1. A container-based continuous integration method, characterized in that: The method comprises: receiving an integration request, and parsing an architecture type and a function type in the integration request; Extracting a container image according to the architecture type and the function type, and creating an integrated container based on the container image; If the architecture type is different from the architecture of the current operating environment, translating the architecture of the integrated container into the architecture of the current operating environment, and running the translated integrated container; Pulling the target code into the translated integrated container for compilation; If the integration request includes multiple architecture types, multiple container images are extracted accordingly and integrated containers corresponding to each container image are created. Then, after each integrated container is translated, the target code is simultaneously pulled into each integrated container for compilation.
2. The method according to claim 1, characterized in that: The translating the architecture of the integrated container into the architecture of the current operating environment includes: Create a binary translation unit; The binary instructions of the integrated container are continuously translated into the instruction set format of the current operating environment through the binary conversion unit.
3. The method according to claim 2, characterized in that The step of creating a binary conversion unit comprises: Enter the user mode of the QEMU emulator; The binary translation unit is registered via the binfmt_misc mechanism.
4. The method according to claim 1, characterized in that: Pulling the target code into the translated integrated container for compilation includes: Performing static scanning on the pulled target code in the integrated container; If the static scan meets the requirements, the target code is compiled.
5. The method according to claim 4, characterized in that Before compiling the target code, the method further includes: Execute preset test cases through the target code to generate a test report; Sending the test report to the client; If the test report feedback from the client is qualified, the process returns to the step of compiling the target code.
6. The method according to claim 1, characterized in that The method is applied to a slave node server, which is a server selected by a master node server in a container management system based on resource occupancy information, and is used to receive an integration request sent by the master node server. The resource occupancy information is information generated by the master node server by estimating the resources occupied by the integration task in the integration request.
7. A container-based continuous integration device, characterized in that: The device comprises: A request module, used for receiving an integration request and parsing an architecture type and a function type in the integration request; A container creation module, configured to extract a container image according to the architecture type and the function type, and create an integrated container based on the container image; an architecture translation module, configured to translate the architecture of the integrated container into the architecture of the current operating environment if the architecture type is different from the architecture of the current operating environment, and run the translated integrated container; The integration module is used to pull the target code into the translated integrated container for compilation; if the integration request includes multiple architecture types, multiple container images are extracted accordingly and integrated containers corresponding to each container image are created, and then after each integrated container is translated, the target code is pulled into each integrated container for compilation at the same time.
8. An electronic 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 according to any one of claims 1 to 6 by executing the computer instructions.
9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer-readable storage medium is located in a remote cloud server. The remote cloud server is used to upgrade the software program in the engineering machinery domain controller, and the computer instructions are used to enable the computer to execute the method described in any one of claims 1-6.
Citation Information
Patent Citations
Continuous integration method based on Docker container
CN112363733A
Method and device for maintaining consistency of running environment, storage medium and electronic equipment
CN112328301A
Container cluster deployment platform
CN114138402A
Security for container networks
US20210211408A1
