Pipeline deployment method and device, computer device and storage medium

CN113961467BActive Publication Date: 2026-10-27INDUSTRIAL AND COMMERCIAL BANK OF CHINA
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202111277369.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-10-29
Publication Date
2026-10-27
Estimated Expiration
2041-10-29

AI Technical Summary

Technical Problem

[0004]然而,采用传统技术,测试环境单一,无法兼容不同测试环境下的测试

Benefits of technology

[0047]上述流水线部署方法、装置、计算机设备、存储介质和计算机程序产品,通过执行应用部署规则,根据应用级部署流水线、应用标识和测试环境标识构建流水线执行实例,然后,根据流水线执行实例中的应用标识确定初始测试中心接口地址,之后,使用流水线执行实例中的测试环境标识替换初始测试中心接口地址中的测试环境参数,进而在目标测试中心接口地址对应的云计算平台配置信息中,查找与目标测试中心接口地址中的测试环境标识相对应的云计算平台地址,最后,将流水线执行实例在云计算平台地址对应的云计算平台中进行部署。可以理解,本申请通过在应用部署规则中配置测试环境标识,可动态地对测试中心接口地址中的测试环境参数进行替换,由此查找到与该测试环境标识相对应的云计算平台地址,进而在对应云计算平台中部署流水线完成测试。实现了动态选择要测试的测试环境,并在该测试环境下完成测试的目的。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113961467B_ABST
    Figure CN113961467B_ABST
Patent Text Reader

Abstract

The application relates to a pipeline deployment method and device, computer equipment, a storage medium and a computer program product, which can be used for testing in the field of financial technology or other related fields. The method comprises the following steps: in response to an execution instruction of an application deployment rule, a pipeline execution instance is constructed; according to an application identifier in the pipeline execution instance, an initial test center interface address is determined; using a test environment identifier in the pipeline execution instance, a test environment parameter in the initial test center interface address is replaced to obtain a target test center interface address; in the cloud computing platform configuration information corresponding to the target test center interface address, a cloud computing platform address corresponding to the test environment identifier in the target test center interface address is searched; and the pipeline execution instance is deployed in the cloud computing platform corresponding to the cloud computing platform address. The method can dynamically select a test environment and complete the test in the test environment.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of software testing technology, and in particular to a pipeline deployment method, apparatus, computer equipment, storage medium, and computer program product. Background Technology

[0002] With the rapid development of software development technologies and the increasingly faster pace of business requirements updates, the development rhythm issues lead to multiple branches operating in parallel over long periods, and the number of versions is constantly increasing. Deploying business requirements in development, testing, and production environments through pipelines can significantly reduce the time to market.

[0003] In traditional technologies, pipeline deployment methods can only call a fixed cloud computing platform address based on a fixed test center interface address. This cloud computing platform address can only meet one test environment, and then the pipeline is deployed in the cloud computing platform corresponding to that cloud computing platform address to complete the test.

[0004] However, traditional technologies result in a single testing environment that is incompatible with testing in different environments. Summary of the Invention

[0005] Therefore, it is necessary to provide a pipeline deployment method, apparatus, computer equipment, computer-readable storage medium, and computer program product that can be used for testing in financial technology or other related fields to address the aforementioned technical problems.

[0006] Firstly, this application provides a pipeline deployment method. The method includes:

[0007] In response to the execution instructions of the application deployment rules, a pipeline execution instance is constructed based on the application-level deployment pipeline, application identifier, and test environment identifier in the application deployment rules;

[0008] The initial test center interface address is determined based on the application identifier in the pipeline execution instance;

[0009] Use the test environment identifier in the pipeline execution instance to replace the test environment parameter in the initial test center interface address to obtain the target test center interface address;

[0010] In the cloud computing platform configuration information corresponding to the target test center interface address, find the cloud computing platform address that corresponds to the test environment identifier in the target test center interface address;

[0011] The pipeline execution instance is deployed in the cloud computing platform corresponding to the address of the cloud computing platform.

[0012] In one embodiment, the step of responding to the execution instruction of the application deployment rule and constructing a pipeline execution instance based on the application-level deployment pipeline, application identifier, and test environment identifier in the application deployment rule includes:

[0013] In response to the execution instructions of the application deployment rules, a pipeline execution instance is constructed based on the application-level deployment pipeline, the pipeline node to be executed, the application identifier, and the test environment identifier in the application deployment rules, wherein the pipeline node to be executed includes the service environment identifier.

[0014] In one embodiment, determining the initial test center interface address based on the application identifier in the pipeline execution instance includes:

[0015] In a preset table, the initial test center interface address corresponding to the application identifier and service environment identifier in the pipeline execution instance is found. The preset table contains the application identifier, service environment identifier, initial test center interface address, and the correspondence between the application identifier, the service environment identifier, and the initial test center interface address.

[0016] In one embodiment, the step of searching for the cloud computing platform address corresponding to the test environment identifier in the cloud computing platform configuration information corresponding to the target test center interface address includes:

