Version file generation method and device, equipment and storage medium

By automatically generating and saving version files in the GitCI/CD pipeline in the financial field, the problem of manual creation of version files is solved, and the operation efficiency of pipelines and development and testing efficiency is improved.

CN119166202APending Publication Date: 2024-12-20PING AN TECH (SHENZHEN) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411280767.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-12
Publication Date
2024-12-20

AI Technical Summary

Technical Problem

In projects in the financial field, during the GitCI/CD-based pipeline process, manual creation of version files takes time and is easy to miss, resulting in failure in pipeline operation and low efficiency.

Method used

Before the pipeline is run, by obtaining and executing the preset executable script file, the current version file corresponding to the pipeline is automatically generated and saved in the preset target directory for automatic detection when the pipeline is run.

Benefits of technology

Improves the efficiency of pipeline operation, avoids the steps of manual inspection and manual addition of version files, reduces the risk of pipeline failure, and simplifies the development and testing process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119166202A_ABST
    Figure CN119166202A_ABST
Patent Text Reader

Abstract

The invention relates to the field of finance, and provides a version file generation method and device, equipment and a storage medium, and the method comprises the steps: obtaining a preset executable script file before an assembly line runs; executing the script file, and generating a version file of a current version corresponding to the assembly line; and storing the generated version file in a preset target directory, so as to carry out assembly line operation based on the version file stored in the preset target directory, thereby realizing automatic detection passing through the assembly line, and omitting the operation of manually checking the version file, thereby improving the assembly line operation efficiency. The invention further relates to a block chain technology, and the script file and the version file can be stored in the block chain node.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the financial field, and in particular to a version file generation method, device, equipment and storage medium. Background Art

[0002] At present, the code deployment of most projects is completed based on the GitCI / CD (GitLab Continuous Integration / Continuous Deployment) process. Taking projects in the financial field as an example, in the process of running pipelines, version files are essential to distinguish versions and ensure security. The version file name corresponds to the current version name. The version file is generally stored in a fixed directory of the source code for pipeline detection. Every time a new version starts development, the developer usually manually creates a version file and then stores it in a fixed directory, which is time-consuming and inefficient. In addition, if the developer forgets to create a version file, the pipeline will fail to run. Only by manually adding the current version of the version file and then submitting the code to re-run the pipeline, it will take a lot of time and be very inefficient.

[0003] Therefore, how to improve the efficiency of assembly line operation has become an urgent problem to be solved. Summary of the invention

[0004] The present application provides a version file generation method, apparatus, device and storage medium, aiming to automatically generate a version file of the current version corresponding to a pipeline, thereby improving the efficiency of pipeline operation.

[0005] To achieve the above purpose, the present application provides a version file generation method, the version file generation method comprising:

[0006] Before the pipeline runs, obtain the preset executable script file;

[0007] Execute the script file to generate a version file of the current version corresponding to the pipeline;

[0008] The generated version file is saved in a preset target directory, so as to allow the pipeline to be run based on the version file saved in the preset target directory.

[0009] Optionally, executing the script file to generate a version file of the current version corresponding to the pipeline includes:

[0010] Execute the script file to obtain pipeline injection information, wherein the pipeline injection information includes a pipeline version number;

[0011] The version file is generated according to the pipeline injection information.

[0012] Optionally, before the pipeline is run, before obtaining a preset executable script file, the process includes:

[0013] Configure the script file and execute the command of the script file;

[0014] The executing the script file to generate a version file of the current version corresponding to the pipeline includes:

[0015] Execute the command, run the script file, and generate the version file.

[0016] Optionally, before the pipeline runs, obtaining a preset executable script file includes:

[0017] Before the pipeline runs, the script file is obtained based on a preset file name, wherein the file name of the script file is configured as the preset file name.

[0018] Optionally, the step of saving the generated version file in a preset target directory for performing the pipeline operation based on the version file saved in the preset target directory comprises:

[0019] When the pipeline is tested and verified, obtaining version related information;

[0020] The version related information is displayed on the detection page.

[0021] Optionally, the version-related information includes statistical information corresponding to the script file, and displaying the version-related information in the detection page includes:

[0022] The statistical information is displayed in the detection page, wherein the statistical information includes script execution time.

[0023] Optionally, the version-related information includes pipeline injection information, and displaying the version-related information in the detection page includes:

