Application release implementation method and device, equipment, storage medium and program product
By establishing a data model and using pipeline orchestration tools, encapsulating and automating the application release process, the complex and risky problems of traditional release methods are solved, and unified release and simplified operations of container and non-container environments are achieved.
Patent Information
- Application Number
- CN202411770769.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-04
- Publication Date
- 2025-04-04
AI Technical Summary
Traditional application release methods are complex in operation, easy to introduce human operation risks, and difficult to unify the release process of container and non-container environments.
By establishing a data model between container nodes and non-container nodes, orchestrate pipelines using pipeline orchestration tools, and encapsulate container publishing and non-container publishing into different atoms, automatic parameter assembly and visual pipeline descriptions are achieved. Then, the assembly pipeline is called through the Jenkins API, an executable Jenkins Job is generated, and a publishing operation is performed.
It simplifies application release operations, reduces human operation risks, realizes unified release of container and non-container environments, supports process expansion and pre-arrangement and audit, and reduces implementation risks.
Smart Images

Figure CN119759365A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a method, apparatus, computer device, computer-readable storage medium, and computer program product for implementing application publishing. Background Art
[0002] Containerization has become the mainstream release method for current application systems. However, in the actual industry, there are often some systems that cannot be containerized due to product characteristics and other issues. In addition, large and medium-sized enterprises are gradually improving the construction of business continuity or disaster recovery scenarios, thus forming a complex release scenario with multiple computer room environments and multiple release methods.
[0003] In traditional technology, Jenkins (a continuous integration tool developed based on Java) is used as the core release tool to release applications by writing release scripts and configuring release task parameters. In actual operation, various release tasks (Jenkins jobs) are pre-configured according to the release environment (computer room, cluster, etc.) and type (container release, non-container release).
[0004] However, before each release, the above release method needs to adjust the release parameters on the page, manually determine the release order, and execute the corresponding tasks in sequence. This release method is complex to operate, has high requirements for the release personnel, and is prone to human operation risks. Summary of the invention
[0005] Based on this, it is necessary to provide an application publishing implementation method, device, computer equipment, computer-readable storage medium and computer program product that can simplify operations and reduce the risks of human operations in response to the above technical problems.
[0006] In a first aspect, the present application provides a method for implementing application publishing, including:
[0007] Set the primary key according to the relevant information of the released product, and establish the data models corresponding to the container node and the non-container node respectively;
[0008] Orchestrate the pipeline using the pipeline orchestration tool, and encapsulate container release and non-container release into two different atoms.
[0009] Automatically assemble parameters of two different atoms using the data model to obtain an assembled pipeline;
[0010] Generate an executable Jenkins Job by calling the assembled pipeline through the Jenkins API; the Jenkins API is an application programming interface of the continuous integration tool, and the Jenkins Job is a task of the continuous integration tool;
[0011] Call Jenkins Job through Jenkins API to perform release operations.
[0012] In one embodiment, the relevant information includes: product name;
[0013] The step of setting a primary key according to the relevant information of the published product and establishing data models corresponding to the container node and the non-container node respectively includes:
[0014] The container node view and the non-container node view are constructed with the product name as the primary key; the container node view includes: management attributes and node attributes; the non-container node view includes: management attributes and node attributes; wherein:
[0015] The management attributes of the container node view include: at least one of the person in charge, the system to which it belongs, and the time of the last update; the node attributes of the container node view include: at least one of the computer room to which it belongs, the cluster to which it belongs, the basic image name, the application image name, and the running status;
[0016] The management attributes of the non-container node view include at least one of the person in charge, the system to which it belongs, and the last update time; the node attributes of the non-container node view include at least one of the product information, the release information, the release parameters, and the middleware information; the product information includes: the source path and the version; the release information includes: the computer room to which it belongs, the node IP; the release parameters include: the product deployment path, the backup path, the startup script, the startup user, and the startup parameters; the middleware information includes: the middleware type, the middleware installation path, and the running status.
[0017] In one embodiment, the step of orchestrating the pipeline using a pipeline orchestration tool and encapsulating container publishing and non-container publishing into two different atoms includes:
[0018] Define the pipeline, determine the pipeline name, execution time, and priority;
[0019] Add new pipeline steps and determine the names of the new steps. The names of the steps are used to distinguish different published contents.
[0020] Drag atoms from the atom list to the corresponding step;
[0021] The container publishing and non-container publishing processes are saved in the form of scripts in a database or file server for reference when generating a Jenkins Job.
[0022] In one embodiment, the automatic assembly of parameters of two different atoms using the data model to obtain an assembled pipeline includes:
[0023] Edit two different atoms separately and select the data model automatic assembly parameters;
[0024] Display the optional range of products on the parameter assembly interface to prompt the publisher to make a selection;
[0025] Receive the selection information entered by the publisher and provide an overview of the pipeline information in a tree diagram or table format;
[0026] An audit is initiated for the assembly line information. If the audit is passed, the assembled assembly line is obtained.
[0027] In one embodiment, the assembly completed pipeline is called through the Jenkins API to generate an executable Jenkins Job, including:
[0028] According to the relationship between pipelines, steps, and atoms at each level, the pipeline is stored as a Json string, and the pipeline task is delegated to Jenkins by calling the Jenkins API to generate an executable Jenkins Job.
[0029] In one embodiment, calling a Jenkins Job through a Jenkins API to perform a publishing operation includes:
[0030] Generate different pipelines according to the types of atoms in the pipeline, where the pipeline is a pipeline for exchanging data between the external program and the host;
[0031] Call the pipeline plugin through the Jenkins API to perform the following release operations:
[0032] Receive the parameters provided by the pipeline orchestration tool and use the parameters as input parameters of the pipeline;
[0033] Clean and format the input data;
[0034] According to the release environment, call the corresponding execution tool to execute the Jenkins Job;
[0035] Feedback execution results to the pipeline orchestration tool.
[0036] In a second aspect, the present application also provides an application publishing implementation device, including:
[0037] The model building module is used to set the primary key according to the relevant information of the published product and to establish the data models corresponding to the container node and the non-container node respectively;
[0038] The orchestration module is used to orchestrate the pipeline through the pipeline orchestration tool and encapsulate container publishing and non-container publishing into two different atoms;
[0039] An assembly module, used for automatically assembling parameters of two different atoms through the data model to obtain an assembled pipeline;
[0040] A calling module is used to call the assembled pipeline through the Jenkins API to generate an executable JenkinsJob; the Jenkins API is an application programming interface of the continuous integration tool, and the Jenkins Job is a task of the continuous integration tool;
[0041] The release module is used to call Jenkins Job through the Jenkins API to perform release operations.
[0042] In a third aspect, the present application further provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the following steps are implemented:
[0043] Set the primary key according to the relevant information of the released product, and establish the data models corresponding to the container node and the non-container node respectively;
[0044] Orchestrate the pipeline using the pipeline orchestration tool, and encapsulate container release and non-container release into two different atoms.
[0045] Automatically assemble parameters of two different atoms using the data model to obtain an assembled pipeline;
[0046] Generate an executable Jenkins Job by calling the assembled pipeline through the Jenkins API; the Jenkins API is an application programming interface of the continuous integration tool, and the Jenkins Job is a task of the continuous integration tool;
[0047] Call Jenkins Job through Jenkins API to perform release operations.
[0048] In a fourth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, wherein when the computer program is executed by a processor, the following steps are implemented:
[0049] Set the primary key according to the relevant information of the released product, and establish the data models corresponding to the container node and the non-container node respectively;
[0050] Orchestrate the pipeline using the pipeline orchestration tool, and encapsulate container release and non-container release into two different atoms.
[0051] Automatically assemble parameters of two different atoms using the data model to obtain an assembled pipeline;
[0052] Generate an executable Jenkins Job by calling the assembled pipeline through the Jenkins API; the Jenkins API is an application programming interface of the continuous integration tool, and the Jenkins Job is a task of the continuous integration tool;
[0053] Call Jenkins Job through Jenkins API to perform release operations.
[0054] In a fifth aspect, the present application further provides a computer program product, including a computer program, which implements the following steps when executed by a processor:
[0055] Set the primary key according to the relevant information of the released product, and establish the data models corresponding to the container node and the non-container node respectively;
[0056] Orchestrate the pipeline using the pipeline orchestration tool, and encapsulate container release and non-container release into two different atoms.
[0057] Automatically assemble parameters of two different atoms using the data model to obtain an assembled pipeline;
[0058] Generate an executable Jenkins Job by calling the assembled pipeline through the Jenkins API; the Jenkins API is an application programming interface of the continuous integration tool, and the Jenkins Job is a task of the continuous integration tool;
[0059] Call Jenkins Job through Jenkins API to perform release operations.
[0060] The above-mentioned application release implementation method, device, computer equipment, computer-readable storage medium and computer program product, by setting the primary key according to the relevant information of the released product, respectively establish the data model corresponding to the container node and the non-container node; thereby, it can meet the pipeline assembly requirements of the container node and the non-container node, and realize the unification of the container and non-container environment. The pipeline is orchestrated by the pipeline orchestration tool, and the container release and the non-container release are respectively encapsulated as two different atoms; the two different atoms are automatically assembled with parameters through the data model to obtain the assembled pipeline; thereby, automatic parameter assembly can be realized through the general data model, and the pipeline of the release process can be visually described. The assembled pipeline is called through the Jenkins API to generate an executable Jenkins Job; the Jenkins API is the application programming interface of the continuous integration tool, and the Jenkins Job is the task of the continuous integration tool; thereby, the pipeline can be converted into an executable task of Jenkins, which is convenient for the task call during subsequent delivery, and the integration of Jenkins and the data model is realized. The Jenkins Job is called through the Jenkins API to perform the release operation. This can simplify application release operations so that release personnel no longer need to pay attention to the release process, reducing the risk of human operation. It also supports process expansion through a visual pipeline method, and can perform orchestration and review in advance, thereby bringing the release process forward in terms of timing and reducing implementation risks. BRIEF DESCRIPTION OF THE DRAWINGS
[0061] In order to more clearly illustrate the technical solutions in the embodiments of the present application or related technologies, the drawings required for use in the embodiments of the present application or related technical descriptions will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.
[0062] Figure 1 A schematic diagram of the principle of a method for implementing application publishing in an embodiment;
[0063] Figure 2 A flowchart of a method for implementing application publishing in one embodiment;
[0064] Figure 3 A schematic diagram of a process of pipeline arrangement in one embodiment;
[0065] Figure 4 A schematic diagram of the packaging structure of non-container publishing and container publishing in one embodiment;
[0066] Figure 5 is a schematic diagram of the structure of a pipeline in an embodiment;
[0067] Figure 6 A flowchart of a method for implementing application publishing in another embodiment;
[0068] Figure 7 A structural block diagram of an application publishing implementation device in an embodiment;
[0069] Figure 8 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION
[0070] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0071] For example, Figure 1 FIG. 1 is a schematic diagram showing a principle of a method for implementing application publishing in an embodiment. Figure 1 As shown in the figure, first build a CMDB (Configuration Management Database) data model, which includes container node view and non-container node view. These two views can realize automatic assembly parameters for the pipelines orchestrated by the pipeline orchestration tool. Then the pipeline orchestration tool provides the generated pipeline to the deployment execution tool, and the Jenkins pipeline calls the container publishing tool and the non-container publishing tool to execute the generated Jenkins Job to obtain the execution result. This realizes the unified application release of container and non-container environments based on CMDB.
[0072] In this embodiment, the CMDB data model mainly records the information of the running state of the container and non-container views. Its characteristic is that the name of the released product is used as the primary key, and the data models corresponding to the container node and the non-container node are established respectively. Each model contains two configuration items: "management attributes" and "node information". The management attribute describes the business nature of the product, such as the system, organization, person in charge, etc.; the node information records the information of the running state of the product, which is also a necessary input for the release execution process.
[0073] In this embodiment, the main function of the pipeline orchestration tool is to provide a visual pipeline, which uses the product information in the CMDB as input, adapts the container and non-container information, encapsulates the container and non-container publishing processes through atoms, and combines the manual orchestration process to convert the abstract publishing process into a concrete pipeline form, which can be extended to perform process operations such as auditing.
[0074] In this embodiment, the release execution tool is responsible for executing the pipeline generated by the pipeline orchestration module, mainly using the script execution capability of the Jenkins pipeline to perform the actual operation of the release steps.
[0075] In an exemplary embodiment, Figure 2 As shown, a method for implementing application publishing is provided. The method in this embodiment may include the following steps 201 to 205. Among them:
[0076] Step 201, setting a primary key according to relevant information of the published product, and establishing data models corresponding to container nodes and non-container nodes respectively.
[0077] The data model in this embodiment can be Figure 1 The CMDB data model shown in FIG. 1 is mainly used to record the information of the runtime state of container and non-container node projects and to provide parameter data for execution. For example, as shown in Table 1, view types, data categories, and corresponding configuration items are given.
[0078] Exemplarily, the relevant information includes: product name. That is, the product name can be used as the primary key to construct a container node view and a non-container node view; the container node view includes: management attributes and node attributes; the non-container node view includes: management attributes and node attributes; wherein:
[0079] The management attributes of the container node view include: at least one of the person in charge, the system to which it belongs, and the time of the last update; the node attributes of the container node view include: at least one of the computer room to which it belongs, the cluster to which it belongs, the basic image name, the application image name, and the running status;
[0080] The management attributes of the non-container node view include at least one of the person in charge, the system to which it belongs, and the last update time; the node attributes of the non-container node view include at least one of the product information, the release information, the release parameters, and the middleware information; the product information includes: the source path and the version; the release information includes: the computer room to which it belongs, the node IP; the release parameters include: the product deployment path, the backup path, the startup script, the startup user, and the startup parameters; the middleware information includes: the middleware type, the middleware installation path, and the running status.
[0081] Table 1
[0082]
[0083] In this embodiment, the person in charge and the system to which they belong refer to the query scope specified when the pipeline orchestration tool performs data query. The last updated time refers to the update record of the view model that provides the basis for the query. The field design in the node attributes must meet the requirements of the cloud platform for the publishing method. During the implementation process, the requirements for generating images are usually met by providing basic images and products; and the requirements for container publishing are met by providing application image names.
[0084] In this embodiment, the management attribute function of the non-container node view is the same as that of the container node view. In non-container publishing, the diversity of middleware caused by different development languages needs to be considered, including Tomcat, Nginx, Jetty and Jar package publishing, etc. The design should consider both maintaining the universality of the view as much as possible and satisfying the integrity of the information required during the publishing execution process.
[0085] It should be noted that the scope discussed in this embodiment is the release of application projects. It can be understood that the goal of all release tasks is to release the product or the image corresponding to the product. Therefore, the primary key is set to "product name" to distinguish different node instances.
[0086] Optionally, the primary key can be expanded to a pattern such as "product name" + "application system" or "product name" + "project name" to cope with the same name in different systems or different projects. The setting of the primary key should not violate the uniqueness principle.
[0087] In this embodiment, the design of the view template can also be modified according to the actual situation during implementation. While supporting manual maintenance, CMDB data can also provide query and update APIs, which can be queried and updated through http, restful and other request methods.
[0088] Step 202: Orchestrate the pipeline using a pipeline orchestration tool, and encapsulate container publishing and non-container publishing into two different atoms.
[0089] In this embodiment, the pipeline orchestration tool mainly provides a visual pipeline orchestration function, and its output describes the pipeline of the publishing process. The components of the pipeline specifically include:
[0090] Information description: basic information of the pipeline, including pipeline name, execution time, and priority;
[0091] Step: A logical unit that makes up the pipeline, used to describe the content released at the current stage. It can be used as a carrier of atoms, and a step contains multiple atoms of the same type.
[0092] Atom: Each release scenario can be encapsulated as a reusable atom that can be converted into a Jenkins task. Each atom is a minimum release task.
[0093] For example, during the implementation process, the release personnel complete the pipeline orchestration by filling in the pipeline description information, adding and editing steps, and dragging atoms to complete the pipeline orchestration, thereby realizing the complete release process. It is mainly completed by the pipeline orchestration module and the Jenkins interaction module.
[0094] For example, Figure 3 As shown, in Figure 3 The process of pipeline orchestration is shown in the following figure: first define the pipeline, determine the pipeline name, execution time, and priority; add pipeline steps and determine the names of the new steps; the names of the steps are used to distinguish different published contents; move atoms from the atom list to the corresponding steps by dragging and dropping; save the container publishing and non-container publishing processes in the database or file server as scripts for reference when generating Jenkins Jobs.
[0095] In this embodiment, the developer can fill in the pipeline name, execution time, and priority to complete the pipeline definition; add new pipeline steps and name the steps. The step names are used to distinguish different published content, and support naming according to computer rooms and regions; move atoms from the atom list to the steps by dragging and dropping. Generally, multiple atoms of the same type can be placed in a step, and naming is supported.
[0096] For example, Figure 4 As shown, in Figure 4 The encapsulation structure of non-container publishing and container publishing is shown in Figure 1. The container and non-container publishing tasks are encapsulated into two different atoms. The encapsulation method is to save the container and non-container publishing processes in the form of scripts in a database or file server for reference when generating a Jenkins Job.
[0097] Step 203, automatically assemble parameters of two different atoms through the data model to obtain an assembled pipeline.
[0098] In this embodiment, two different atoms can be edited separately, and the data model automatic assembly parameters can be selected; the optional range of the product is displayed on the parameter assembly interface, prompting the publisher to make a selection; the selection information entered by the publisher is received, and the pipeline information is summarized in a tree diagram or table format; an audit is initiated for the pipeline information, and if the audit is passed, the assembled pipeline is obtained.
[0099] Exemplary, combined Figure 4As shown, click on the atom to edit, the CMDB data model will automatically assemble the parameters and display the product selection range, which can be selected by the publisher. It can support filtering by multiple information dimensions such as the computer room, cluster, IP, etc., and can be imported in Excel and other ways.
[0100] Optionally, for the assembled assembly line, it also supports an overview of the assembly line information in a tree diagram and / or table format, so as to clearly display the release process of the assembly line definition.
[0101] In this embodiment, based on the visual pipeline, the orchestration is performed in the form of dragging and dropping, so that when the publisher faces complex publishing scenarios, they do not need to configure the tasks of container publishing and non-container publishing separately, but unify the orchestration of the pipeline and rely on CMDB to automatically inject parameters, thereby greatly simplifying the operation. By hosting the relevant parameters of the publishing process in CMDB, encapsulating the publishing process into standardized atoms, and injecting parameters through CMDB, the publishing process is orchestrated, so that the publisher does not need to care about the specific process, which reduces the experience requirements for personnel and facilitates work handover.
[0102] In addition, by encapsulating the release process into atoms, the release personnel no longer need to pay attention to the release process, reducing the risk of human operation; through a visual pipeline method, it supports process expansion, and can be orchestrated and reviewed in advance, so as to advance the release process in terms of time sequence and reduce implementation risks.
[0103] Step 204, calling the assembled pipeline through the Jenkins API to generate an executable Jenkins Job.
[0104] The Jenkins API is an application programming interface of a continuous integration tool, and the Jenkins Job is a task of a continuous integration tool.
[0105] In this embodiment, the pipeline can be stored as a Json string according to the relationship between the pipeline, steps, and atoms at each level, and the pipeline task can be delegated to Jenkins by calling the Jenkins API to generate an executable JenkinsJob.
[0106] Step 205: Call the Jenkins Job through the Jenkins API to perform the release operation.
[0107] In this embodiment, different pipelines can be generated according to the types of atoms in the pipeline. The pipeline is a pipeline for exchanging data between the add-in and the host. The pipeline plug-in is called through the Jenkins API to perform the following publishing operations:
[0108] Receive the parameters provided by the pipeline orchestration tool and use the parameters as input parameters of the pipeline;
[0109] Clean and format the input data;
[0110] According to the release environment, call the corresponding execution tool to execute the Jenkins Job;
[0111] Feedback execution results to the pipeline orchestration tool.
[0112] For example, Figure 5 As shown, in Figure 5 The structure of the pipeline is given in Figure 5 It can be seen that the Pipeline groovy script is divided into 4 steps (stage):
[0113] 1) Data verification (GetData), receiving the parameters provided by the pipeline orchestration tool as the input parameters of the pipeline. The key point of this step is to receive and verify the integrity of the Json string and convert it into a data object in Groovy.
[0114] 2) Input parameter processing (DataUnion) is responsible for providing data verification functions, data cleaning and formatting, processing illegal data such as special characters, and formatting data such as IP and time to ensure that the data is available when executing the publishing operation.
[0115] 3) Invoke: responsible for calling the external platform interface. Depending on the actual release environment, it can call downstream container cloud platforms, ansible and other execution tools.
[0116] 4) PostProcessing: receiving the execution result returned after Invoke calls the external platform or tool, and returning the result to the pipeline orchestration tool.
[0117] In this embodiment, the design of the data model for container nodes and non-container nodes can meet the assembly of pipeline parameters, and the characteristics include: "product name" is used as the primary key; the attributes are divided into two categories: "management attributes" and "node attributes"; for the 9 attributes of the container data model, the design of 16 nodes of the non-container data model.
[0118] In this embodiment, the publishing process is described by a visual pipeline, so that users do not need to care about the architectural information of containers and non-containers when selecting parameters. Among them, the design of the visual pipeline includes multiple steps, each step includes multiple atoms, and each atom is an encapsulated publishing process script. The execution logic is: atoms within the same step are executed serially, and steps are executed serially. If the atomic execution fails, the pipeline execution is suspended. The CMDB data model can automatically assemble parameters for atoms in the pipeline, and multiple products can be selected in one atom. The pipeline supports global preview and approval; the pipeline execution supports pause, termination, and skip operations.
[0119] In addition, in this embodiment, the pipeline can also be converted into an executable task of Jenkins. By delivering the pipeline orchestration content to Jenkins to generate an executable Jenkins Job, the integration of Jenkins and CMDB is realized; by generating the design of the stage in the Jenkins pipeline, the execution result of the Jenkins Job is fed back to the pipeline in real time, and the pipeline synchronously displays the corresponding atom as success or failure.
[0120] In the above-mentioned application release implementation method, by setting the primary key according to the relevant information of the released product, the data models corresponding to the container node and the non-container node are respectively established; thereby, the pipeline assembly requirements of the container node and the non-container node can be met, and the unification of the container and non-container environment can be realized. The pipeline is orchestrated by the pipeline orchestration tool, and the container release and the non-container release are respectively encapsulated as two different atoms; the two different atoms are automatically assembled with parameters through the data model to obtain the assembled pipeline; thereby, automatic parameter assembly can be realized through a common data model, and the pipeline of the release process can be visually described. The assembled pipeline is called through the Jenkins API to generate an executable JenkinsJob; the Jenkins API is the application programming interface of the continuous integration tool, and the Jenkins Job is the task of the continuous integration tool; thereby, the pipeline can be converted into an executable task of Jenkins, which is convenient for the task call during subsequent delivery, and the integration of Jenkins and the data model is realized. The Jenkins Job is called through the Jenkins API to perform the release operation. This can simplify application release operations so that release personnel no longer need to pay attention to the release process, reducing the risk of human operation. It also supports process expansion through a visual pipeline method, and can perform orchestration and review in advance, thereby bringing the release process forward in terms of timing and reducing implementation risks.
[0121] In another exemplary embodiment, Figure 6 As shown, a method for implementing application publishing is provided. The method in this embodiment may include the following steps 601 to 606. Among them:
[0122] Step 601, set the primary key according to the relevant information of the published product, and establish data models corresponding to the container node and the non-container node respectively.
[0123] Step 602: Orchestrate the pipeline using a pipeline orchestration tool, and encapsulate container publishing and non-container publishing into two different atoms.
[0124] Step 603, automatically assemble parameters of two different atoms through the data model to obtain an assembled pipeline.
[0125] In this embodiment, the specific implementation process and technical effects of steps 601 to 603 are shown in Figure 2 The descriptions of steps 201 to 203 in the illustrated method embodiment are not repeated here.
[0126] Step 604, review the completed assembly line.
[0127] In this embodiment, for the completed assembly line, the approval function is also supported, and the assembly line can be directly reviewed. If the review is passed, the assembly line is completed.
[0128] Optionally, the pipeline that has completed the review can also perform the following operations: execute, pause, terminate, skip, etc. Exemplarily, when the pipeline starts to execute, the steps are executed sequentially from left to right, and all atoms in the same step are executed in parallel, that is, the corresponding Jenkins Job is called through the Jenkins API to execute the release operation. Among them, after all atoms in a step are successfully executed, the next step continues to execute, and when the atomic execution fails, the pipeline execution stops.
[0129] Optionally, according to the release process, the alarm processing and traffic processing steps can be encapsulated into atoms for orchestration, so that the pipeline can adapt to the actual scenario.
[0130] Step 605, calling the assembled pipeline through the Jenkins API to generate an executable Jenkins Job.
[0131] Step 606: Call the Jenkins Job through the Jenkins API to perform the release operation.
[0132] In this embodiment, the specific implementation process and technical effects of steps 605 to 606 are shown in Figure 2 The descriptions of steps 204 to 205 in the illustrated method embodiment are not repeated here.
[0133] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.
[0134] Based on the same inventive concept, the embodiment of the present application also provides an application publishing implementation device for implementing the above-mentioned application publishing implementation method. The implementation solution provided by the device to solve the problem is similar to the implementation solution recorded in the above-mentioned method, so the specific limitations in the one or more application publishing implementation device embodiments provided below can refer to the limitations of the application publishing implementation method above, and will not be repeated here.
[0135] In an exemplary embodiment, Figure 7 As shown, an application publishing implementation device is provided, including: a model building module 701, an arrangement module 702, an assembly module 703, a calling module 704 and a publishing module 705, wherein:
[0136] Model building module 701, used to set primary keys according to relevant information of published products, and respectively build data models corresponding to container nodes and non-container nodes;
[0137] The orchestration module 702 is used to orchestrate the pipeline through the pipeline orchestration tool, and encapsulate the container release and the non-container release into two different atoms respectively;
[0138] An assembly module 703 is used to automatically assemble parameters of two different atoms through the data model to obtain an assembled pipeline;
[0139] The calling module 704 is used to call the assembled pipeline through the Jenkins API to generate an executable Jenkins Job; the Jenkins API is an application programming interface of the continuous integration tool, and the Jenkins Job is a task of the continuous integration tool;
[0140] The publishing module 705 is used to call the Jenkins Job through the Jenkins API to perform the publishing operation.
[0141] Exemplarily, the relevant information includes: the product name; the model building module 701 is specifically used to: construct a container node view and a non-container node view using the product name as the primary key; the container node view includes: management attributes and node attributes; the non-container node view includes: management attributes and node attributes; wherein:
[0142] The management attributes of the container node view include: at least one of the person in charge, the system to which it belongs, and the time of the last update; the node attributes of the container node view include: at least one of the computer room to which it belongs, the cluster to which it belongs, the basic image name, the application image name, and the running status;
[0143] The management attributes of the non-container node view include at least one of the person in charge, the system to which it belongs, and the last update time; the node attributes of the non-container node view include at least one of the product information, the release information, the release parameters, and the middleware information; the product information includes: the source path and the version; the release information includes: the computer room to which it belongs, the node IP; the release parameters include: the product deployment path, the backup path, the startup script, the startup user, and the startup parameters; the middleware information includes: the middleware type, the middleware installation path, and the running status.
[0144] Exemplarily, the orchestration module 702 is specifically used to: define pipelines, determine pipeline names, execution time, and priorities; add pipeline steps and determine the names of the newly added steps; wherein the names of the steps are used to distinguish different published contents; move atoms from the atom list to the corresponding steps by dragging and dropping; save the container publishing and non-container publishing processes in the form of scripts in a database or file server for reference when generating a Jenkins Job.
[0145] Exemplarily, the assembly module 703 is specifically used to: edit two different atoms separately and select automatic assembly parameters of the data model; display the optional range of products in the parameter assembly interface to prompt the publisher to make a selection; receive the selection information entered by the publisher and provide an overview of the pipeline information in a tree diagram or table format; initiate an audit of the pipeline information, and if the audit is passed, obtain the assembled pipeline.
[0146] Exemplarily, the calling module 704 is specifically used to: store the pipeline as a Json string according to the relationship between the pipeline, steps, and atoms at each level, and delegate the pipeline task to Jenkins by calling the Jenkins API to generate an executable Jenkins Job.
[0147] Exemplarily, the publishing module 705 is specifically used to: generate different pipelines according to the types of each atom in the pipeline, and the pipeline is a pipeline for exchanging data between the external program and the host; and call the pipeline plug-in through the Jenkins API to perform the following publishing operations:
[0148] Receive the parameters provided by the pipeline orchestration tool and use the parameters as input parameters of the pipeline;
[0149] Clean and format the input data;
[0150] According to the release environment, call the corresponding execution tool to execute the Jenkins Job;
[0151] Feedback execution results to the pipeline orchestration tool.
[0152] In this embodiment, the primary key is set according to the relevant information of the released product, and the data models corresponding to the container node and the non-container node are established respectively; thereby, the pipeline assembly requirements of the container node and the non-container node can be met, and the unification of the container and non-container environment can be realized. The pipeline is orchestrated by the pipeline orchestration tool, and the container release and the non-container release are respectively encapsulated as two different atoms; the parameters of the two different atoms are automatically assembled through the data model to obtain the assembled pipeline; thereby, automatic parameter assembly can be realized through a common data model, and the pipeline of the release process can be visually described. The assembled pipeline is called through the Jenkins API to generate an executable Jenkins Job; the Jenkins API is the application programming interface of the continuous integration tool, and the Jenkins Job is the task of the continuous integration tool; thereby, the pipeline can be converted into an executable task of Jenkins, which is convenient for the task call during subsequent delivery, and the integration of Jenkins and the data model is realized. The Jenkins Job is called through the Jenkins API to perform the release operation. This can simplify application release operations so that release personnel no longer need to pay attention to the release process, reducing the risk of human operation. It also supports process expansion through a visual pipeline method, and can perform orchestration and review in advance, thereby bringing the release process forward in terms of timing and reducing implementation risks.
[0153] Each module in the above-mentioned application publishing implementation device can be implemented in whole or in part by software, hardware, or a combination thereof. Each of the above-mentioned modules can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute operations corresponding to each of the above modules.
[0154] In an exemplary embodiment, a computer device is provided. The computer device may be a terminal, and its internal structure diagram may be as shown in FIG. Figure 8 As shown. The computer device includes a processor, a memory, an input / output interface, a communication interface, a display unit and an input device. The processor, the memory and the input / output interface are connected through a system bus, and the communication interface, the display unit and the input device are connected to the system bus through the input / output interface. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner can be implemented through WIFI, a mobile cellular network, near field communication (NFC) or other technologies. When the computer program is executed by the processor, an application publishing implementation method is implemented. The display unit of the computer device is used to form a visually visible picture, which can be a display screen, a projection device or a virtual reality imaging device. The display screen can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device can be a touch layer covering the display screen, or a button, trackball or touchpad set on the computer device shell, or an external keyboard, touchpad or mouse.
[0155] Those skilled in the art will understand that Figure 8 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0156] In an exemplary embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the steps in the above-mentioned method embodiments when executing the computer program.
[0157] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps in the above-mentioned method embodiments are implemented.
[0158] In one embodiment, a computer program product is provided, including a computer program, which implements the steps in the above method embodiments when executed by a processor.
[0159] 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, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant regulations.
[0160] A person of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment method can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile memory 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. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, an artificial intelligence (AI) processor, etc., but are not limited to this.
[0161] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, 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 application.
[0162] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.
Claims
1. A method for implementing application publishing, characterized in that: The method comprises: Set the primary key according to the relevant information of the released product, and establish the data models corresponding to the container node and the non-container node respectively; Orchestrate the pipeline using the pipeline orchestration tool, and encapsulate container release and non-container release into two different atoms. Automatically assemble parameters of two different atoms using the data model to obtain an assembled pipeline; Generate an executable Jenkins Job by calling the assembled pipeline through the Jenkins API; the Jenkins API is an application programming interface of the continuous integration tool, and the Jenkins Job is a task of the continuous integration tool; Call Jenkins Job through Jenkins API to perform release operations.
2. The method according to claim 1, characterized in that The relevant information includes: product name; The step of setting a primary key according to the relevant information of the published product and establishing data models corresponding to the container node and the non-container node respectively includes: The container node view and the non-container node view are constructed with the product name as the primary key; the container node view includes: management attributes and node attributes; the non-container node view includes: management attributes and node attributes; wherein: The management attributes of the container node view include: at least one of the person in charge, the system to which it belongs, and the time of the last update; the node attributes of the container node view include: at least one of the computer room to which it belongs, the cluster to which it belongs, the basic image name, the application image name, and the running status; The management attributes of the non-container node view include at least one of the person in charge, the system to which it belongs, and the last update time; the node attributes of the non-container node view include at least one of the product information, the release information, the release parameters, and the middleware information; the product information includes: the source path and the version; the release information includes: the computer room to which it belongs, the node IP; the release parameters include: the product deployment path, the backup path, the startup script, the startup user, and the startup parameters; the middleware information includes: the middleware type, the middleware installation path, and the running status.
3. The method according to claim 1, characterized in that The pipeline is orchestrated by a pipeline orchestration tool, and container publishing and non-container publishing are respectively encapsulated into two different atoms, including: Define the pipeline, determine the pipeline name, execution time, and priority; Add new pipeline steps and determine the names of the new steps. The names of the steps are used to distinguish different published contents. Drag atoms from the atom list to the corresponding step; The container publishing and non-container publishing processes are saved in the form of scripts in a database or file server for reference when generating a Jenkins Job.
4. The method according to claim 1, characterized in that The automatic assembly of parameters of two different atoms using the data model to obtain an assembled pipeline includes: Edit two different atoms separately and select the data model automatic assembly parameters; Display the optional range of products on the parameter assembly interface to prompt the publisher to make a selection; Receive the selection information entered by the publisher and provide an overview of the pipeline information in a tree diagram or table format; An audit is initiated for the assembly line information. If the audit is passed, the assembled assembly line is obtained.
5. The method according to any one of claims 1 to 4, characterized in that: The assembly line is called through the Jenkins API to generate an executable Jenkins Job, including: According to the relationship between pipelines, steps, and atoms at each level, the pipeline is stored as a Json string, and the pipeline task is delegated to Jenkins by calling the Jenkins API to generate an executable Jenkins Job.
6. The method according to claim 5, characterized in that The release operation is performed by calling the Jenkins Job through the Jenkins API, including: Generate different pipelines according to the types of atoms in the pipeline, where the pipeline is a pipeline for exchanging data between the external program and the host; Call the pipeline plugin through the Jenkins API to perform the following release operations: Receive the parameters provided by the pipeline orchestration tool and use the parameters as input parameters of the pipeline; Clean and format the input data; According to the release environment, call the corresponding execution tool to execute the Jenkins Job; Feedback execution results to the pipeline orchestration tool.
7. An application publishing implementation device, characterized in that: The device comprises: The model building module is used to set the primary key according to the relevant information of the published product and to establish the data models corresponding to the container node and the non-container node respectively; The orchestration module is used to orchestrate the pipeline through the pipeline orchestration tool and encapsulate container publishing and non-container publishing into two different atoms; An assembly module, used for automatically assembling parameters of two different atoms through the data model to obtain an assembled pipeline; A calling module, used to call the assembled pipeline through the Jenkins API to generate an executable Jenkins Job; the Jenkins API is an application programming interface of the continuous integration tool, and the Jenkins Job is a task of the continuous integration tool; The release module is used to call Jenkins Job through the Jenkins API to perform release operations.
8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 6 are implemented.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.
10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.