[0017] In the preset table, the service group identifier corresponding to the application identifier and service environment identifier in the pipeline execution instance is searched. The preset table also includes the application identifier, service environment identifier, service group identifier, and the correspondence between the application identifier, the service environment identifier, and the service group identifier.

[0018] In the cloud computing platform configuration information corresponding to the target test center interface address, find the cloud computing platform address that corresponds to the test environment identifier, the service group identifier, and the service environment identifier in the target test center interface address.

[0019] In one embodiment, deploying the pipeline execution instance on the cloud computing platform corresponding to the cloud computing platform address includes:

[0020] The pipeline nodes in the pipeline execution instance are deployed in the cloud computing platform corresponding to the address of the cloud computing platform.

[0021] In one embodiment, the method further includes:

[0022] The test environment parameters are obtained by matching the fields in the initial test center interface address according to the preset regular expression.

[0023] Secondly, this application also provides a production line deployment apparatus. The apparatus includes:

[0024] The instance building module is used to respond to the execution instructions of the application deployment rules and build pipeline execution instances based on the application-level deployment pipeline, application identifier, and test environment identifier in the application deployment rules.

[0025] The address determination module is used to determine the initial test center interface address based on the application identifier in the pipeline execution instance;

[0026] The identifier replacement module is used to replace the test environment parameters in the initial test center interface address with the test environment identifier in the pipeline execution instance to obtain the target test center interface address.

[0027] The address lookup module is used to look up the cloud computing platform address that corresponds to the test environment identifier in the cloud computing platform configuration information corresponding to the target test center interface address.

[0028] The pipeline deployment module is used to deploy the pipeline execution instance in the cloud computing platform corresponding to the cloud computing platform address.

[0029] Thirdly, this application also provides a computer device. The computer device includes a memory and a processor, the memory storing a computer program, and the processor executing the computer program to perform the following steps:

[0030] In response to the execution instructions of the application deployment rules, a pipeline execution instance is constructed based on the application-level deployment pipeline, application identifier, and test environment identifier in the application deployment rules;

[0031] The initial test center interface address is determined based on the application identifier in the pipeline execution instance;

[0032] Use the test environment identifier in the pipeline execution instance to replace the test environment parameter in the initial test center interface address to obtain the target test center interface address;

[0033] In the cloud computing platform configuration information corresponding to the target test center interface address, find the cloud computing platform address that corresponds to the test environment identifier in the target test center interface address;

[0034] The pipeline execution instance is deployed in the cloud computing platform corresponding to the address of the cloud computing platform.

[0035] Fourthly, this application also provides a computer-readable storage medium. The computer-readable storage medium stores a computer program thereon, which, when executed by a processor, performs the following steps:

[0036] In response to the execution instructions of the application deployment rules, a pipeline execution instance is constructed based on the application-level deployment pipeline, application identifier, and test environment identifier in the application deployment rules;

[0037] The initial test center interface address is determined based on the application identifier in the pipeline execution instance;

[0038] Use the test environment identifier in the pipeline execution instance to replace the test environment parameter in the initial test center interface address to obtain the target test center interface address;

[0039] In the cloud computing platform configuration information corresponding to the target test center interface address, find the cloud computing platform address that corresponds to the test environment identifier in the target test center interface address;

[0040] The pipeline execution instance is deployed in the cloud computing platform corresponding to the address of the cloud computing platform.

[0041] Fifthly, this application also provides a computer program product. The computer program product includes a computer program that, when executed by a processor, performs the following steps:

[0042] In response to the execution instructions of the application deployment rules, a pipeline execution instance is constructed based on the application-level deployment pipeline, application identifier, and test environment identifier in the application deployment rules;

[0043] The initial test center interface address is determined based on the application identifier in the pipeline execution instance;

[0044] Use the test environment identifier in the pipeline execution instance to replace the test environment parameter in the initial test center interface address to obtain the target test center interface address;

[0045] In the cloud computing platform configuration information corresponding to the target test center interface address, find the cloud computing platform address that corresponds to the test environment identifier in the target test center interface address;

[0046] The pipeline execution instance is deployed in the cloud computing platform corresponding to the address of the cloud computing platform.

[0047] The aforementioned pipeline deployment method, apparatus, computer equipment, storage medium, and computer program product, by executing application deployment rules, constructs a pipeline execution instance based on the application-level deployment pipeline, application identifier, and test environment identifier. Then, it determines the initial test center interface address based on the application identifier in the pipeline execution instance. Next, it replaces the test environment parameters in the initial test center interface address with the test environment identifier from the pipeline execution instance. Then, it searches the cloud computing platform configuration information corresponding to the test environment identifier in the target test center interface address for the corresponding cloud computing platform address. Finally, it deploys the pipeline execution instance on the cloud computing platform corresponding to the cloud computing platform address. It can be understood that this application, by configuring the test environment identifier in the application deployment rules, can dynamically replace the test environment parameters in the test center interface address, thereby finding the cloud computing platform address corresponding to the test environment identifier, and then deploying the pipeline on the corresponding cloud computing platform to complete the test. This achieves the goal of dynamically selecting the test environment to be tested and completing the test within that test environment. Attached Figure Description