[0024] The pipeline injection information is displayed in the detection page, wherein the pipeline injection information includes a pipeline version number.

[0025] In addition, to achieve the above purpose, the present application also provides a version file generation device, the version file generation device comprising:

[0026] The acquisition module is used to obtain the preset executable script file before the pipeline runs;

[0027] A processing module, used for executing the script file and generating a version file of the current version corresponding to the pipeline;

[0028] A saving module is used to save the generated version file in a preset target directory for the pipeline operation based on the version file saved in the preset target directory.

[0029] In addition, to achieve the above-mentioned purpose, the present application also provides a computer device, the computer device comprising a memory and a processor;

[0030] The memory is used to store computer programs;

[0031] The processor is used to execute the computer program and implement the version file generation method as described above when executing the computer program.

[0032] In addition, to achieve the above-mentioned purpose, the present application also provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the above-mentioned version file generation method are implemented.

[0033] The present application discloses a version file generation method, device, equipment and storage medium. Before the pipeline runs, a preset executable script file is obtained, the script file is executed, a version file of the current version corresponding to the pipeline is generated, and the generated version file is saved in a preset target directory. Therefore, there is no need to manually check whether the version file is missed. When the pipeline runs, automatic detection of passing the pipeline is realized, thereby improving the efficiency of the pipeline operation. BRIEF DESCRIPTION OF THE DRAWINGS

[0034] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0035] Figure 1 It is a schematic flow chart of the steps of a version file generation method provided in an embodiment of the present application;

[0036] Figure 2 It is a schematic flow chart of the steps of executing the script file to generate a version file of the current version corresponding to the pipeline provided by an embodiment of the present application;

[0037] Figure 3 is a schematic flow chart of the steps of another version file generation method provided in an embodiment of the present application;

[0038] Figure 4It is a schematic diagram of the operation and testing process of a pipeline provided in an embodiment of the present application;

[0039] Figure 5 is a schematic block diagram of a version file generating device provided in an embodiment of the present application;

[0040] Figure 6 It is a schematic block diagram of the structure of a computer device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0041] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0042] The flowcharts shown in the accompanying drawings are only examples and do not necessarily include all the contents and operations / steps, nor must they be executed in the order described. For example, some operations / steps may also be decomposed, combined or partially merged, so the actual execution order may change according to actual conditions.

[0043] It should be understood that the terms used in this application specification are only for the purpose of describing specific embodiments and are not intended to limit the application. As used in this application specification and the appended claims, unless the context clearly indicates otherwise, the singular forms "a", "an" and "the" are intended to include plural forms.

[0044] It should also be understood that the term “and / or” used in the specification and appended claims refers to any and all possible combinations of one or more of the associated listed items, and includes these combinations.

[0045] At present, the code deployment of most projects is completed based on the GitCI / CD process. Taking projects in the financial field as an example, in the process of running pipelines, version files are indispensable in order to distinguish versions and ensure security. The version file name corresponds to the current version name. The version file is generally stored in a fixed directory of the source code for pipeline detection. Every time a new version is developed, the developer usually creates the version file manually and then stores it in a fixed directory, which is time-consuming and inefficient. In addition, if the developer forgets to create the version file, the pipeline will fail to run. Only by manually adding the current version of the version file and then submitting the code to re-run the pipeline, it will take more time and be very inefficient.

[0046] In addition, when the pipeline is successfully released and needs to be tested and verified, sometimes the tester cannot determine whether the online code is the latest code based on the page, and judge whether the latest code is effective. The general solution is to force refresh the page or check the latest submitted content for verification, which requires confirmation with the developer. This also brings great inconvenience to the test and affects the work efficiency of developers and testers.

[0047] In order to solve the above problems, the embodiments of the present application provide a version file generation method, apparatus, device and storage medium for automatically generating a version file of the current version corresponding to the pipeline, thereby improving the efficiency of the pipeline operation.

[0048] See also Figure 1 , Figure 1 1 is a flow chart of a method for generating a version file provided in an embodiment of the present application. The method can be applied to a computer device, and the application scenario of the method is not limited in the present application.

[0049] like Figure 1 As shown, the version file generation method specifically includes steps S101 to S103.

[0050] S101. Before the pipeline runs, obtain a preset executable script file.

