A method and apparatus for controlling continuous delivery of a version
Patent Information
- Application Number
- CN202210016791.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-01-07
- Publication Date
- 2026-08-28
- Estimated Expiration
- 2042-01-07
AI Technical Summary
但在实际实施过程中,版本投产介入过多人工操作,自动化程度不高,导致效率低下,且版本投产易发生风险
[0048]本发明实施例提供的持续交付版本投产控制方法及装置,确定版本投产的目标环境;所述目标环境包括灰度环境或正式环境;根据投产日期确定与所述目标环境对应的版本序列;执行与所述版本序列对应的版本投产控制流程,并完成版本投产流程实例化,能够减少人工操作,提高自动化程度,进而提高效率,且有效控制版本投产风险。
Smart Images

Figure CN114356399B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of version control technology, specifically to a method and apparatus for controlling the continuous delivery of versions for production. Background Technology
[0002] As product iteration speeds up and version release frequency increases, the risks associated with version releases are amplified. It is necessary to establish a gradual canary release mechanism to effectively control the risks brought about by version releases.
[0003] Currently, various release strategies exist in the industry, such as blue-green release, rolling upgrades, and canary releases. However, in actual implementation, excessive manual intervention during version deployment leads to low automation, resulting in inefficiency and making version deployment prone to risks. Summary of the Invention
[0004] To address the problems in the prior art, embodiments of the present invention provide a method and apparatus for continuous delivery version production control, which can at least partially solve the problems existing in the prior art.
[0005] On the one hand, this invention proposes a method for continuous delivery version deployment control, including:
[0006] Determine the target environment for production deployment; the target environment may be a grayscale environment or a production environment.
[0007] Determine the version sequence corresponding to the target environment based on the production launch date;
[0008] Execute the version production control process corresponding to the version sequence, and complete the instantiation of the version production process.
[0009] The step of determining the version sequence corresponding to the target environment based on the production launch date includes:
[0010] The grayscale version sequence corresponding to the grayscale environment is determined based on the production launch date; or, the official version sequence corresponding to the official environment is determined based on the production launch date.
[0011] The execution of the version deployment control process corresponding to the version sequence includes:
[0012] Execute the version production control process corresponding to the grayscale version sequence; or, execute the version production control process corresponding to the official version sequence.
[0013] The execution of the version deployment control process corresponding to the official version sequence includes:
[0014] Based on whether the query results for the official version are found, the corresponding version production control strategy is determined; the version production control strategy includes: a first version production control strategy that only involves grayscale versions in production, and a second version production control strategy that at least involves the official version in production.
[0015] The continuous delivery version deployment control method further includes:
[0016] If the first version production control strategy is implemented, the grayscale version sequence is queried using the grayscale date range.
[0017] The continuous delivery version deployment control method further includes:
[0018] If the grayscale date range is determined to be empty, then this is confirmed as the official release.
[0019] The continuous delivery version deployment control method further includes:
[0020] If the grayscale date range is determined to be non-empty, then the version to be put into production is determined to be an overlay version, and production is carried out according to the overlay version; the overlay version is: the production version obtained by overlaying the gray-to-offline version sequence and the official version sequence.
[0021] The execution of the version deployment control process corresponding to the grayscale version sequence includes:
[0022] In response to the user's selected grayscale version deployment process, execute the version deployment control process corresponding to the grayscale version sequence.
[0023] Specifically, in the execution of the version deployment control process corresponding to the official version sequence, the continuous delivery version deployment control method further includes:
[0024] Based on the preset version automatic selection strategy, the production version corresponding to the production control process of the official version sequence is selected.
[0025] The step of automatically selecting the production version corresponding to the production control process of the official version sequence according to the preset version selection strategy includes:
[0026] If there is no official version before the gray-to-offline conversion date and no official version on the gray-to-offline conversion date, the production version corresponding to the gray-to-offline version sequence queried using the gray-to-offline date range is selected as follows: For the full version, the last version of the gray-to-offline version sequence is selected according to the production date; and for the incremental version, the version sequence is sorted according to the version compilation number, and the last version of the superimposed incremental gray-to-offline version is obtained according to the version sequence sorting.
[0027] The step of automatically selecting the production version corresponding to the production control process of the official version sequence according to the preset version selection strategy includes:
[0028] If there is no official version before the gray-to-offline conversion date, and there is an official version on the gray-to-offline conversion date, then the production version corresponding to the one determined to be the official version for production is selected as follows: for full version, select the last version in the official version sequence according to the production date; and for incremental version, give the version sequence sorting according to the version compilation number, and obtain the last version of the superimposed incremental official version according to the version sequence sorting.
[0029] The step of automatically selecting the production version corresponding to the production control process of the official version sequence according to the preset version selection strategy includes:
[0030] If there is an official version in production and there is no gray-to-offline version, then the production version corresponding to the one that is determined to be an official version in production is selected as follows: for the full version, select the last version in the official version sequence according to the production date; and for the incremental version, sort the version sequence according to the version compilation number, and obtain the last version of the incremental official version based on the version sequence sort.
[0031] The step of automatically selecting the production version corresponding to the production control process of the official version sequence according to the preset version selection strategy includes:
[0032] If there is an official version before the gray-to-offline conversion, then the version selected for this production launch will be the superimposed version. The production launch version will be based on the superimposed version. The corresponding production launch version is: perform gray-to-offline conversion in advance, and use the gray-to-offline conversion superimposed with the official version for production. The final version will be selected in this way.
[0033] On one hand, the present invention proposes a continuous delivery version production control device, comprising:
[0034] The first determining unit is used to determine the target environment for version deployment; the target environment includes a grayscale environment or a production environment.
[0035] The second determining unit is used to determine the version sequence corresponding to the target environment based on the production launch date;
[0036] The control unit is used to execute the version production control process corresponding to the version sequence and to complete the instantiation of the version production process.
[0037] In another aspect, embodiments of the present invention provide an electronic device, including: a processor, a memory, and a bus, wherein,
[0038] The processor and the memory communicate with each other via the bus;
[0039] The memory stores program instructions that can be executed by the processor, and the processor can execute the following methods by calling the program instructions:
[0040] Determine the target environment for production deployment; the target environment may be a grayscale environment or a production environment.
[0041] Determine the version sequence corresponding to the target environment based on the production launch date;
[0042] Execute the version production control process corresponding to the version sequence, and complete the instantiation of the version production process.
[0043] This invention provides a non-transitory computer-readable storage medium, comprising:
[0044] The non-transitory computer-readable storage medium stores computer instructions that cause the computer to perform the following methods:
[0045] Determine the target environment for production deployment; the target environment may be a grayscale environment or a production environment.
[0046] Determine the version sequence corresponding to the target environment based on the production launch date;
[0047] Execute the version production control process corresponding to the version sequence, and complete the instantiation of the version production process.
[0048] The continuous delivery version production control method and apparatus provided in this invention determine the target environment for version production; the target environment includes a grayscale environment or a formal environment; determine the version sequence corresponding to the target environment according to the production date; execute the version production control process corresponding to the version sequence, and complete the version production process instantiation. This can reduce manual operation, improve automation, thereby improving efficiency, and effectively control version production risks. Attached Figure Description
[0049] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort. In the drawings:
[0050] Figure 1 This is a flowchart illustrating a continuous delivery version production control method provided in an embodiment of the present invention.
[0051] Figure 2This is a flowchart illustrating a continuous delivery version production control method provided in another embodiment of the present invention.
[0052] Figure 3 This is a schematic diagram of the modular structure of the continuous delivery version production control method provided in the embodiments of the present invention.
[0053] Figure 4 This is a schematic diagram of the continuous delivery version production control device provided in an embodiment of the present invention.
[0054] Figure 5 This is a schematic diagram of the physical structure of an electronic device provided in an embodiment of the present invention. Detailed Implementation
[0055] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the embodiments of the present invention will be further described in detail below with reference to the accompanying drawings. Here, the illustrative embodiments and descriptions of the present invention are used to explain the present invention, but are not intended to limit the present invention. It should be noted that, unless otherwise specified, the embodiments and features in the embodiments of this application can be arbitrarily combined with each other.
[0056] Figure 1 This is a flowchart illustrating a continuous delivery version deployment control method according to an embodiment of the present invention, as shown below. Figure 1 As shown, the continuous delivery version deployment control method provided in this embodiment of the invention includes:
[0057] Step S1: Determine the target environment for version deployment; the target environment includes a grayscale environment or a production environment.
[0058] Step S2: Determine the version sequence corresponding to the target environment based on the production launch date.
[0059] Step S3: Execute the version production control process corresponding to the version sequence, and complete the instantiation of the version production process.
[0060] In step S1 above, the device determines the target environment for version deployment; the target environment includes a grayscale environment or a production environment. The device can be a computer device executing the method. A grayscale environment refers to a grayscale version created from a grayscale branch. A grayscale branch is a branch used for grayscale releases and must include the "gray" flag in its name.
[0061] The production environment is the version calculated by combining the production grayscale version (becoming official) and the production version. This branch is used for official (without grayscale release) releases and does not need to include the "gray" flag in its name.
[0062] like Figure 2As shown, users select the deployment type, and the data dictionary is divided into gray-scale environment and production environment. This is mainly used to distinguish the target environment for production deployment, and can be used to distinguish between gray-scale production deployment and production deployment (including gray-to-offline conversion).
[0063] If the user selects the deployment type as grayscale environment, then the target environment for the version deployment will be the grayscale environment.
[0064] If the user selects the deployment type as production environment, then the target environment for the version deployment will be the production environment.
[0065] In step S2 above, the device determines the version sequence corresponding to the target environment based on the production launch date. Further, determining the version sequence corresponding to the target environment based on the production launch date includes:
[0066] The grayscale version sequence corresponding to the grayscale environment is determined based on the production launch date; or, the official version sequence corresponding to the official environment is determined based on the production launch date. (Refer to...) Figure 2 You can use the production launch date to query the grayscale version sequence, or use the production launch date to query the official version sequence.
[0067] In step S3 above, the device executes the version production control process corresponding to the version sequence and completes the instantiation of the version production process.
[0068] Furthermore, the execution of the version deployment control process corresponding to the version sequence includes:
[0069] Execute the version production control process corresponding to the grayscale version sequence; or, execute the version production control process corresponding to the official version sequence.
[0070] Furthermore, the execution of the version deployment control process corresponding to the grayscale version sequence includes:
[0071] In response to the user-selected grayscale version deployment process, the version deployment control process corresponding to the grayscale version sequence is executed. Figure 3 The steps for users to select the production deployment process are described below. The production deployment control process corresponding to the grayscale version sequence is the existing control process and will not be repeated here.
[0072] Furthermore, the execution of the version deployment control process corresponding to the official version sequence includes:
[0073] Based on whether the official version was found in the query results, the corresponding version deployment control strategy is determined. This strategy includes: a first-version deployment control strategy where the deployment version only involves a grayscale version, and a second-version deployment control strategy where the deployment version involves at least an official version. (Refer to...) Figure 2The first version's production control strategy corresponds to: this time, only the gray-scale to official production will be carried out, and the final production version will only involve the gray-scale version.
[0074] The second version's production control strategy corresponds to the following: This involves the production of the official version, and the final production version must be overlaid with the official version. It must involve at least the official version, and can include both gray-to-offline (or gray-to-offline) and official version overlays.
[0075] Furthermore, the continuous delivery version deployment control method also includes:
[0076] If the first version's production control strategy is implemented, then the grayscale version sequence is queried using the grayscale date range. That is, corresponding to... Figure 3 In the example, grayscale date ranges are used to query grayscale versions.
[0077] Furthermore, the continuous delivery version deployment control method also includes:
[0078] If the grayscale date range is determined to be empty, then this is confirmed as a production release of the official version. Figure 3 If the grayscale date range is found to be empty, then this is considered a production release of the official version, and it does not involve a grayscale to official release conversion.
[0079] Furthermore, the continuous delivery version deployment control method also includes:
[0080] If the grayscale date range is determined to be non-empty, then the version to be released in production is determined to be an overlay version, and production is carried out based on the overlay version; the overlay version is: the production version obtained by overlaying the gray-to-offline version sequence and the official version sequence. Figure 3 If the grayscale date range is not empty, it is determined that this involves gray-to-positive conversion and formal production. The final production version needs to be calculated by superimposing the two sequences.
[0081] Based on the control rules for each of the above branches and the application-level deployment process provided by the user, the production process instantiation is completed, thus completing the production handover and production process generation work.
[0082] Furthermore, in the execution of the version deployment control process corresponding to the official version sequence, the continuous delivery version deployment control method further includes:
[0083] Based on the preset version automatic selection strategy, the production version corresponding to the production control process of the official version sequence is selected.
[0084] Furthermore, the step of automatically selecting the production version corresponding to the production control process of the official version sequence according to the preset version selection strategy includes:
[0085] If there is no official version before the gray-to-offline conversion date, and no official version on the gray-to-offline conversion date, then the production version corresponding to the gray-scale version sequence queried using the gray-scale date range is selected as follows: For the full version, the last version in the gray-scale version sequence is selected according to the production date; for incremental versions, the version sequence is sorted according to the version compilation number, and the last version with superimposed incremental gray-scale versions is obtained according to the version sequence sorting. This embodiment corresponds to... Figure 2 Step 10 in the process.
[0086] Furthermore, the step of automatically selecting the production version corresponding to the production control process of the official version sequence according to the preset version selection strategy includes:
[0087] If there is no official version before the gray-to-offline conversion date, and an official version is available on the gray-to-offline conversion date, then the production version corresponding to the confirmed official version release is selected as follows: for full releases, the last version in the official version sequence is selected based on the production date; for incremental releases, the version sequence is sorted according to the version compilation number, and the last version superimposed with the incremental official versions is obtained based on the version sequence sorting. This embodiment corresponds to... Figure 2 Step 8 in the process.
[0088] Furthermore, the step of automatically selecting the production version corresponding to the production control process of the official version sequence according to the preset version selection strategy includes:
[0089] If a formal version is released for production, and there is no gray-to-offline (GLA) version, then the production version corresponding to the confirmed formal release is selected as follows: for full releases, the last version in the formal release sequence is selected based on the release date; for incremental releases, the version sequence is sorted according to the version compilation number, and the last version superimposed with the incremental formal releases is obtained based on the version sequence sorting. This embodiment corresponds to... Figure 2 Step 8 in the process.
[0090] Furthermore, the step of automatically selecting the production version corresponding to the production control process of the official version sequence according to the preset version selection strategy includes:
[0091] If there is a formal version before the gray-to-form version conversion, then the version selected for production is the overlay version, and production is carried out according to the overlay version. The corresponding production version is: gray-to-form version conversion is performed in advance, and production is carried out by overlaying the gray-to-form version with the formal version. The final version is selected in this way. This embodiment corresponds to... Figure 2 Step 9 in the process.
[0092] The following is combined Figure 2 The method flow of the embodiments of the present invention will be fully described as follows:
[0093] Step 1: The user selects the deployment type. The data dictionary is divided into gray-scale environment and production environment. This is mainly used to distinguish the target environment for production deployment. Based on this, it is possible to distinguish between gray-scale production deployment and production deployment of the official version (including gray-to-offline conversion).
[0094] Step 2: If the user selected a grayscale environment as the deployment type in Step 1, the system will use the production launch date to query the grayscale version sequence.
[0095] Step 3: Users select the production process.
[0096] Step 4: If the user selected "production environment" as the deployment type in Step 1, the system will use the production date to query the production version sequence.
[0097] Step 5: Based on the query results from Step 4, the system determines whether a version has been found.
[0098] Step 6: If the result of step 5 is "yes", the system determines that this involves the production of the official version, and the final production version needs to be overlaid with the official version.
[0099] Step 7: The system determines whether the grayscale date range is empty.
[0100] Step 8: If the result of step 7 is yes, the system determines that this is the official version being put into production and does not involve the gray-to-offline conversion.
[0101] If the result of step 7 is negative, the system determines that this involves both gray-to-green conversion and formal production. The final production version needs to be calculated by superimposing the two sequences.
[0102] Step 10: If the version cannot be found in Step 5, this step will only proceed from gray to production, and the final production version will only involve the gray version.
[0103] Step 11: Use grayscale date range to query grayscale version sequence
[0104] Step 12, based on the judgments and information from the above branches, uses the system's built-in rules ( Figure 3 (Detailed explanation), along with the application-level deployment process provided by the user, completes the instantiation of the production deployment process. This concludes the generation of the production handover and deployment process system.
[0105] The continuous delivery version deployment control method provided in this invention can be implemented based on a modular approach, specifically including: a branch management module, a version building module, a version delivery module, and a production handover and deployment module, which are described below:
[0106] The branch management module is used to generate code branches and manage code synchronization between branches.
[0107] Determine the naming rules for the release branches used in the canary release phase:
[0108] 1. Branches used for canary releases must include the "gray" flag in their names.
[0109] 2. For branches used in official (without grayscale release) releases, the "gray" flag does not need to be included in the name.
[0110] The version build module is used to build and package code into versions for subsequent delivery and production deployment.
[0111] In the version building module, a version flag is generated based on the branch flag, which serves as the basis for the subsequent automatic version selection algorithm.
[0112] 1. Add a "grayscale flag" item to the version information table.
[0113] Grayscale flags are used for version deployment system identification.
[0114] Grayscale: This version will first be deployed in a grayscale environment, and then transitioned to the official production environment after the grayscale phase.
[0115] Official release: This version will not be released in a gray-scale environment, but will be released directly to the production environment.
[0116] 2. The function of automatically adding grayscale indicators to the generated versions according to rules during version building:
[0117] 1) Branches named with the "gray" flag will generate versions with grayscale indicators.
[0118] 2) If the branch name does not include the "gray" flag, the generated version will be grayscale, indicating it is the official version.
[0119] 3. Add a grayscale indicator to the continuous building module system page.
[0120] The version delivery module is used to deliver versions to production for production deployment.
[0121] 1. Delivery rules have been adjusted to support delivery of versions with the same version number but different grayscale flags.
[0122] 2. The delivery version information page has been optimized, and gray-scale release information has been added.
[0123] Production handover and commissioning module: The core module of the continuous delivery system, which combines the developed version with a certain commissioning process to complete the functional commissioning.
[0124] The embodiments of the present invention include a production handover and commissioning module that generates a commissioning process, an automatic version selection algorithm, and a supporting verification mechanism.
[0125] 1. Supports two production deployment pipelines: grayscale and official. The grayscale production deployment pipeline is used to deploy grayscale versions to grayscale environments, while the official production deployment pipeline is used to deploy both grayscale and official versions to official environments. The production deployment process generation algorithm is as follows: Figure 2 As shown.
[0126] 2. Verification mechanism: Gray-scale environments can install gray-scale versions. Normal service environments can install official versions or transition versions.
[0127] 3. Automatic version selection algorithm: This algorithm will be used to automatically select the version, as described in the above embodiments.
[0128] The embodiments of the present invention have the following advantages:
[0129] Based on the addition of grayscale and official version markers, an automated system adapted for continuous integration version delivery and production launch is designed and established. In particular, the production launch process uses grayscale markers to control the grayscale and grayscale-to-offline dual production launch process.
[0130] 1. Grayscale markers are automatically generated according to rules, simplifying user registration and maintenance costs.
[0131] 2. The dual production process control of grayscale and gray-to-positive phase, coupled with automation methods, reduces user operation, minimizes problems, and improves the success rate of production.
[0132] 3. Based on established rules, automatically classify and calculate the version to be put into production in the current period, avoiding the risks and problems caused by manual selection in the past.
[0133] The continuous delivery version production control method provided in this invention determines the target environment for version production; the target environment includes a gray-scale environment or a production environment; determines the version sequence corresponding to the target environment according to the production date; executes the version production control process corresponding to the version sequence, and completes the instantiation of the version production process. This method can reduce manual operations, improve automation, thereby improving efficiency, and effectively control version production risks.
[0134] It should be noted that the continuous delivery version production control method provided in this embodiment of the invention can be used in the financial field, or in any technical field other than the financial field. This embodiment of the invention does not limit the application field of the continuous delivery version production control method.
[0135] Figure 4 This is a schematic diagram of the continuous delivery version production control device provided in an embodiment of the present invention, as shown below. Figure 4 As shown, the continuous delivery version production control device provided in this embodiment of the invention includes a first determining unit 401, a second determining unit 402, and a control unit 403, wherein:
[0136] The first determining unit 401 is used to determine the target environment for version production; the target environment includes a grayscale environment or a formal environment; the second determining unit 402 is used to determine the version sequence corresponding to the target environment according to the production date; the control unit 403 is used to execute the version production control process corresponding to the version sequence and complete the version production process instantiation.
[0137] Specifically, the first determining unit 401 in the device is used to determine the target environment for version production; the target environment includes a grayscale environment or a formal environment; the second determining unit 402 is used to determine the version sequence corresponding to the target environment according to the production date; the control unit 403 is used to execute the version production control process corresponding to the version sequence and complete the instantiation of the version production process.
[0138] The continuous delivery version production control device provided in this embodiment of the invention determines the target environment for version production; the target environment includes a grayscale environment or a formal environment; determines the version sequence corresponding to the target environment according to the production date; executes the version production control process corresponding to the version sequence, and completes the instantiation of the version production process. This can reduce manual operation, improve the degree of automation, thereby improving efficiency, and effectively control the risks of version production.
[0139] The embodiments of the present invention provide a continuous delivery version production control device that can be used to execute the processing flow of the above method embodiments. Its functions will not be repeated here, but can be referred to the detailed description of the above method embodiments.
[0140] Figure 5 This is a schematic diagram of the physical structure of an electronic device provided in an embodiment of the present invention, such as... Figure 5 As shown, the electronic device includes: a processor 501, a memory 502, and a bus 503;
[0141] The processor 501 and the memory 502 communicate with each other via the bus 503.
[0142] The processor 501 is used to call program instructions in the memory 502 to execute the methods provided in the above-described method embodiments, including, for example:
[0143] Determine the target environment for version deployment; the target environment includes a grayscale environment or a production environment; determine the version sequence corresponding to the target environment based on the deployment date; execute the version deployment control process corresponding to the version sequence, and complete the instantiation of the version deployment process.
[0144] This embodiment discloses a computer program product, which includes a computer program stored on a non-transitory computer-readable storage medium. The computer program includes program instructions, and when the program instructions are executed by a computer, the computer can perform the methods provided in the above-described method embodiments, such as:
[0145] Determine the target environment for version deployment; the target environment includes a grayscale environment or a production environment; determine the version sequence corresponding to the target environment based on the deployment date; execute the version deployment control process corresponding to the version sequence, and complete the instantiation of the version deployment process.
[0146] This embodiment provides a computer-readable storage medium storing a computer program that causes the computer to execute the methods provided in the above-described method embodiments, including, for example:
[0147] Determine the target environment for version deployment; the target environment includes a grayscale environment or a production environment; determine the version sequence corresponding to the target environment based on the deployment date; execute the version deployment control process corresponding to the version sequence, and complete the instantiation of the version deployment process.
[0148] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, systems, or computer program products. Therefore, the present invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0149] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0150] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0151] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0152] In the description of this specification, the references to terms such as "an embodiment," "a specific embodiment," "some embodiments," "for example," "example," "specific example," or "some examples," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of the invention. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples.
[0153] The specific embodiments described above further illustrate the purpose, technical solution, and beneficial effects of the present invention. It should be understood that the above descriptions are merely specific embodiments of the present invention and are not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.
Claims
1. A method for controlling the deployment of continuous delivery versions, characterized in that, include: Determine the target environment for version deployment; Determine the version sequence corresponding to the target environment based on the production launch date; Execute the version production control process corresponding to the version sequence, and complete the instantiation of the version production process; Wherein, when the target environment includes a production environment, determining the version sequence corresponding to the target environment based on the production launch date includes: Determine the official version sequence corresponding to the official environment based on the production launch date; The execution of the version deployment control process corresponding to the version sequence includes: Execute the version deployment control process corresponding to the official version sequence; The execution of the version deployment control process corresponding to the official version sequence includes: Based on whether the query results for the official version are found, the corresponding version production control strategy is determined; the version production control strategy includes: a first version production control strategy that only involves grayscale versions in production, and a second version production control strategy that at least involves the official version in production. The continuous delivery version deployment control method also includes: If the first version production control strategy is implemented, then the grayscale version sequence is queried using the grayscale date range; In the execution of the version deployment control process corresponding to the official version sequence, the continuous delivery version deployment control method further includes: Based on the preset version automatic selection strategy, select the production version corresponding to the version production control process corresponding to the official version sequence; The step of automatically selecting the production version corresponding to the production control process of the official version sequence according to the preset version selection strategy includes: If there is no official version before the gray-to-offline conversion date and no official version on the gray-to-offline conversion date, then the production version determined by the gray-to-offline version sequence is selected by querying the gray-to-offline date range. For the full version, the last version of the gray-to-offline version sequence is selected according to the production date. For the incremental version, the version sequence is sorted according to the version compilation number, and the last version with superimposed incremental gray-to-offline versions is obtained according to the version sequence sorting.
2. The continuous delivery version deployment control method according to claim 1, characterized in that, When the target environment includes a grayscale environment, determining the version sequence corresponding to the target environment based on the production launch date includes: The grayscale version sequence corresponding to the grayscale environment is determined based on the production launch date.
3. The continuous delivery version deployment control method according to claim 2, characterized in that, When the target environment includes a grayscale environment, the execution of the version deployment control process corresponding to the version sequence includes: Execute the version deployment control process corresponding to the grayscale version sequence.
4. The continuous delivery version production control method according to claim 3, characterized in that, The continuous delivery version deployment control method also includes: If the grayscale date range is determined to be empty, then this production version is determined to be the official production version.
5. The continuous delivery version production control method according to claim 4, characterized in that, The continuous delivery version deployment control method also includes: If the grayscale date range is determined to be non-empty, then the version to be put into production is determined to be an overlay version, and production is carried out according to the overlay version; the overlay version is: the production version obtained by overlaying the gray-to-offline version sequence and the official version sequence.
6. The continuous delivery version deployment control method according to claim 3, characterized in that, The execution of the version deployment control process corresponding to the grayscale version sequence includes: In response to the user's selected grayscale version deployment process, execute the version deployment control process corresponding to the grayscale version sequence.
7. The continuous delivery version production control method according to claim 4, characterized in that, The step of automatically selecting the production version corresponding to the version production control process corresponding to the official version sequence according to the preset version selection strategy includes: If there is no official version before the gray-to-offline conversion date, and there is an official version on the gray-to-offline conversion date, then the production version corresponding to the official version is selected. For full versions, the last version in the official version sequence is selected according to the production date. For incremental versions, the version sequence is sorted according to the version compilation number, and the last version of the superimposed incremental official version is obtained according to the version sequence sort.
8. The continuous delivery version production control method according to claim 4, characterized in that, The step of automatically selecting the production version corresponding to the version production control process corresponding to the official version sequence according to the preset version selection strategy includes: If there is an official version in production and there is no gray-to-offline version, then select the production version corresponding to the official version. For full versions, select the last version in the official version sequence according to the production date. For incremental versions, sort the version sequence according to the version compilation number and obtain the last version of the superimposed incremental official version according to the version sequence.
9. The continuous delivery version deployment control method according to claim 5, characterized in that, The step of automatically selecting the production version corresponding to the version production control process corresponding to the official version sequence according to the preset version selection strategy includes: If there is an official version before the gray-to-offline conversion, then the version to be put into production this time will be selected as the overlay version. Production will be carried out based on the overlay version, and the gray-to-offline conversion process will be carried out in advance. The final version will be selected in this way.
10. A continuous delivery version production control device, characterized in that, include: The first determining unit is used to determine the target environment for version deployment; The second determining unit is used to determine the version sequence corresponding to the target environment based on the production launch date; The control unit is used to execute the version production control process corresponding to the version sequence and to complete the instantiation of the version production process. Wherein, when the target environment includes a formal environment, the second determining unit is specifically used to determine the formal version sequence corresponding to the formal environment based on the production launch date; The control unit is specifically used to execute the version production control process corresponding to the official version sequence. The control unit is further configured to: Based on whether the query results for the official version are found, the corresponding version production control strategy is determined; the version production control strategy includes: a first version production control strategy that only involves grayscale versions in production, and a second version production control strategy that at least involves the official version in production. If the first version production control strategy is implemented, then the grayscale version sequence is queried using the grayscale date range; Based on the preset version automatic selection strategy, select the production version corresponding to the version production control process corresponding to the official version sequence; The step of automatically selecting the production version corresponding to the production control process of the official version sequence according to the preset version selection strategy includes: If there is no official version before the gray-to-offline conversion date and no official version on the gray-to-offline conversion date, then the production version determined by the gray-to-offline version sequence is selected by querying the gray-to-offline date range. For the full version, the last version of the gray-to-offline version sequence is selected according to the production date. For the incremental version, the version sequence is sorted according to the version compilation number, and the last version with superimposed incremental gray-to-offline versions is obtained according to the version sequence sorting.
11. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, 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 9.
12. 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 9.
Citation Information
Patent Citations
Intelligent gray release commissioning method and device, computer equipment and storage medium
CN111949277A