[0048] Figure 1 This is a flowchart illustrating a pipeline deployment method in one embodiment;

[0049] Figure 2 This is a flowchart illustrating the pipeline deployment method in another embodiment;

[0050] Figure 3 This is a structural block diagram of a production line deployment device in one embodiment;

[0051] Figure 4 This is an internal structural diagram of a computer device in one embodiment. Detailed Implementation

[0052] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.

[0053] In one embodiment, such as Figure 1 As shown, a pipeline deployment method is provided. This embodiment illustrates the method by applying it to a server. It is understood that this method can also be applied to terminals, and further to systems including terminals and servers, and is implemented through interaction between the terminal and the server. In this embodiment, the method includes the following steps:

[0054] Step S102: In response to the execution instruction of the application deployment rule, construct a pipeline execution instance based on the application-level deployment pipeline, application identifier, and test environment identifier in the application deployment rule.

[0055] Application deployment rules refer to the rules that govern the execution of an application-level deployment pipeline template. An application-level deployment pipeline is an application deployment process represented in a pipeline format. Based on the execution layer interfaces called by each component in the pipeline, the pipeline is delivered by the development center and customized for use by the testing center.

[0056] Optionally, the application deployment rule includes one or more of an application-level deployment pipeline, an application identifier, or a test environment identifier. In one embodiment, the application deployment rule includes an application-level deployment pipeline, an application identifier, and a test environment identifier. Optionally, the application identifier can be an application name or an application abbreviation. The test environment identifier can be a test environment name or a test environment type.

[0057] Specifically, users can generate execution instructions for application deployment rules by clicking the deployment button. This application deployment rule is used to deploy the application-level deployment pipeline within the application deployment rule. This application deployment rule can be generated based on user requirements. Upon receiving the execution instructions for this application deployment rule, the server parses out the application-level deployment pipeline, application identifier, and test environment identifier from the application deployment rule. Based on these elements, it constructs a pipeline execution instance. The application identifier and test environment identifier are parameters assigned to the pipeline execution instance.

[0058] Step S104: Determine the initial test center interface address based on the application identifier in the pipeline execution instance.

[0059] Specifically, when a pipeline execution instance is running, the server looks up the initial test center interface address corresponding to the application abbreviation in the pipeline execution instance by looking up a table.

[0060] Step S106: Use the test environment identifier in the pipeline execution instance to replace the test environment parameter in the initial test center interface address to obtain the target test center interface address.

[0061] Specifically, the server reads the test environment identifier from the pipeline execution instance. On the other hand, the server uses a preset regular expression to match fields in the initial test center interface address to obtain the test environment parameters. This allows for quick retrieval of the test environment parameters from the initial test center interface address. Optionally, the test environment parameter can be an environment identifier. Then, the server replaces the test environment parameter with the test environment identifier in the initial test center interface address to obtain the target test center interface address.

[0062] For example, the test environment identifier in the pipeline execution instance is the value "ENV_TYPE". The server uses a regular expression (maximum length 64 bits) to match the field "$#{V_VCDS_ENV_TYPE}" in the initial test center interface address, and parses the test environment parameter as "ENV_TYPE". Then, the server replaces "$#{V_VCDS_ENV_TYPE}" in the initial test center interface address with the value "ENV_TYPE".

[0063] Step S108: In the cloud computing platform configuration information corresponding to the target test center interface address, find the cloud computing platform address that corresponds to the test environment identifier in the target test center interface address.

[0064] The cloud computing platform configuration information includes the test environment identifier, the cloud computing platform address, and the correspondence between the test environment identifier and the cloud computing platform address.

[0065] Specifically, the server looks up the corresponding cloud computing platform configuration information based on the target test center interface address. Then, the server searches for the cloud computing platform address corresponding to the test environment identifier within the cloud computing platform configuration information.

[0066] Optionally, the cloud computing platform includes one or more of the following: PaaS (Platform as a Service), IaaS (Infrastructure as a Service), or SaaS (Software-as-a-Service).

[0067] Step S110: Deploy the pipeline execution instance in the cloud computing platform corresponding to the cloud computing platform address.

[0068] Specifically, the server deploys, installs, and runs the pipeline execution instance on the cloud computing platform corresponding to the cloud computing platform address. The purpose of this installation may be to complete the installation of the application corresponding to the application identifier.