[0051] Taking the financial field as an example, for a pipeline corresponding to a certain financial-related project, in order to successfully run the pipeline, this application automatically generates a version file corresponding to the current version of the pipeline corresponding to the project by executing the corresponding executable script file. In the specific operation process, before the pipeline runs, the executable script file is first obtained.

[0052] It should be noted that the script file may be a universal script file, that is, the script file may be applicable not only to different pipelines corresponding to the same project, but also to different pipelines corresponding to different projects.

[0053] In some embodiments, before the pipeline runs and before obtaining a preset executable script file, it includes: configuring the script file and executing a command of the script file.

[0054] In the preliminary preparation work, the script file is first configured, including but not limited to the content of the script file, the file name of the script file, etc. Among them, the script file can be distinguished from other files by the file name of the script file.

[0055] Exemplarily, a preset file name that can be distinguished from the file names of other files is configured, and the file name of the script file is configured as the preset file name. For example, the preset file name is configured as build.js, so that based on the preset file name, the script file can be named build.js.

[0056] In some embodiments, obtaining a preset executable script file before the pipeline runs includes: obtaining the script file based on a preset file name before the pipeline runs, wherein the file name of the script file is configured as the preset file name.

[0057] For example, still taking the preset file name of the configuration listed above as build.js as an example, before the pipeline runs, based on the preset file name build.js, the corresponding script file is quickly and accurately obtained, which is not only efficient but also reliable.

[0058] In addition to configuring the script file, you also configure the command to execute the script file. The command is to execute the script file operation.

[0059] For example, if the script file is named build.js, the command for executing the script file can be configured as buildPrd: node build.js. The script file named build.js can be executed by executing the command buildPrd: node build.js.

[0060] Still taking the financial-related projects listed above as an example, before the pipeline runs, an additional executable script file is added to the project, and at the same time, an execution command is added to the project to execute the script file.

[0061] S102: Execute the script file to generate a version file of the current version corresponding to the pipeline.

[0062] For example, still taking the script file named build.js listed above as an example, by executing the script file named build.js, a version file of the current version corresponding to the generation pipeline is automatically created.

[0063] In some embodiments, executing the script file to generate a version file of the current version corresponding to the pipeline includes: executing the command to run the script file to generate the version file.

[0064] For example, still taking the script file named build.js and the command buildPrd: node build.js listed above as an example, by executing the command buildPrd: node build.js, the script file named build.js is run to automatically create a version file of the current version corresponding to the generation pipeline.

[0065] It should be noted that since the version file is indispensable in the process of running the pipeline, the command corresponding to the script file must be executed before the version file check, that is, to ensure that when the version file check is performed, the version file automatically generated by executing the command can be detected, thereby avoiding the failure of the pipeline operation.

[0066] In some embodiments, Figure 2 As shown, the step S102 may include sub-step S1021 and sub-step S1022.

[0067] S1021, executing the script file to obtain pipeline injection information, wherein the pipeline injection information includes a pipeline version number;

[0068] S1022. Generate the version file according to the pipeline injection information.

[0069] Exemplarily, before the pipeline runs, the required pipeline injection information is injected from the pipeline end, wherein the pipeline injection information includes but is not limited to the content of the project code branch, the name of the project code branch, the pipeline version number, etc.

[0070] Exemplarily, the name of the pipeline injection information is wrapped by a preset symbol, and then the corresponding pipeline injection information is sequentially obtained in the command line of the execution command in the code.

[0071] For example, the preset symbol is configured as ${}, and the name of the pipeline injection information is wrapped by ${}. For example, the pipeline injection information injected from the pipeline end is ${code branch, branch name, pipeline version number}.

[0072] Afterwards, when executing the script file, based on ${}, you can obtain the pipeline injection information such as the content of the project code branch wrapped in ${}, the name of the project code branch, the pipeline version number, etc., and then generate the version file corresponding to the current version of the pipeline based on the obtained pipeline injection information such as the content of the project code branch, the name of the project code branch, the pipeline version number, etc.

[0073] Exemplarily, the name of the generated version file can be named similarly to the naming method of the script file, that is, a preset file name is used to name the version file, so as to distinguish the automatically generated version file from other files.

[0074] For example, naming the generated version file directly with the pipeline version number is not only convenient and fast, but also accurate and reliable.

