CN-122001934-A - Service release method, device, equipment and product
Abstract
The application discloses a service issuing method, a device, equipment and a product, which relate to the technical field of data processing, and the method comprises the steps of receiving a multi-service multi-environment issuing instruction; splitting the multi-service multi-environment issuing instruction through a pre-built multi-service multi-environment pipeline to obtain single-service multi-environment building parameters, and performing service issuing through the pre-built single-service multi-environment pipeline according to the single-service multi-environment building parameters to obtain a service issuing result. Therefore, the problem that the existing architecture multi-environment release needs to construct a production line for many times, is time-consuming and cannot meet the requirements of multi-environment efficient synchronous release is solved, and the service release efficiency is improved.
Inventors
- LIAO XIAOHAO
- YI GUOQIANG
- LI YAN
- FANG SHUIBO
- CHEN ZHILIE
Assignees
- 杭州研祥电子科技有限公司
Dates
- Publication Date
- 20260508
- Application Date
- 20260130
Claims (10)
- 1. A service distribution method, characterized in that the service distribution method comprises: Receiving a multi-service multi-environment issue instruction; Splitting the multi-service multi-environment issuing instruction through a pre-built multi-service multi-environment pipeline to obtain single-service multi-environment building parameters; and according to the single-service multi-environment construction parameters, service release is carried out through a pre-constructed single-service multi-environment pipeline, and a service release result is obtained.
- 2. The service delivery method according to claim 1, wherein before the step of splitting the multi-service multi-environment delivery instruction through the pre-built multi-service multi-environment pipeline to obtain the single-service multi-environment construction parameter, the method further comprises: constructing and obtaining a pipeline basic structure through an automatic construction engine; performing verification configuration and check logic configuration based on the pipeline infrastructure to obtain authority verification logic and core check logic; according to the authority verification logic and the core verification logic, parameter rule configuration is carried out in the pipeline basic structure, and a parameter splitting rule and a parameter combination rule are obtained; And integrating the authority verification logic, the core verification logic, the parameter splitting rule and the parameter combination rule into the pipeline infrastructure to obtain the multi-service multi-environment pipeline.
- 3. The service issuing method according to claim 2, wherein the step of splitting the multi-service multi-environment issuing instruction through a pre-built multi-service multi-environment pipeline to obtain the single-service multi-environment building parameter comprises: analyzing the multi-service multi-environment issuing instruction to obtain multi-environment cluster parameters and multi-service parameters; Performing format verification on the multi-environment cluster parameters and the multi-service parameters through the core verification logic to obtain a verification result; Verifying the issuing authority corresponding to the multi-service multi-environment issuing instruction through the authority verification logic to obtain a verification result; Splitting the multi-environment cluster parameters according to the parameter splitting rule to obtain an environment and cluster mapping relation when the verification result and the verification result are passed; splitting the multi-service parameters according to the parameter splitting rule to obtain a service list to be distributed; And combining the service list to be distributed and the environment and cluster mapping relation through the parameter combination rule to obtain the single-service multi-environment construction parameter.
- 4. The service distribution method according to claim 2, wherein before the step of performing service distribution through a pre-built single-service multi-environment pipeline according to the single-service multi-environment construction parameter to obtain a service distribution result, the method further comprises: constructing a single-service pipeline basic structure through the automatic construction engine; Performing logic configuration based on the single-service pipeline infrastructure to obtain configuration code pulling logic, mirror image construction logic, configuration file rendering logic and version synchronization logic; configuring according to the parameter splitting rule and the parameter combination rule to obtain task adaptation logic; and integrating the configuration code pulling logic, the mirror image construction logic, the configuration file rendering logic, the version synchronization logic and the task adaptation logic into the single-service pipeline infrastructure to obtain the single-service multi-environment pipeline.
- 5. The service distribution method according to claim 4, wherein the step of performing service distribution through a pre-built single service multi-environment pipeline according to the single service multi-environment construction parameter, and obtaining a service distribution result comprises: Performing authority verification on a parameter format corresponding to the single-service multi-environment construction parameter and the issuing authority through the authority verification logic; Under the condition that verification is passed, pulling the service codes related to the single-service multi-environment construction parameters to a pipeline sharing directory through the code pulling logic; Based on the service codes in the pipeline shared directory, code compiling and mirror image construction are carried out through the mirror image construction logic to obtain service mirror images, and the service mirror images are uploaded to a mirror image warehouse; splitting the single-service multi-environment construction parameters through the task adaptation logic and the parameter splitting rule to obtain single-service single-environment parameters; According to the single service single environment parameters, rendering a corresponding environment configuration file through the configuration file rendering logic, and uploading the environment configuration file and the single service single environment parameters to a task warehouse; packaging single-service single-environment parameters in the task warehouse, the environment configuration file and mirror image information corresponding to the single-service single-environment parameters in the mirror image warehouse into synchronous tasks through the version synchronization logic; And sending the synchronous task to the cloud service, and executing the synchronous task through the cloud service to obtain the service release result.
- 6. The service distribution method according to claim 5, wherein the steps of rendering the corresponding environment profile through the profile rendering logic according to the single service single environment parameter, and uploading the environment profile and the single service single environment parameter to a task repository include: Identifying an environment type in the single-service single-environment parameter through the configuration file rendering logic, and matching a corresponding configuration rendering rule based on the environment type; performing differential rendering on the basic configuration file based on the configuration rendering rule to obtain an environment configuration file; Carrying out integrity check on the environment configuration file, and associating the environment configuration file to the corresponding single service single environment parameter after the verification is passed; and uploading the environment configuration file and the single service single environment parameter to the task warehouse after the association is completed.
- 7. The service distribution method according to claim 5, wherein the step of obtaining the service distribution result by performing the synchronization task through the on-cloud service includes: analyzing the synchronous task through the cloud service to obtain task priority; Adding the synchronous task into a synchronous queue according to the task priority, and distributing execution resources for the synchronous task based on the sequence of the synchronous task in the synchronous queue; executing the synchronous task when the synchronous queue executes to the synchronous task, and monitoring the task execution state of the synchronous task; If the task execution state of the synchronous task is failure, repeatedly executing the synchronous task according to a preset retry interval until the execution times reach a preset retry time threshold value, and obtaining the service release result; And if the task execution state of the synchronous task is completed, obtaining the service release result.
- 8. A service distribution device, characterized in that the service distribution device comprises: The receiving module is used for receiving the multi-service multi-environment issuing instruction; The splitting module is used for splitting the multi-service multi-environment issuing instruction through a pre-built multi-service multi-environment pipeline to obtain single-service multi-environment building parameters; And the release module is used for carrying out service release through a pre-constructed single-service multi-environment pipeline according to the single-service multi-environment construction parameters to obtain a service release result.
- 9. A service distribution device, characterized in that the device comprises a memory, a processor and a computer program stored on the memory and executable on the processor, the computer program being configured to implement the steps of the service distribution method according to any of claims 1 to 7.
- 10. A computer program product, characterized in that the computer program product comprises a computer program which, when executed by a processor, implements the steps of the service distribution method according to any of claims 1 to 7.
Description
Service release method, device, equipment and product Technical Field The present application relates to the field of data processing technologies, and in particular, to a service publishing method, device, equipment, and product. Background The DevOps pipeline is a set of integrated automation tool chains and processes and is used for realizing full life cycle management from code submission to production deployment of software, and delivery efficiency and quality are improved by standardizing development and operation and maintenance cooperation processes, eliminating manual intervention. The Tekton pipeline arrangement realizes various operations by depending on K8s native APIs through a custom resource definition pipeline component, and naturally adapts to cloud native environments, and the Task runs in independent Pod, so that the single-point bottleneck problem of the traditional CI tool can be avoided by means of K8s scheduling and capacity expansion capability. Along with project iteration, multiple environments such as development, test, pre-production, production and the like are usually deployed to meet requirements, and each environment is respectively provided with different functions such as debugging, test, simulation running, user facing and the like. Most of the existing DevOps architecture adopts a mode of 'one-time construction pipeline corresponds to updating one environment service', and when service code updating needs to be synchronously released to a plurality of environments, the service pipeline needs to be constructed and released for a plurality of times. The process is seriously time-consuming, the updating of each environment needs to consume the construction time of the complete assembly line, the iterative updating period of the project is greatly prolonged, and the efficient iterative requirement of synchronous release of multiple environments cannot be adapted. The foregoing is provided merely for the purpose of facilitating understanding of the technical solutions of the present application and is not intended to represent an admission that the foregoing is prior art. Disclosure of Invention The application mainly aims to provide a service release method, device, equipment and product, and aims to solve the technical problems that the existing architecture multi-environment release needs to construct a production line for many times, is time-consuming and cannot meet the requirements of multi-environment efficient synchronous release. In order to achieve the above object, the present application provides a service publishing method, which includes: Receiving a multi-service multi-environment issue instruction; Splitting the multi-service multi-environment issuing instruction through a pre-built multi-service multi-environment pipeline to obtain single-service multi-environment building parameters; and according to the single-service multi-environment construction parameters, service release is carried out through a pre-constructed single-service multi-environment pipeline, and a service release result is obtained. In an embodiment, before the step of splitting the multi-service multi-environment issue instruction through the pre-built multi-service multi-environment pipeline to obtain the single-service multi-environment construction parameter, the method further includes: constructing and obtaining a pipeline basic structure through an automatic construction engine; performing verification configuration and check logic configuration based on the pipeline infrastructure to obtain authority verification logic and core check logic; according to the authority verification logic and the core verification logic, parameter rule configuration is carried out in the pipeline basic structure, and a parameter splitting rule and a parameter combination rule are obtained; And integrating the authority verification logic, the core verification logic, the parameter splitting rule and the parameter combination rule into the pipeline infrastructure to obtain a multi-service multi-environment pipeline. In an embodiment, the step of splitting the multi-service multi-environment issue instruction through a pre-built multi-service multi-environment pipeline to obtain a single-service multi-environment construction parameter includes: analyzing the multi-service multi-environment issuing instruction to obtain multi-environment cluster parameters and multi-service parameters; Performing format verification on the multi-environment cluster parameters and the multi-service parameters through the core verification logic to obtain a verification result; Verifying the issuing authority corresponding to the multi-service multi-environment issuing instruction through the authority verification logic to obtain a verification result; Splitting the multi-environment cluster parameters according to the parameter splitting rule to obtain an environment and cluster mapping relation when the verification resu