[0069] In the above pipeline deployment method, by executing application deployment rules, a pipeline execution instance is constructed based on the application-level deployment pipeline, application identifier, and test environment identifier. Then, the initial test center interface address is determined based on the application identifier in the pipeline execution instance. Next, the test environment parameters in the initial test center interface address are replaced with the test environment identifier from the pipeline execution instance. Then, the cloud computing platform address corresponding to the test environment identifier in the target test center interface address is searched in the cloud computing platform configuration information corresponding to the target test center interface address. Finally, the pipeline execution instance is deployed on the cloud computing platform corresponding to the cloud computing platform address. It can be understood that this method, by configuring the test environment identifier in the application deployment rules, can dynamically replace the test environment parameters in the test center interface address, thereby finding the cloud computing platform address corresponding to the test environment identifier, and then deploying the pipeline on the corresponding cloud computing platform to complete the test. This achieves the goal of dynamically selecting the test environment to be tested and completing the test within that environment.

[0070] like Figure 2 As shown, in one embodiment, a possible implementation of step S102, "in response to the execution instruction of the application deployment rule, constructing a pipeline execution instance based on the application-level deployment pipeline, application identifier, and test environment identifier in the application deployment rule," is described. Based on the above embodiment, step S102 can be specifically implemented through the following steps:

[0071] Step S1022: In response to the execution instruction of the application deployment rule, construct a pipeline execution instance based on the application-level deployment pipeline, the pipeline node to be executed, the application identifier, and the test environment identifier in the application deployment rule.

[0072] The pipeline nodes to be executed include a service environment identifier. Optionally, the service environment identifier can be a service environment name. It is understood that in this embodiment, the application deployment rules also include the pipeline nodes to be executed.

[0073] Specifically, users can generate execution instructions for application deployment rules by clicking the deployment button. Upon receiving these instructions, the server parses out the application-level deployment pipeline, the pipeline nodes to be executed, the application identifier, and the test environment identifier from the application deployment rule. Based on these elements, the server constructs a pipeline execution instance. The application identifier and test environment identifier are parameters assigned to the pipeline execution instance.

[0074] In this embodiment, a pipeline execution instance is constructed based on a pipeline node configured with service environment information. Thus, different service environment information can be set in the pipeline execution instance, which increases the applicability of the pipeline execution instance and helps to improve the applicability of pipeline deployment.

[0075] In one embodiment, one possible implementation of step S104, "using the test environment identifier in the pipeline execution instance to replace the test environment parameters in the initial test center interface address to obtain the target test center interface address," is as follows: Based on the above embodiment, step S104 can be specifically implemented through the following steps:

[0076] Step S1042: In the preset table, find the initial test center interface address corresponding to the application identifier and service environment identifier in the pipeline execution instance.

[0077] Specifically, the preset table contains the application identifier, service environment identifier, initial test center interface address, and the correspondence between the application identifier, service environment identifier, and initial test center interface address. Therefore, the server can find the initial test center interface address corresponding to the application identifier and service environment identifier in the pipeline execution instance from the preset table.

[0078] In this embodiment, the initial test center interface address is determined by looking up a table, which is highly efficient.

[0079] In one embodiment, one possible implementation of step S108, "searching for the cloud computing platform address corresponding to the test environment identifier in the cloud computing platform configuration information corresponding to the target test center interface address," is as follows: Based on the above embodiment, step S108 can be specifically implemented through the following steps:

[0080] Step S1082: In the preset table, find the service group identifier that corresponds to the application identifier and service environment identifier in the pipeline execution instance;

[0081] Step S1084: In the cloud computing platform configuration information corresponding to the target test center interface address, find the cloud computing platform address that corresponds to the test environment identifier, service group identifier, and service environment identifier in the target test center interface address.

[0082] Specifically, the preset table contains the application identifier, service environment identifier, service group identifier, initial test center interface address, and the correspondence between these identifiers. Therefore, the server can find the service group identifier corresponding to the application identifier and service environment identifier in the pipeline execution instance from the preset table.

[0083] Then, the cloud computing platform configuration information includes the test environment identifier, service group identifier, service environment identifier, cloud computing platform address, and the mapping relationship between the test environment identifier, service group identifier, service environment identifier, and cloud computing platform address. Therefore, the server can find the cloud computing platform address corresponding to the test environment identifier, service group identifier, and service environment identifier.

[0084] In this embodiment, determining the cloud computing platform address through multiple query information helps improve the accuracy of the cloud computing platform address, thereby improving the accuracy of pipeline deployment.

[0085] In one embodiment, the configuration information of the cloud computing platform for a specified test environment can be set or imported through the PaaS URL configuration module.

[0086] In one embodiment, one possible implementation of step S110, "deploying the pipeline execution instance on the cloud computing platform corresponding to the cloud computing platform address," is as follows: Based on the above embodiment, step S110 can be specifically implemented through the following steps:

[0087] Step S1102: Deploy the pipeline nodes in the pipeline execution instance on the cloud computing platform corresponding to the cloud computing platform address.

[0088] Specifically, in the service environment corresponding to the service environment identifier, the pipeline nodes in the pipeline execution instance are deployed, installed, and run in the cloud computing platform corresponding to the cloud computing platform address.

[0089] In this embodiment, the deployment and installation of pipelines under different service environments were realized.