[0075] S103: Save the generated version file in a preset target directory, so as to allow the pipeline to run based on the version file saved in the preset target directory.

[0076] After the version file of the current version corresponding to the pipeline is automatically generated, the version file is saved in a preset target directory. The preset target directory may be a directory specified by the project compilation file, and the version file of the current version corresponding to the automatically generated pipeline is saved in the directory specified by the compilation file.

[0077] In this way, when the pipeline is running, since the version file of the current version corresponding to the pipeline is automatically generated, there is no need to manually check whether the version file is missed, thereby realizing automatic detection through the pipeline and avoiding pipeline operation failure.

[0078] In addition, generating version files on the server side also reduces redundant files in the project code and does not need to be saved on the client side, thereby reducing the storage burden on the client side.

[0079] From the above processing method, it can be seen that in this application, a custom executable script file is executed by executing a custom command. According to the pipeline injection information, the version file of the current version corresponding to the pipeline is dynamically generated and written into the required directory, which saves unnecessary operations and the trouble of re-running the pipeline for the development process, and reduces redundant files in the project.

[0080] In some embodiments, Figure 3 As shown, step S103 may include step S104 and step S105.

[0081] S104, obtaining version-related information when the pipeline is tested and verified;

[0082] S105: Displaying the version-related information on the detection page.

[0083] Exemplarily, the version-related information includes but is not limited to pipeline injection information and statistical information corresponding to the script file. The pipeline injection information is as described above, including but not limited to the content of the project code branch, the name of the project code branch, the pipeline version number, etc., and the required pipeline injection information can be injected from the pipeline end.

[0084] In addition to pipeline injection information, you can also customize statistical information in the script file, where the statistical information includes but is not limited to the script execution time, such as start time, end time, etc.

[0085] In addition, a detection page is added to the project to display version-related information. For example, when the pipeline is successfully released and needs to be tested and verified, the version-related information is obtained, and then the obtained version-related information is displayed on the detection page.

[0086] In some embodiments, displaying the version-related information in the detection page includes: displaying the pipeline injection information in the detection page, wherein the pipeline injection information includes the pipeline version number.

[0087] The pipeline injection information can not only be used to generate the version file of the current version corresponding to the pipeline, but also can be used directly in the project because the generated version file is directly placed in the preset target directory (such as the directory specified by the project compilation file). Exemplarily, a specified detection page is created in the project page. The detection page is used to display the pipeline injection information when the pipeline is successfully released and needs to be tested and verified. For example, the detection page displays the content of the project code branch, the name of the project code branch, the pipeline version number, etc.

[0088] In some embodiments, displaying the version-related information in the detection page includes: displaying the statistical information in the detection page, wherein the statistical information includes script execution time.

[0089] Exemplarily, since in addition to the pipeline injection information, statistical information is also customized in the script file, when the pipeline is successfully released and needs to be tested and verified, the statistical information can be displayed in the detection page based on the statistical information customized in the script file.

[0090] For example, if the customized statistical information in the script file includes the script execution time, the script execution time will be recorded when the pipeline is running, and the recorded script execution time will be displayed on the detection page when the pipeline is successfully released and tested for verification.

[0091] In this way, the version-related information of the corresponding pipeline of the project in the current version can be viewed in real time through the display of the detection page. For example, the time of the last deployment can be viewed. In this way, testers no longer need to confirm with developers before testing. They can directly view the detection page to distinguish the content of the project code branch displayed on the detection page, and determine whether the online code is the latest deployed and effective code, thereby reducing the time-consuming and labor-intensive operation of testers confirming with developers due to uncertainty about whether the online code is the latest code. Therefore, the testing process is more complete and the work efficiency of developers and testers is improved.

[0092] Below, we take the pipeline operation and testing corresponding to a financial-related project as an example. Figure 4 As shown, the operation and testing process of the pipeline is as follows:

[0093] Step a. Start.

[0094] Step b: Determine the pipeline to be run in the project.

[0095] Step c: compile the code of the project code branch corresponding to the pipeline.

[0096] Step d, execute the pre-configured executable script file. Prior to this, configure the script file first, including but not limited to the content of the script file, the file name of the script file, etc. Among them, the script file can be distinguished from other files by the file name of the script file. For example, the script file can be named build.js. In addition, in addition to configuring the script file, the command to execute the script file is also configured, and the command is to execute the script file operation. For example, if the script file is named build.js, the command to execute the script file can be configured as buildPrd: nodebuild.js. The script file named build.js can be executed by executing the command buildPrd: node build.js.

