Multi-language tool management and automatic execution method and system based on containerization
Through containerization technology, tool execution scenarios are broken down into atomic steps and stored in a unified code base, which solves the problems of tool dispersion and insufficient multi-language support, realizes modular design and unified management of tools, and improves development efficiency and flexibility.
Patent Information
- Application Number
- CN202510984711.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-17
- Publication Date
- 2025-10-17
AI Technical Summary
Existing technologies lack a unified management and sharing mechanism in software development. The fragmentation of tools leads to inconsistent versions, limited multi-language support, high maintenance costs for public parameter changes, and the inability to reuse atomic steps, all of which affect development efficiency and project progress.
Through a container-based approach, the tool execution scenario is broken down into atomic steps and stored in a unified code base. This supports multiple programming languages, provides a user interaction interface and containerized execution, and realizes modular design and unified management of the tool.
It achieves the reuse of atomic steps in the tool, reduces development and maintenance costs, improves team collaboration efficiency and user experience, supports multi-language development, and meets the flexibility requirements of different scenarios.
Smart Images

Figure CN120803613A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of management and automated execution of software development tools, and particularly relates to a multi-language tool management and automated execution method and system based on containerization. BACKGROUND
[0002] In today's rapidly developing software development field, the use of automated tools has become a key means to improve development efficiency and reduce human errors. Especially in the continuous integration and continuous deployment (CI / CD) process, automated tools are widely used in environment deployment, application package upload, end-to-end testing and other repetitive tasks. These tools are usually written by developers using multiple programming languages (such as Shell, Python, Go, Node.js, etc.) to meet the diverse needs of different scenarios.
[0003] However, the existing technology has many deficiencies and shortcomings in managing and using these automated tools. First, there is a lack of unified management and sharing mechanism. Tools are usually scattered in the personal environment of each developer, making it difficult to achieve tool reuse and maintenance within the team, increasing development costs and time. Second, existing CI / CD tools have limited support for development languages, usually supporting only a few programming languages, which greatly limits the diversity and development flexibility of tools. In addition, the maintenance cost of changing public parameters is extremely high. When public parameters (such as environment variables, configuration items) need to be changed, developers have to modify the pipeline configuration one by one, which not only consumes time and effort, but also easily introduces errors. Finally, atomic steps cannot be reused in multiple pipelines, and many common steps in tools need to be developed and maintained repeatedly, further increasing the development and maintenance workload.
[0004] Chinese Patent No. CN113391872A discloses a task processing method, device, electronic equipment and storage medium. The scheme proposes a container-based task processing method, which solves the problem of insufficient tool program security, but still has the following shortcomings in actual application: 1. Insufficient centralization of tool management: Although a tool management terminal is introduced to centrally manage the image files of tool programs, the container instances of tool programs are still scattered on various task processing devices. This decentralized management method leads to inconsistent tool versions, especially when multiple devices work together, which further leads to inconsistent task processing results, affecting the accuracy and reliability of task processing. 2. Limited dynamic parameter configuration capability: Each task processing flow needs to be defined and maintained separately, resulting in increased workload for repeated development and maintenance, reducing development efficiency and increasing system complexity.
[0005] The deficiencies and shortcomings of these prior arts have seriously affected the work efficiency of software development teams and the overall progress of projects. In order to cope with these challenges, it is particularly necessary to develop a technical solution that can uniformly manage automation tools, support multi-language development, realize flexible configuration of parameters, and atomize step reuse. SUMMARY
[0006] Therefore, in order to overcome the deficiencies of the prior art, the present application aims to provide a container-based multi-language tool management and automated execution method and system.
[0007] According to a first aspect of the present application, a container-based multi-language tool management and automated execution method is provided, the method comprising: Step S1: defining a tool execution scenario, and decomposing the defined tool execution scenario into a plurality of atomic steps; Step S2: creating a code library, and storing files corresponding to the atomic steps in the created code library; Step S3: parsing the corresponding atomic steps according to user input and files in the code library, starting a container and executing a tool.
[0008] Optionally, in the container-based multi-language tool management and automated execution method of the present application, the defined tool execution scenario in step S1 includes: deploying a cluster; deploying a cluster and performing version end-to-end testing on the cluster; deploying a cluster and performing front-end end-to-end testing on the cluster; deploying a cluster and performing version end-to-end and front-end end-to-end testing on the cluster; performing version end-to-end testing on a deployed cluster; performing front-end end-to-end testing on a deployed cluster; performing version end-to-end and front-end end-to-end testing on a deployed cluster.
[0009] Optionally, in the container-based multi-language tool management and automated execution method of the present application, the defined tool execution scenario in step S1 is decomposed into the following atomic steps: deploying a cluster; obtaining a kubeconfig of the cluster; performing version end-to-end testing; performing front-end end-to-end testing.
[0010] Optionally, in the container-based multi-language tool management and automated execution method of the present application, the directory structure of the code library in step S2 includes a plurality of subdirectories, each subdirectory corresponding to an atomic step, and the subdirectory containing a script file and a metadata file of the atomic step.
[0011] Optionally, in the container-based multilingual tool management and automated execution method, in step S2, the script file comprises a script for executing a step, and the metadata file is used for defining metadata for executing the step, and parameters of the metadata file comprise: a name of the step, an image name for starting the container, an image version label, a name of a script executed in the container, a CPU resource request of the container, and a memory resource request of the container.
[0012] Optionally, in the container-based multilingual tool management and automated execution method, in step S2, the code base further comprises a workflow file in a yaml format, each workflow file corresponds to one tool, and the workflow file is used for defining an execution process of the tool, and parameters of the workflow file comprise: a name of the tool, atomic steps required for completing the tool in an execution order, and description information of the tool.
[0013] Optionally, in the container-based multilingual tool management and automated execution method, in step S2, the atomic steps required for completing the tool in the execution order can be dynamically increased or decreased according to a function to be completed by the workflow.
[0014] Optionally, in the container-based multilingual tool management and automated execution method, step S3 comprises: creating a tool and saving the tool to a database, when the created tool is executed, parsing a workflow file in the code base, obtaining execution steps of the tool and script files and metadata files corresponding to the execution steps, and starting a container according to the metadata file and parameter information input by a user, and executing a script according to the corresponding script file, when the script is executed, adding the parameter input by the user to an environment variable of the container after the parameter is parsed, and listening to and recording an execution state of the container, and updating an execution record in real time.
[0015] Optionally, the container-based multilingual tool management and automated execution method further comprises providing a user interactive interface, the user interactive interface is used for tool management, configuration, and execution of a script, and custom parameters corresponding to variables in the script, display of execution process parameters, and display of the execution record.
[0016] According to a second aspect of the present application, a container-based multilingual tool management and automated execution system is provided, the system comprises a management and execution server, and the management and execution server comprises: a tool execution scene disassembling module, configured to define a tool execution scene, and disassemble the defined tool execution scene into a plurality of atomic steps; A tool code library building module is configured to create a code library, and store files corresponding to the atomized steps in the created code library; A tool execution module is configured to parse corresponding atomized steps according to user input and files in the code library, start a container, and execute the tool.
[0017] According to a third aspect of the present application, a computer device is provided, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the method according to the first aspect of the present application when executing the program.
[0018] The container-based multilingual tool management and automated execution method and system of the present application has the following beneficial technical effects: 1. Atomized step reuse and modular design The complex tool execution task is decomposed into multiple atomized steps, and these steps are dynamically combined by a Workflow file to generate a new tool. This modular design allows general steps to be reused in different tools, avoiding repeated development and maintenance work. For example, atomized steps such as deploying a cluster, obtaining a kubeconfig, and performing end-to-end testing can be shared among multiple tools, greatly reducing the development and maintenance workload and improving development efficiency.
[0019] 2. Unified management and sharing mechanism All tool files are stored in a unified code library, facilitating team members to share and reuse. This unified management mechanism solves the problem of tool dispersion and difficulty in maintenance in the prior art, improving team collaboration efficiency and tool maintainability.
[0020] 3. Complete ecosystem From tool development (atomized steps), combination (Workflow configuration), execution (containerized running), to result monitoring (execution record), a complete ecosystem is provided, covering the entire life cycle of tool management, allowing users to complete all related operations on one platform without switching between multiple tools or platforms, improving work efficiency and user experience.
[0021] 4. Reduced maintenance cost By using containerization technology, the running environment of the tool is decoupled from the host machine, avoiding tool running problems caused by environment differences. At the same time, changes to public parameters can be implemented through unified configuration management, eliminating the need to modify pipeline configurations one by one, greatly reducing maintenance costs. In addition, the reuse mechanism of atomized steps also reduces the workload of repeated development, further reducing the overall maintenance cost of the system.
[0022] 5. Multilingual support and development flexibility Through containerization technology, tools developed in multiple programming languages (such as Shell, Python, Go, Node.js, etc.) are supported to run, and developers can choose the most suitable programming language to write automation tools according to specific needs, without being limited by the limited support of existing CI / CD tools for languages. This multi-language support capability improves development flexibility, meets the diversified needs in different development scenarios, and makes tool development more efficient and convenient. BRIEF DESCRIPTION OF DRAWINGS
[0023] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings needed to be used in the embodiments will be briefly introduced as follows. Obviously, the drawings in the following description are only some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative labor on the basis of these drawings.
[0024] Figure 1 An architecture example diagram of a container-based multi-language tool management and automated execution system according to an embodiment of the present application; Figure 2 An architecture example diagram of a management and execution service end of a container-based multi-language tool management and automated execution system according to an embodiment of the present application; Figure 3 A step flowchart of a container-based multi-language tool management and automated execution method according to an embodiment of the present application; Figure 4 A structure schematic diagram of the device provided by the present application. DETAILED DESCRIPTION
[0025] The embodiments of the present application will be described in detail below with reference to the drawings.
[0026] It should be noted that the following embodiments and features in the embodiments can be combined with each other without conflict; and based on the embodiments in the present disclosure, all other embodiments obtained by those skilled in the art without creative labor are within the scope of protection of the present disclosure.
[0027] It is important to note that the various aspects described herein are exemplary in nature and are not intended to limit the scope and / or practice of the application in any way. The aspects described herein will be presented in the general context of acts to be taken by one or more computing devices. Those skilled in the art will appreciate that the acts uniquely described herein can be performed by a combination of hardware and software components. The
[0028] Figure 1 An example diagram of an architecture of a container-based multi-language tool management and automation execution system according to an embodiment of the present application is shown in FIG. 1. As shown in FIG. 1, the system can include a management and execution server 101, a communication network 102, and / or one or more management and execution clients 103. Figure 1 As shown in FIG. 1, the system can include a management and execution server 101, a communication network 102, and / or one or more management and execution clients 103. Figure 1 As shown in FIG. 1, the system can include a management and execution server 101, a communication network 102, and / or one or more management and execution clients 103.
[0029] The management and execution server 101 can be any suitable server for storing information, data, programs, and / or any other suitable type of content. In some embodiments, the management and execution server 101 can perform suitable functions. For example, in some embodiments, the management and execution server 101 can be used for multi-language tool management and automation execution based on containerization. As an optional example, in some embodiments, the management and execution server 101 can be used to define a tool execution scenario, decompose the defined tool execution scenario into a plurality of atomized steps, create a code library, store files corresponding to the atomized steps via the created code library, parse the corresponding atomized steps according to user input and the files in the code library, start a container, and execute a tool.
[0030] Figure 2 An example diagram of an architecture of a management and execution server of a container-based multi-language tool management and automation execution system according to an embodiment of the present application is shown in FIG. 2. As shown in FIG. 2, in this embodiment, the management and execution server includes: Figure 2 As shown in FIG. 2, in this embodiment, the management and execution server includes: a tool execution scenario decomposition module configured to define a tool execution scenario and decompose the defined tool execution scenario into a plurality of atomized steps; a tool code library construction module configured to create a code library and store files corresponding to the atomized steps via the created code library; a tool execution module configured to parse the corresponding atomized steps according to user input and the files in the code library, start a container, and execute a tool. As shown in FIG. 2, in this embodiment, the management and execution server includes:
[0031] As another example, in some embodiments, the management and execution service 101 can send, to the management and execution client 103 for user use, a containerization-based multi-lingual tool management and automated execution method in response to a request of the management and execution client 103.
[0032] As an optional example, in some embodiments, the management and execution client 103 is configured to provide a visual user interface for receiving a user selection input operation for containerization-based multi-lingual tool management and automated execution, and for, in response to the selection input operation, obtaining and presenting a user interface corresponding to the option selected by the selection input operation from the management and execution service 101, the user interface presenting at least information for containerization-based multi-lingual tool management and automated execution and operation options for the information for containerization-based multi-lingual tool management and automated execution.
[0033] In some embodiments, the communication network 102 can be any suitable combination of one or more wired and / or wireless networks. For example, the communication network 102 can include any one or more of the following: the Internet, an intranet, a wide-area network (WAN), a local-area network (LAN), a wireless network, a digital subscriber line (DSL) network, a frame relay network, an asynchronous transfer mode (ATM) network, a virtual private network (VPN), and / or any other suitable communication network. The management and execution client 103 can connect to the communication network 102 through one or more communication links (e.g., communication link 104), which can link to the management and execution service 101 via one or more communication links (e.g., communication link 105). The communication links can be any communication links suitable for communicating data among the management and execution client 103 and the management and execution service 101, such as network links, dial-up links, wireless links, hard-wired links, any other suitable communication links, or any suitable combination of such links.
[0034] The management and execution client 103 can include any one or more clients that present interfaces related to containerization-based multi-lingual tool management and automated execution in a suitable form for user use and operation. In some embodiments, the management and execution client 103 can include any suitable type of device. For example, in some embodiments, the management and execution client 103 can include a mobile device, a tablet computer, a laptop computer, a desktop computer, and / or any other suitable type of client device.
[0035] Although the management and execution server 101 is illustrated as a single device, in some embodiments, any suitable number of devices may be used to perform the functions performed by the management and execution server 101. For example, in some embodiments, multiple devices may be used to implement the functions performed by the management and execution server 101. Alternatively, the functions of the management and execution server 101 may be implemented using a cloud service.
[0036] Based on the above system, an embodiment of the present invention provides a container-based multi-language tool management and automated execution method, which is described below through the following embodiments.
[0037] Figure 3 This is a flowchart of the steps of a container-based multi-language tool management and automated execution method according to an embodiment of the present invention. The container-based multi-language tool management and automated execution method of this embodiment can be executed on the management and execution server. The container-based multi-language tool management and automated execution method includes the following steps: Step S1: Define the tool execution scenario and decompose the defined tool execution scenario into multiple atomic steps.
[0038] As an optional example, in this embodiment, the defined tool execution scenarios include: Deploy the cluster; Deploy a cluster and perform end-to-end testing of the version on the cluster; Deploy a cluster and perform end-to-end testing of the frontend on that cluster; Deploy a cluster and perform version end-to-end and front-end end-to-end testing on the cluster; Perform end-to-end testing of the version on the deployed cluster; Perform front-end end-to-end testing on the deployed cluster; Perform version end-to-end and front-end end-to-end testing on the deployed cluster.
[0039] As an optional example, in this embodiment, the defined tool execution scenario is decomposed into the following atomic steps: Deploy the cluster; Get the kubeconfig of the cluster; Perform end-to-end testing of the release; Perform front-end end-to-end testing.
[0040] Step S2: Create a code library, and use the created code library to store the files corresponding to the atomic steps.
[0041] In this embodiment, the directory structure of the code library includes multiple subdirectories, each corresponding to an atomization step, and the subdirectory contains the script file and metadata file of the atomization step. The following is an example of the directory structure of the code library created in this embodiment: cluster ├── e2e │ ├── cluster-e2e-ref.yaml │ └── cluster-e2e.sh ├── get-kubeconfig │ ├── cluster-get-kubeconfig.sh │ └── cluster-get-kubeconfig-ref.yaml ├── install │ ├── cluster-install-ref.yaml │ └── cluster-install.sh ├── uie2e │ ├── cluster-uie2e-ref.yaml │ └── cluster-uie2e.sh ├── cluster-install-workflow.yaml ├── cluster-install-e2e-workflow.yaml ├── cluster-install-uie2e-workflow.yaml ├── cluster-install-e2e-uie2e-workflow.yaml ├── cluster-e2e-workflow.yaml ├── cluster-uie2e-workflow.yaml └── cluster-e2e-uie2e-workflow.yaml The script file includes a script for executing a step, and the metadata file is used to define metadata for executing the step. The parameters of the metadata file include: the name of the step, the image name for starting the container, the image version label, the name of the script executed in the container, the CPU resource request of the container, and the memory resource request of the container.
[0042] For example, in the above example, each atomization step includes: .sh file: Shell script containing specific execution steps.
[0043] -ref.yaml file: Defines metadata for the step.
[0044] Take cluster-install as an example: cluster-install.sh: Specific steps to deploy a cluster.
[0045] cluster-install-ref.yaml: ref: as: cluster-install from_image: name: "" tag: latest commands: cluster-install.sh resources: requests: cpu: 10m memory: 100Mi The parameters are explained as follows: as: Name of the step.
[0046] from_image.name: Image name used to start the pod.
[0047] from_image.tag: Image tag.
[0048] commands: Name of the shell script executed in the pod.
[0049] resources. requests.cpu: CPU resource request for the pod.
[0050] resources. requests. memory: Memory resource request for the pod.
[0051] It should be noted that in the present embodiment, the code library further includes a workflow file in yaml format, each workflow file corresponds to a tool, and is used to define the execution process of the tool. The parameters of the workflow file include the name of the tool, the atomic steps required to complete the tool according to the execution order, and the description information of the tool. The atomic steps required to complete the tool according to the execution order can be dynamically increased or decreased according to the function to be completed by the workflow.
[0052] In actual application, each tool corresponds to a-workflow.yaml file, which defines the step combination. For example: cluster-install-e2e-uie2e-workflow.yaml: workflow: as: cluster-install-e2e-uie2e steps: - ref: cluster-install - ref: cluster-get-kubeconfig - ref: cluster-e2e - ref: cluster-uie2e documentation: |- Deploy the cluster and execute version e2e and front-end e2etests on this cluster. Parameter description: as: workflow name.
[0053] steps: define the steps required to complete the workflow according to the execution order.
[0054] documentation: workflow description.
[0055] Among them, the steps can be dynamically increased or decreased according to the function to be completed by the workflow, such as the steps in cluster-install-workflow.yaml only have cluster-install, and the other workflows are sequentially similar.
[0056] Step S3: According to the user input and the file in the code library, the corresponding atomic step is parsed, the container is started, and the tool is executed.
[0057] The tool is created and saved to the database. When the created tool is executed, the Workflow file in the code library is parsed to obtain the execution steps of the tool and the script file and metadata file corresponding to the execution steps. The container is started according to the metadata file and the parameter information input by the user, and the script is executed according to the corresponding script file. When the script is executed, the parameters input by the user are parsed and added to the environment variables of the container. The execution state of the container is listened to and recorded, and the execution record is updated in real time.
[0058] For example, the user creates a tool through the interface and saves it to the database. When the user executes the tool, the system parses the execution steps according to the-workflow.yaml file, finds the corresponding-ref.yaml file and.sh file in steps, and starts the pod and executes the script according to the related information in-ref.yaml file and the parameter information filled in by the user when executing. The parameters filled in when executing are parsed and added to the environment variables of the pod for use when executing the shell in the pod. The system listens to the execution of the pod and updates the execution record.
[0059] In this embodiment, a user interaction interface is also provided, which is used for tool management, configuration of custom parameters corresponding to variables in the execution script, display of execution process parameters and execution record.
[0060] For example, in actual application, the user interaction interface of the present embodiment supports the following functions: Tool management: query, new, edit, delete, execute and view execution record. For example, modify or delete data and save to the database.
[0061] Parameter customization: when creating a tool, the user can input the name, description and parameters. The parameters support the creation of multiple parameters, and support string or enumeration type, and can set initial value, whether to fill in, whether to be a password, etc. At the same time, it needs to correspond to the variable name used in the shell script. For example, the variable version is used in the shell, so a parameter named version needs to be created.
[0062] Dynamic parameter generation: when executing the tool, the system dynamically generates the user input interface according to the parameter information.
[0063] Execution record: record the tool result, time consumption, start time and log information of each execution; provide an execution record page to display the tool execution result, time consumption, start time and log information of each execution.
[0064] The user interaction interface of the embodiment provides highly flexible customization functions. Users can customize the execution environment and parameters of the tool according to actual needs. The user interaction interface supports dynamic generation of parameter input forms, and the parameter types are rich, including strings, enumerations, ciphertexts, etc. Initial values, whether to fill in, whether to encrypt, and other attributes can be set. These customization functions enable the tool to adapt to various complex business scenarios, improving the versatility and adaptability of the system. Users can intuitively operate the tool through the interface without deep understanding of the underlying technical details. The interface supports dynamic parameter generation, automatically generates user input forms according to the parameter configuration of the tool, making the use of the tool more convenient. In addition, the system also provides a detailed execution record page to show the execution results, time consumption, start time and log information of each execution of the tool, facilitating users to monitor and analyze the execution of the tool. Detailed execution records and monitoring functions can help developers quickly locate and solve problems, further improving development efficiency.
[0065] In practical applications, the container-based multilingual tool management and automated execution method and system of the embodiment has the following beneficial technical effects: 1. Atomic step reuse and modular design The complex tool execution task is decomposed into multiple atomic steps, and these steps are dynamically combined through the Workflow file to generate new tools. This modular design allows general steps to be reused in different tools, avoiding repeated development and maintenance work. For example, atomic steps such as deploying a cluster, obtaining kubeconfig, and performing end-to-end testing can be shared among multiple tools, greatly reducing development and maintenance workload and improving development efficiency.
[0066] 2. Unified management and sharing mechanism All tool files are stored in a unified code repository, facilitating team members to share and reuse. This unified management mechanism solves the problem of scattered tools in the prior art, improving team collaboration efficiency and tool maintainability.
[0067] 3. Complete ecosystem From tool development (atomic steps), combination (Workflow configuration), execution (containerized running) to result monitoring (execution records), a complete ecosystem is provided, covering the entire life cycle of tool management, allowing users to complete all related operations on one platform without switching between multiple tools or platforms, improving work efficiency and user experience.
[0068] 4. Reduce maintenance costs By decoupling the running environment of the tool from the host machine through containerization technology, the problem of tool running caused by environment differences is avoided. At the same time, the change of public parameters can be realized through unified configuration management, without the need to modify the pipeline configuration one by one, greatly reducing the maintenance cost. In addition, the reuse mechanism of atomic steps also reduces the workload of repeated development, further reducing the overall maintenance cost of the system.
[0069] 5. Multilingual support and development flexibility Through containerization technology, tools developed in multiple programming languages (such as Shell, Python, Go, Node.js, etc.) can run, and developers can choose the most suitable programming language to write automation tools according to specific needs, without being limited by the limited language support of existing CI / CD tools. This multilingual support capability improves development flexibility, meets the diverse needs of different development scenarios, and makes tool development more efficient and convenient.
[0070] As shown in Figure 4 The present application also provides a device, including a processor 210, a communication interface 220, a memory 230 for storing processor executable computer programs, and a communication bus 240. Wherein the processor 210, the communication interface 220 and the memory 230 complete the communication among each other through the communication bus 240. The processor 210 realizes the above-mentioned container-based multilingual tool management and automated execution method by running the executable computer program.
[0071] Among them, the computer program in the memory 230 can be realized in the form of a software function unit and sold or used as an independent product, which can be stored in a computer readable storage medium. Based on such understanding, the technical solutions of the present application essentially or say the part that contributes to the prior art or part of the technical solutions can be embodied in the form of a software product, which is stored in a storage medium, including a plurality of instructions to make a computer device (which can be a personal computer, server, or network device, etc.) execute all or part of the steps of the embodiments of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), magnetic disk or optical disk, and various program code storage media.
[0072] The system embodiments described above are merely illustrative, wherein the units illustrated as separate components can or can not be physically separated, and the components illustrated as units can or can not be physical units, i.e., can be located in one place, or can be distributed to multiple network units. Part or all of the modules can be selected based on actual needs to achieve the purposes of the embodiments. Those skilled in the art can understand and implement without creative labor.
[0073] Through the description of the above embodiments, those skilled in the art can clearly understand that the embodiments can be implemented by means of software and the necessary universal hardware platform, and of course, can also be implemented by hardware. Based on such understanding, the above technical solutions can be embodied in the form of a software product, which can be stored in a computer readable storage medium, such as a ROM / RAM, a magnetic disk, an optical disk, etc., and includes a plurality of instructions to make a computer device (which can be a personal computer, a server, or a network device, etc.) execute the methods of the embodiments or some parts of the embodiments.
[0074] The above description is merely a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any changes or replacements within the technical scope disclosed by the present application can be easily thought of by those skilled in the art, and should be covered within the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the protection scope of the claims.
Claims
1. A container-based multi-language tool management and automated execution method, characterized in that: The method comprises: Step S1: Define the tool execution scenario and decompose the defined tool execution scenario into multiple atomic steps; Step S2: Create a code library to store the files corresponding to the atomic steps; Step S3: Based on the user input and the files in the code base, the corresponding atomic steps are parsed, the container is started, and the tool is executed.
2. The container-based multi-language tool management and automated execution method according to claim 1, characterized in that: In step S1, the tool execution scenarios defined include: Deploy the cluster; Deploy a cluster and perform end-to-end testing of the version on the cluster; Deploy a cluster and perform end-to-end testing of the frontend on that cluster; Deploy a cluster and perform version end-to-end and front-end end-to-end testing on the cluster; Perform end-to-end testing of the version on the deployed cluster; Perform front-end end-to-end testing on the deployed cluster; Perform version end-to-end and front-end end-to-end testing on the deployed cluster.
3. The container-based multi-language tool management and automated execution method according to claim 1, characterized in that: In step S1, the defined tool execution scenario is decomposed into the following atomic steps: Deploy the cluster; Get the kubeconfig of the cluster; Perform end-to-end testing of the release; Perform front-end end-to-end testing.
4. The container-based multi-language tool management and automated execution method according to claim 1, characterized in that: In step S2, the directory structure of the code library includes multiple subdirectories, each subdirectory corresponds to an atomization step, and the subdirectory contains the script file and metadata file of the atomization step.
5. The container-based multi-language tool management and automated execution method according to claim 4, characterized in that: In step S2, the script file includes the script for executing the step, and the metadata file is used to define the metadata for executing the step. The parameters of the metadata file include: the name of the step, the name of the image used to start the container, the image version label, the name of the script executed in the container, the CPU resource request of the container, and the memory resource request of the container.
6. The container-based multi-language tool management and automated execution method according to claim 1, characterized in that: In step S2, the code library also includes workflow files in YAML format. Each workflow file corresponds to a tool and is used to define the execution process of the tool. The parameters of the workflow file include the name of the tool, the atomic steps required to complete the tool in the order of execution, and the description information of the tool.
7. The container-based multi-language tool management and automated execution method according to claim 6, characterized in that: In step S2, the atomic steps required to complete the tool are defined in the execution order and can be dynamically increased or decreased according to the functions to be completed by the workflow.
8. The container-based multi-language tool management and automated execution method according to claim 1, characterized in that: Step S3 includes: Create a tool and save it to the database. When executing the created tool, parse the Workflow file in the code library to obtain the tool's execution steps and the script files and metadata files corresponding to the execution steps. Start the container based on the metadata file and the parameter information entered by the user, and execute the script according to the corresponding script file. When executing the script, the parameters entered by the user are parsed and added to the environment variables of the container; Monitor and record the execution status of the container and update the execution record in real time.
9. The container-based multi-language tool management and automated execution method according to claim 1, characterized in that: The method further includes providing a user interaction interface for tool management, configuring custom parameters corresponding to variables in the execution script, and displaying execution process parameters and execution records.
10. A container-based multi-language tool management and automated execution system, characterized by: The system includes a management and execution server, which includes: The tool execution scenario decomposition module is used to define the tool execution scenario and decompose the defined tool execution scenario into multiple atomic steps; The tool code library construction module is used to create a code library and store the files corresponding to the atomic steps in the created code library; The tool execution module is used to parse the corresponding atomic steps based on user input and files in the code library, start the container and execute the tool.
Citation Information
Patent Citations
Task processing method and device, electronic equipment and storage medium
CN113391872A