[0090] The following describes an embodiment of this application using a specific application scenario. The method includes the following steps:

[0091] Step S202, taking the application abbreviation F-APFS as an example, install it in a test environment with four test environment types in the test center. The user creates application deployment rules based on the application abbreviation and test environment type, as shown in Table 1:

[0092]

[0093] Table 1

[0094] Step S204: Configure the cloud computing platform configuration information for the specified test environment. See Table 2 for details.

[0095]

[0096]

[0097] Table 2

[0098] In step S206, after the user executes the application deployment rules, the application deployment rules create pipeline execution instances based on the application-level deployment pipeline and assign the value "four sets" to the pipeline execution instance ENV_TYPE.

[0099] Step S208: When the pipeline execution instance runs, based on the application abbreviation: F-APFS, the Chinese name of the service group is: Agent Personal Financial Products Sales Service Group, the English name of the service environment is: APFS-FORM-JD, and the function name is: PAAS_URL, obtain the initial test center interface address: http: / / ...... / brdcEnv / getPaasUrlByEnvName?envName=$#{V_VCDS_ENV_TYPE}.

[0100] Step S210: Query the variable $#{V_VCDS_ENV_TYPE} in the initial test center interface address using a regular expression, obtain the latter half of the V_VCDS_ variable, ENV_TYPE, match the ENV_TYPE value of the pipeline execution instance, replace the variable with "four sets", and change the initial test center interface address to / brdcEnv / getPaasUrlByEnvName?envName=$#{V_VCDS_ENV_TYPE}.

[0101] Step S212: Request the interface address of the initial test center, obtain the cloud computing platform addresses of the four environments of the test center, and return the cloud computing platform addresses to the pipeline execution instance;

[0102] In step S214, after the pipeline node in the service environment of the pipeline execution instance installs all applications according to the returned cloud computing platform address, it starts installing the next service environment APFS-GRAY-WGQ and repeats steps S208-S214.

[0103] In this embodiment, addressing the issue of multiple version parallel image file releases being unable to be deployed on multiple test environment servers, the proposed design based on dynamic parameter configuration on the pipeline to obtain information from multiple environments is highly flexible, avoiding the inability to deploy test environments for multiple versions in parallel testing. Simultaneously, this method significantly improves the testability of the server environment. Facing increasingly larger version volumes, this method enables the deployment of multiple test environments. Users can dynamically obtain deployment pipelines carrying environment information after defining custom rules, and the entire deployment process is then fully automated by the system without manual intervention. Furthermore, this application represents a general method and approach for version testing, which can be widely promoted and used to improve the efficiency and quality of environment testing and enhance the automation level of version installation.

[0104] It should be understood that although the steps in the flowcharts of the embodiments described above are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the embodiments described above may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages of other steps.

[0105] Based on the same inventive concept, this application also provides a pipeline deployment apparatus for implementing the pipeline deployment method described above. The solution provided by this apparatus is similar to the implementation described in the above method; therefore, the specific limitations in one or more pipeline deployment apparatus embodiments provided below can be found in the limitations of the pipeline deployment method described above, and will not be repeated here.

[0106] In one embodiment, such as Figure 3 As shown, a production line deployment device is provided, comprising:

[0107] The instance building module 302 is used to respond to the execution instructions of the application deployment rules and build pipeline execution instances based on the application-level deployment pipeline, application identifier, and test environment identifier in the application deployment rules.

[0108] Address determination module 304 is used to determine the initial test center interface address based on the application identifier in the pipeline execution instance;

[0109] The identifier replacement module 306 is used to replace the test environment parameter in the initial test center interface address with the test environment identifier in the pipeline execution instance to obtain the target test center interface address.

[0110] Address lookup module 308 is used to look up the cloud computing platform address corresponding to the test environment identifier in the target test center interface address in the cloud computing platform configuration information corresponding to the target test center interface address.

[0111] The pipeline deployment module 310 is used to deploy pipeline execution instances on the cloud computing platform corresponding to the cloud computing platform address.

[0112] In the aforementioned pipeline deployment device, by executing application deployment rules, a pipeline execution instance is constructed based on the application-level deployment pipeline, application identifier, and test environment identifier. Then, the initial test center interface address is determined based on the application identifier in the pipeline execution instance. Next, the test environment parameters in the initial test center interface address are replaced with the test environment identifier from the pipeline execution instance. Then, the cloud computing platform address corresponding to the test environment identifier in the target test center interface address is searched in the cloud computing platform configuration information corresponding to the target test center interface address. Finally, the pipeline execution instance is deployed on the cloud computing platform corresponding to the cloud computing platform address. It can be understood that this device, by configuring the test environment identifier in the application deployment rules, can dynamically replace the test environment parameters in the test center interface address, thereby finding the cloud computing platform address corresponding to the test environment identifier, and then deploying the pipeline on the corresponding cloud computing platform to complete the test. This achieves the goal of dynamically selecting the test environment to be tested and completing the test within that test environment.