[0097] Step e, read the pipeline injection information, wherein the pipeline injection information includes the content of the project code branch, the name of the project code branch, the pipeline version number, etc. Exemplarily, before the pipeline runs, the required pipeline injection information is injected from the pipeline end. In addition to the pipeline injection information, statistical information can also be customized in the script file, wherein the statistical information includes but is not limited to the script execution time, such as the start time, the end time, etc.

[0098] Step f: Create a generated version file and save it in a fixed directory. Exemplarily, the version file name is named after the pipeline version number.

[0099] Step g: determine whether the version file exists; if so, execute step h; if not, execute step j. It should be noted that since the version file is indispensable in the process of running the pipeline, the command corresponding to the script file must be executed before the version file check, that is, to ensure that the version file automatically generated by executing the command can be detected during the version file check, so as to avoid pipeline failure.

[0100] Step h: Pipeline release and regular deployment of online code.

[0101] Step i: pipeline test verification, display version-related information through the newly added inspection page. Version-related information includes but is not limited to the content of the project code branch, the name of the project code branch, the pipeline version number, the script execution time, etc.

[0102] Step j, end.

[0103] In view of the drawbacks of the existing processing method, in the pipeline running stage, it is necessary to manually add version files, and in the test verification stage when the pipeline is successfully released, it is necessary to manually refresh the corresponding page for pipeline testing. In order to solve the above problems, by executing a custom executable script file, according to the pipeline injection information, the version file of the current version corresponding to the pipeline is dynamically generated and written into a fixed directory, which saves unnecessary operations and the trouble of re-running the pipeline for the development process, and reduces redundant files in the project. In addition, when the pipeline is successfully released and needs to be tested and verified, the version-related information can be viewed in real time by checking the display of the detection page, such as the time of the last deployment, so that the tester no longer needs to confirm with the developer before testing, and can directly check the detection page to determine whether the online code is the latest deployed and effective code, thereby reducing the time-consuming and labor-intensive operation of the tester and the developer to confirm because of uncertainty whether the online code is the latest code. Therefore, the test process is more perfect and the work efficiency of developers and testers is improved.

[0104] In the above embodiment, before the pipeline runs, a preset executable script file is obtained, the script file is executed, a version file of the current version corresponding to the pipeline is generated, and the generated version file is saved in a preset target directory. Therefore, there is no need for manual checking to see if the version file is missed. When the pipeline runs, automatic detection of the pipeline is achieved, thereby improving the efficiency of the pipeline operation.

[0105] See also Figure 5 , Figure 5It is a schematic block diagram of a version file generation device provided in an embodiment of the present application. The version file generation device can be configured in a computer device to execute the aforementioned version file generation method.

[0106] like Figure 5 As shown, the version file generating device 1000 includes: an acquisition module 1001 , a processing module 1002 , and a storage module 1003 .

[0107] The acquisition module 1001 is used to acquire a preset executable script file before the pipeline runs;

[0108] The processing module 1002 is used to execute the script file to generate a version file of the current version corresponding to the pipeline;

[0109] The saving module 1003 is used to save the generated version file in a preset target directory for performing the pipeline operation based on the version file saved in the preset target directory.

[0110] In one embodiment, the processing module 1002 is further configured to:

[0111] Execute the script file to obtain pipeline injection information, wherein the pipeline injection information includes a pipeline version number;

[0112] The version file is generated according to the pipeline injection information.

[0113] In one embodiment, the version file generating device 1000 further includes a configuration module, which is used to:

[0114] Configure the script file and execute the command of the script file;

[0115] The processing module 1002 is further configured to:

[0116] Execute the command, run the script file, and generate the version file.

[0117] In one embodiment, the acquisition module 1001 is further used for:

[0118] Before the pipeline runs, the script file is obtained based on a preset file name, wherein the file name of the script file is configured as the preset file name.

[0119] In one embodiment, the version file generating device 1000 further includes a display module, which is used to:

[0120] When the pipeline is tested and verified, obtaining version related information;

[0121] The version related information is displayed on the detection page.