[0113] In one embodiment, the instance construction module 302 is specifically used to respond to the execution instructions of the application deployment rules and construct a pipeline execution instance based on the application-level deployment pipeline, the pipeline node to be executed, the application identifier, and the test environment identifier in the application deployment rules, wherein the pipeline node to be executed includes the service environment identifier.

[0114] In one embodiment, the address determination module 304 is specifically used to look up the initial test center interface address in a preset table that corresponds to the application identifier and service environment identifier in the pipeline execution instance.

[0115] In one embodiment, the address lookup module 308 is specifically used to look up the service group identifier corresponding to the application identifier and service environment identifier in the pipeline execution instance in a preset table; and to look up the cloud computing platform address corresponding to the test environment identifier, service group identifier and service environment identifier in the cloud computing platform configuration information corresponding to the target test center interface address.

[0116] In one embodiment, the pipeline deployment module 310 is specifically used to deploy the pipeline nodes in the pipeline execution instance in the cloud computing platform corresponding to the cloud computing platform address.

[0117] In one embodiment, the device further includes a field matching module, used to match fields in the initial test center interface address according to a preset regular expression to obtain test environment parameters.

[0118] Each module in the aforementioned production line deployment device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in a computer device, or stored in the memory of a computer device as software, so that the processor can call and execute the operations corresponding to each module.

[0119] In one embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be as follows: Figure 4 As shown, the computer device includes a processor, memory, and a network interface connected via a system bus. The processor provides computing and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system, computer programs, and databases. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The network interface is used to communicate with external terminals via a network connection. When the computer program is executed by the processor, it implements a pipelined deployment method.

[0120] Those skilled in the art will understand that Figure 4 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.

[0121] In one embodiment, a computer device is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to perform the following steps:

[0122] In response to the execution instructions of the application deployment rules, a pipeline execution instance is constructed based on the application-level deployment pipeline, application identifier, and test environment identifier in the application deployment rules;

[0123] The initial test center interface address is determined based on the application identifier in the pipeline execution instance;

[0124] Use the test environment identifier in the pipeline execution instance to replace the test environment parameter in the initial test center interface address to obtain the target test center interface address;

[0125] In the cloud computing platform configuration information corresponding to the target test center interface address, find the cloud computing platform address that corresponds to the test environment identifier in the target test center interface address;

[0126] Deploy the pipeline execution instance in the cloud computing platform corresponding to the cloud computing platform address.

[0127] In the aforementioned computer equipment, by executing application deployment rules, a pipeline execution instance is constructed based on the application-level deployment pipeline, application identifier, and test environment identifier. Then, the initial test center interface address is determined based on the application identifier in the pipeline execution instance. Next, the test environment parameters in the initial test center interface address are replaced with the test environment identifier from the pipeline execution instance. Then, the cloud computing platform address corresponding to the test environment identifier in the target test center interface address is searched in the cloud computing platform configuration information corresponding to the target test center interface address. Finally, the pipeline execution instance is deployed on the cloud computing platform corresponding to the cloud computing platform address. It can be understood that this computer equipment, by configuring the test environment identifier in the application deployment rules, can dynamically replace the test environment parameters in the test center interface address, thereby finding the cloud computing platform address corresponding to the test environment identifier, and then deploying the pipeline on the corresponding cloud computing platform to complete the test. This achieves the goal of dynamically selecting the test environment to be tested and completing the test within that test environment.

[0128] In one embodiment, the processor, when executing a computer program, also performs the following steps:

[0129] In response to the execution instructions of the application deployment rules, a pipeline execution instance is constructed based on the application-level deployment pipeline, the pipeline nodes to be executed, the application identifier, and the test environment identifier in the application deployment rules. The pipeline nodes to be executed include the service environment identifier.

[0130] In one embodiment, the processor, when executing a computer program, also performs the following steps:

[0131] In the preset table, find the initial test center interface address that corresponds to the application identifier and service environment identifier in the pipeline execution instance.

[0132] In one embodiment, the processor, when executing a computer program, also performs the following steps:

[0133] In the preset table, find the service group identifier that corresponds to the application identifier and service environment identifier in the pipeline execution instance; in the cloud computing platform configuration information corresponding to the target test center interface address, find the cloud computing platform address that corresponds to the test environment identifier, service group identifier and service environment identifier in the target test center interface address.

[0134] In one embodiment, the processor, when executing a computer program, also performs the following steps:

[0135] Deploy the pipeline nodes in the pipeline execution instance on the cloud computing platform corresponding to the cloud computing platform address.

[0136] In one embodiment, the processor, when executing a computer program, also performs the following steps:

[0137] Based on the preset regular expression, the fields in the initial test center interface address are matched to obtain the test environment parameters.

[0138] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon, the computer program performing the following steps when executed by a processor:

[0139] In response to the execution instructions of the application deployment rules, a pipeline execution instance is constructed based on the application-level deployment pipeline, application identifier, and test environment identifier in the application deployment rules;

[0140] The initial test center interface address is determined based on the application identifier in the pipeline execution instance;

[0141] Use the test environment identifier in the pipeline execution instance to replace the test environment parameter in the initial test center interface address to obtain the target test center interface address;

[0142] In the cloud computing platform configuration information corresponding to the target test center interface address, find the cloud computing platform address that corresponds to the test environment identifier in the target test center interface address;

[0143] Deploy the pipeline execution instance in the cloud computing platform corresponding to the cloud computing platform address.

[0144] In the aforementioned computer-readable storage medium, by executing application deployment rules, a pipeline execution instance is constructed based on the application-level deployment pipeline, application identifier, and test environment identifier. Then, the initial test center interface address is determined based on the application identifier in the pipeline execution instance. Next, the test environment parameters in the initial test center interface address are replaced with the test environment identifier from the pipeline execution instance. Then, the cloud computing platform address corresponding to the test environment identifier in the target test center interface address is searched in the cloud computing platform configuration information corresponding to the target test center interface address. Finally, the pipeline execution instance is deployed on the cloud computing platform corresponding to the cloud computing platform address. It can be understood that this computer-readable storage medium, by configuring the test environment identifier in the application deployment rules, can dynamically replace the test environment parameters in the test center interface address, thereby finding the cloud computing platform address corresponding to the test environment identifier, and then deploying the pipeline on the corresponding cloud computing platform to complete the test. This achieves the goal of dynamically selecting the test environment to be tested and completing the test within that test environment.

[0145] In one embodiment, when the computer program is executed by a processor, it also performs the following steps:

[0146] In response to the execution instructions of the application deployment rules, a pipeline execution instance is constructed based on the application-level deployment pipeline, the pipeline nodes to be executed, the application identifier, and the test environment identifier in the application deployment rules. The pipeline nodes to be executed include the service environment identifier.

[0147] In one embodiment, when the computer program is executed by a processor, it also performs the following steps:

[0148] In the preset table, find the initial test center interface address that corresponds to the application identifier and service environment identifier in the pipeline execution instance.

[0149] In one embodiment, when the computer program is executed by a processor, it also performs the following steps:

[0150] In the preset table, find the service group identifier that corresponds to the application identifier and service environment identifier in the pipeline execution instance; in the cloud computing platform configuration information corresponding to the target test center interface address, find the cloud computing platform address that corresponds to the test environment identifier, service group identifier and service environment identifier in the target test center interface address.

[0151] In one embodiment, when the computer program is executed by a processor, it also performs the following steps:

[0152] Deploy the pipeline nodes in the pipeline execution instance on the cloud computing platform corresponding to the cloud computing platform address.

[0153] In one embodiment, when the computer program is executed by a processor, it also performs the following steps:

[0154] Based on the preset regular expression, the fields in the initial test center interface address are matched to obtain the test environment parameters.

[0155] In one embodiment, a computer program product is provided, including a computer program that, when executed by a processor, performs the following steps:

[0156] In response to the execution instructions of the application deployment rules, a pipeline execution instance is constructed based on the application-level deployment pipeline, application identifier, and test environment identifier in the application deployment rules;

[0157] The initial test center interface address is determined based on the application identifier in the pipeline execution instance;

[0158] Use the test environment identifier in the pipeline execution instance to replace the test environment parameter in the initial test center interface address to obtain the target test center interface address;

[0159] In the cloud computing platform configuration information corresponding to the target test center interface address, find the cloud computing platform address that corresponds to the test environment identifier in the target test center interface address;

[0160] Deploy the pipeline execution instance in the cloud computing platform corresponding to the cloud computing platform address.

[0161] In the aforementioned computer program product, by executing application deployment rules, a pipeline execution instance is constructed based on the application-level deployment pipeline, application identifier, and test environment identifier. Then, the initial test center interface address is determined based on the application identifier in the pipeline execution instance. Next, the test environment parameters in the initial test center interface address are replaced with the test environment identifier from the pipeline execution instance. Then, the cloud computing platform address corresponding to the test environment identifier in the target test center interface address is searched in the cloud computing platform configuration information corresponding to the target test center interface address. Finally, the pipeline execution instance is deployed on the cloud computing platform corresponding to the cloud computing platform address. It can be understood that this computer program product, by configuring the test environment identifier in the application deployment rules, can dynamically replace the test environment parameters in the test center interface address, thereby finding the cloud computing platform address corresponding to the test environment identifier, and then deploying the pipeline on the corresponding cloud computing platform to complete the test. This achieves the goal of dynamically selecting the test environment to be tested and completing the test within that test environment.

[0162] In one embodiment, when the computer program is executed by a processor, it also performs the following steps:

[0163] In response to the execution instructions of the application deployment rules, a pipeline execution instance is constructed based on the application-level deployment pipeline, the pipeline nodes to be executed, the application identifier, and the test environment identifier in the application deployment rules. The pipeline nodes to be executed include the service environment identifier.