[0122] In one embodiment, the version-related information includes statistical information corresponding to the script file, and the display module is further used to:

[0123] The statistical information is displayed in the detection page, wherein the statistical information includes script execution time.

[0124] In one embodiment, the version-related information includes pipeline injection information, and the display module is further used to:

[0125] The pipeline injection information is displayed in the detection page, wherein the pipeline injection information includes a pipeline version number.

[0126] Among them, each module in the above-mentioned version file generation device 1000 corresponds to each step in the above-mentioned version file generation method embodiment, and its function and implementation process will not be repeated here one by one.

[0127] The version file generation device 1000 can execute the version file generation method provided in the embodiment of the present application, and therefore can achieve the beneficial effects that can be achieved by the version file generation method provided in the embodiment of the present application. Please refer to the previous embodiment for details and will not be repeated here.

[0128] The method and apparatus of the present application can be used in many general or special computer system environments or configurations. For example: personal computers, server computers, handheld or portable devices, tablet devices, multiprocessor systems, microprocessor-based systems, set-top boxes, programmable consumer electronic devices, network PCs, minicomputers, mainframe computers, distributed computing environments including any of the above systems or devices, etc. The present application can be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types. The present application can also be practiced in distributed computing environments, in which tasks are performed by remote processing devices connected through a communication network. In a distributed computing environment, program modules can be located in local and remote computer storage media including storage devices.

[0129] Exemplarily, the above method and apparatus may be implemented in the form of a computer program. The computer program may be implemented in the form of a computer program. Figure 6 Runs on the computer device shown.

[0130] See also Figure 6 , Figure 6 It is a schematic block diagram of the structure of a computer device provided in an embodiment of the present application.

[0131] See also Figure 6 The computer device includes a processor and a memory connected via a system bus, wherein the memory may include a non-volatile storage medium and an internal memory.

[0132] The processor is used to provide computing and control capabilities and support the operation of the entire computer equipment.

[0133] The internal memory provides an environment for the operation of the computer program in the non-volatile storage medium. When the computer program is executed by the processor, the processor can execute any version file generation method.

[0134] It should be understood that the processor may be a central processing unit (CPU), and the processor may also be other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. Among them, the general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.

[0135] In one embodiment, the processor is used to run a computer program stored in the memory to implement the following steps:

[0136] Before the pipeline runs, obtain the preset executable script file;

[0137] Execute the script file to generate a version file of the current version corresponding to the pipeline;

[0138] The generated version file is saved in a preset target directory, so as to allow the pipeline to be run based on the version file saved in the preset target directory.

[0139] In one embodiment, when the processor implements the execution of the script file and generates the version file of the current version corresponding to the pipeline, it is used to implement:

[0140] Execute the script file to obtain pipeline injection information, wherein the pipeline injection information includes a pipeline version number;

[0141] The version file is generated according to the pipeline injection information.

[0142] In one embodiment, the processor, before implementing the pipeline operation and obtaining the preset executable script file, is used to implement:

[0143] Configure the script file and execute the command of the script file;

[0144] When the processor executes the script file and generates a version file of the current version corresponding to the pipeline, the processor is used to implement:

[0145] Execute the command, run the script file, and generate the version file.

[0146] In one embodiment, when the processor obtains the preset executable script file before the pipeline runs, it is used to implement:

[0147] Before the pipeline runs, the script file is obtained based on a preset file name, wherein the file name of the script file is configured as the preset file name.

[0148] In one embodiment, after implementing the step of saving the generated version file in a preset target directory for performing the pipeline operation based on the version file saved in the preset target directory, the processor is configured to implement:

[0149] When the pipeline is tested and verified, obtaining version related information;

[0150] The version related information is displayed on the detection page.

[0151] In one embodiment, the version-related information includes statistical information corresponding to the script file, and the processor, when implementing the displaying of the version-related information on the detection page, is used to implement:

[0152] The statistical information is displayed in the detection page, wherein the statistical information includes script execution time.

[0153] In one embodiment, the version-related information includes pipeline injection information, and the processor, when implementing the displaying of the version-related information in the detection page, is used to implement:

[0154] The pipeline injection information is displayed in the detection page, wherein the pipeline injection information includes a pipeline version number.

[0155] The computer device can execute the version file generation method provided in the embodiment of the present application, and therefore can achieve the beneficial effects that can be achieved by the version file generation method provided in the embodiment of the present application. Please refer to the previous embodiment for details and will not be repeated here.

[0156] An embodiment of the present application also provides a computer-readable storage medium.

[0157] The computer-readable storage medium of the present application stores a computer program, and when the computer program is executed by a processor, the steps of the version file generation method as described above are implemented.

[0158] The computer-readable storage medium may be an internal storage unit of the version file generating device or computer device described in the above embodiments, such as a hard disk or memory of the version file generating device or computer device. The computer-readable storage medium may also be an external storage device of the version file generating device or computer device, such as a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital card (Secure Digital Card, SD Card), a flash card (Flash Card), etc., equipped on the version file generating device or computer device.

[0159] Since the computer program stored in the computer-readable storage medium can execute any version file generation method provided in the embodiments of the present application, the beneficial effects that can be achieved by any version file generation method provided in the embodiments of the present application can be achieved. Please refer to the previous embodiments for details and will not be repeated here.

[0160] Furthermore, the computer-readable storage medium may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function, etc.; the data storage area may store data created according to the use of the blockchain node, etc.

[0161] The blockchain referred to in this application is a new application model of computer technologies such as distributed data storage, peer-to-peer transmission, consensus mechanism, encryption algorithm, etc. Blockchain is essentially a decentralized database, a string of data blocks generated by cryptographic methods. Each data block contains a batch of network transaction information, which is used to verify the validity of its information (anti-counterfeiting) and generate the next block. Blockchain can include the underlying blockchain platform, platform product service layer, and application service layer.

[0162] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or system including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or system. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or system including the element.

[0163] The above description is only a specific implementation mode of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of various equivalent modifications or substitutions within the technical scope disclosed in the present application, and these modifications or substitutions should be included in the protection scope of the present application.

Claims

1. A version file generation method, It is characterized in that The version file generation method comprises: Before the pipeline runs, obtain the preset executable script file; Execute the script file to generate a version file of the current version corresponding to the pipeline; The generated version file is saved in a preset target directory, so as to allow the pipeline to be run based on the version file saved in the preset target directory.

2. The version file generation method according to claim 1, It is characterized in that The executing the script file to generate a version file of the current version corresponding to the pipeline includes: Execute the script file to obtain pipeline injection information, wherein the pipeline injection information includes a pipeline version number; The version file is generated according to the pipeline injection information.

3. The version file generation method according to claim 1, It is characterized in that Before the pipeline runs, before obtaining the preset executable script file, it includes: Configure the script file and execute the command of the script file; The executing the script file to generate a version file of the current version corresponding to the pipeline includes: Execute the command, run the script file, and generate the version file.

4. The version file generation method according to claim 1, It is characterized in that Before the pipeline runs, a preset executable script file is obtained, including: Before the pipeline runs, the script file is obtained based on a preset file name, wherein the file name of the script file is configured as the preset file name.

5. The version file generation method according to any one of claims 1 to 4, It is characterized in that The step of saving the generated version file in a preset target directory for pipeline operation based on the version file saved in the preset target directory comprises: When the pipeline is tested and verified, obtaining version related information; The version related information is displayed on the detection page.

6. The version file generation method according to claim 5, It is characterized in that The version-related information includes statistical information corresponding to the script file, and the displaying of the version-related information in the detection page includes: The statistical information is displayed in the detection page, wherein the statistical information includes script execution time.

7. The version file generation method according to claim 5, It is characterized in that The version-related information includes pipeline injection information, and the version-related information is displayed in the detection page, including: The pipeline injection information is displayed in the detection page, wherein the pipeline injection information includes a pipeline version number.

8. A version file generating device, It is characterized in that The version file generating device comprises: The acquisition module is used to obtain the preset executable script file before the pipeline runs; A processing module, used for executing the script file and generating a version file of the current version corresponding to the pipeline; A saving module is used to save the generated version file in a preset target directory for the pipeline operation based on the version file saved in the preset target directory.

9. A computer device, It is characterized in that The computer device includes a memory and a processor; The memory is used to store computer programs; The processor is used to execute the computer program and implement the version file generation method according to any one of claims 1 to 7 when executing the computer program.

10. A computer-readable storage medium, It is characterized in that The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the version file generation method according to any one of claims 1 to 7 are implemented.