[0164] In one embodiment, when the computer program is executed by a processor, it also performs the following steps:

[0165] In the preset table, find the initial test center interface address that corresponds to the application identifier and service environment identifier in the pipeline execution instance.

[0166] In one embodiment, when the computer program is executed by a processor, it also performs the following steps:

[0167] In the preset table, find the service group identifier that corresponds to the application identifier and service environment identifier in the pipeline execution instance; in the cloud computing platform configuration information corresponding to the target test center interface address, find the cloud computing platform address that corresponds to the test environment identifier, service group identifier and service environment identifier in the target test center interface address.

[0168] In one embodiment, when the computer program is executed by a processor, it also performs the following steps:

[0169] Deploy the pipeline nodes in the pipeline execution instance on the cloud computing platform corresponding to the cloud computing platform address.

[0170] In one embodiment, when the computer program is executed by a processor, it also performs the following steps:

[0171] Based on the preset regular expression, the fields in the initial test center interface address are matched to obtain the test environment parameters.

[0172] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties.

[0173] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM). The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, etc., and are not limited to these.

[0174] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0175] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of this patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.

Claims

1. A method for deploying an assembly line, characterized in that, The method includes: In response to the execution command of the application deployment rule, a pipeline execution instance is constructed based on the application-level deployment pipeline, the pipeline node to be executed, the application identifier, and the test environment identifier in the application deployment rule. The pipeline node to be executed includes a service environment identifier; the application identifier and the test environment identifier are parameters assigned to the pipeline execution instance; the application deployment rule is generated based on user requirements. In a preset table, find the initial test center interface address corresponding to the application identifier and service environment identifier in the pipeline execution instance; wherein, the preset table contains the application identifier, service environment identifier, initial test center interface address, and the correspondence between the application identifier, the service environment identifier, and the initial test center interface address; Use the test environment identifier in the pipeline execution instance to replace the test environment parameter in the initial test center interface address to obtain the target test center interface address; In the preset table, the service group identifier corresponding to the application identifier and service environment identifier in the pipeline execution instance is searched; wherein, the preset table also includes the application identifier, service environment identifier, service group identifier, and the correspondence between the application identifier, the service environment identifier, and the service group identifier; In the cloud computing platform configuration information corresponding to the target test center interface address, find the cloud computing platform address that corresponds to the test environment identifier, the service group identifier, and the service environment identifier in the target test center interface address; The pipeline execution instance is deployed in the cloud computing platform corresponding to the address of the cloud computing platform.

2. The method according to claim 1, characterized in that, The step of deploying the pipeline execution instance in the cloud computing platform corresponding to the cloud computing platform address includes: The pipeline nodes in the pipeline execution instance are deployed in the cloud computing platform corresponding to the address of the cloud computing platform.

3. The method according to claim 1, characterized in that, The method further includes: The test environment parameters are obtained by matching the fields in the initial test center interface address according to the preset regular expression.

4. A production line deployment device, characterized in that, The device includes: The instance construction module is used to respond to the execution instructions of the application deployment rules and construct a pipeline execution instance based on the application-level deployment pipeline, application identifier, and test environment identifier in the application deployment rules; wherein, the application identifier and the test environment identifier are parameters assigned to the pipeline execution instance; the application deployment rules are generated based on user requirements; The address determination module is used to determine the initial test center interface address based on the application identifier in the pipeline execution instance; The identifier replacement module is used to replace the test environment parameters in the initial test center interface address with the test environment identifier in the pipeline execution instance to obtain the target test center interface address. The address lookup module is used to look up the cloud computing platform address that corresponds to the test environment identifier in the cloud computing platform configuration information corresponding to the target test center interface address. The pipeline deployment module is used to deploy the pipeline execution instance in the cloud computing platform corresponding to the cloud computing platform address. Specifically, the instance construction module is used to respond to the execution instructions of the application deployment rules and construct pipeline execution instances based on the application-level deployment pipeline, the pipeline nodes to be executed, the application identifier, and the test environment identifier in the application deployment rules. The pipeline nodes to be executed include the service environment identifier. The address determination module is specifically used to find the initial test center interface address corresponding to the application identifier and service environment identifier in the pipeline execution instance in a preset table; the preset table contains the application identifier, service environment identifier, initial test center interface address, and the correspondence between the application identifier, the service environment identifier and the initial test center interface address; The address lookup module is specifically used to look up the service group identifier corresponding to the application identifier and service environment identifier in the pipeline execution instance in a preset table; and to look up the cloud computing platform address corresponding to the test environment identifier, service group identifier and service environment identifier in the cloud computing platform configuration information corresponding to the target test center interface address. The preset table also includes the application identifier, service environment identifier, service group identifier and the correspondence between the application identifier, the service environment identifier and the service group identifier.

5. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 3.

6. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 3.

7. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 3.

Citation Information

Patent Citations

  • Multi-environment consistency deployment method and device

    CN113176943A

  • Test environment switching method and device, electronic equipment and storage medium

    CN113377678A