CN115480804A - Incremental release updating method, equipment and medium - Google Patents
Incremental release updating method, equipment and medium Download PDFInfo
- Publication number
- CN115480804A CN115480804A CN202211323007.8A CN202211323007A CN115480804A CN 115480804 A CN115480804 A CN 115480804A CN 202211323007 A CN202211323007 A CN 202211323007A CN 115480804 A CN115480804 A CN 115480804A
- Authority
- CN
- China
- Prior art keywords
- version
- incremental
- git
- branch
- file
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/60—Software deployment
- G06F8/65—Updates
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/70—Software maintenance or management
- G06F8/71—Version control; Configuration management
Abstract
The invention relates to an incremental release updating method, equipment and a medium, wherein the method comprises the following steps: when the version is updated, obtaining git branch information needing to be merged; judging whether git branch information exists in a git library, if so, uniformly acquiring submission records on the git branch and the master branch, and comparing to generate a difference file list; analyzing the difference file list to obtain a corresponding source code file; checking whether the version of the source code file is consistent with the specified version, if so, generating a corresponding project structure file; merging the project structure files into corresponding publishing package files to form an incremental publishing package; and deploying and publishing the incremental publishing package. Compared with the prior art, the invention solves the problems of high probability of occurrence of production accidents and high labor cost.
Description
Technical Field
The invention belongs to the technical field of communication, and relates to an incremental publishing updating method, equipment and a medium.
Background
With the prevalence of the micro-service architecture at present, less and less packaging and checking work is required for developers; however, there are cases where incremental releases are made for WEB projects of large volumes.
According to a code increment release updating method and system disclosed by the retrieval of the Chinese publication No. CN113553089A, aiming at the increment release condition, the adopted method is as follows: packaging the constructed code source file; configuring a file name index and updating an index table; extracting a changed file corresponding to the changed file name index; the hierarchical deployment is to upload the record information of the updated version to the release system and mirror the updated version to the content distribution network; receiving and automatically inputting updated version recording information, receiving release information selected by a user, and updating a corresponding version in the release information to a cache of a corresponding server; and the server obtains the index table from the cache and acquires the static resource file from the content distribution network according to the index table.
However, in the prior art, the records of the modified files are mainly recorded by developers, and the developers easily forget and wrongly record the modified records, so that the increment package lacks files or mistakes the files, and finally production accidents occur; and each version needs to record and modify files, manually collects and modifies the files before online, then achieves the files into corresponding packages, checks the correctness of the packages (including the accuracy of the files and the file contents), consumes time and compresses the main development work and development time. In conclusion, the prior art has the defects of high production accident occurrence probability and high labor cost.
Disclosure of Invention
The invention aims to provide an incremental issuing and updating method, equipment and a medium so as to solve the problems of high probability of occurrence of production accidents and high labor cost.
The purpose of the invention can be realized by the following technical scheme:
an incremental publication update method, comprising the steps of:
s1, acquiring git branch information needing to be combined when a version is updated;
s2, judging whether the git branch information exists in a git library, if so, uniformly acquiring submission records on the git branch and the master branch, comparing the submission records to generate a difference file list, and if not, returning to the S1;
s3, analyzing the difference file list to obtain a corresponding source code file;
s4, checking whether the version of the source code file is consistent with the specified version, if so, generating a corresponding project structure file, otherwise, returning to the S3;
s5, merging the project structure files into corresponding publishing package files to form an incremental publishing package;
and S6, deploying and publishing the increment publishing package.
Further, the corresponding git branch information in step S1 is obtained through a remote warehouse.
Further, the git library in the step S2 is used for recording the release information of the version and updating the version recording information.
Further, the git branch in step S2 is managed in a multi-branch parallel manner.
Further, the source code file in step S3 is a class binary file.
Further, the version in step S4 is a Java version.
Further, the incremental release packet in step S6 is an incremental version WAR packet.
Further, the incremental publishing packet in the step S6 is automatically deployed and published through jenkins.
The invention provides an electronic device, which comprises a memory and a processor, wherein a computer program is stored in the memory, and the processor realizes the method when executing the program.
The invention provides a computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the method.
Compared with the prior art, the invention has the following characteristics:
1. when git branch information exists in a git library, submitting records on the git branch and the master branch are uniformly obtained through codes and compared, so that the problems of inconsistent file paths and file loss when a large number of files exist are solved, unstable conditions such as manual error memorization, omission of memorization, packaging omission and the like are avoided, and the risk of production accidents is reduced; in addition, the invention realizes that the increment package is uniformly and automatically produced by the program by analyzing the difference file list by the program, checking the source file version and filtering the files to be packaged, thereby reducing the labor cost.
2. The invention integrates version pulling, packaging and checking into a whole, and further improves the automation degree.
3. The invention contains class compiling version check, and avoids the incompatibility problem of the newly added code jvm.
Drawings
FIG. 1 is a schematic flow chart of a method in an embodiment of the present invention;
Detailed Description
The invention is described in detail below with reference to the figures and the specific embodiments. The present embodiment is implemented on the premise of the technical solution of the present invention, and a detailed implementation manner and a specific operation process are given, but the scope of the present invention is not limited to the following embodiments.
Example 1
The invention provides an incremental release updating method, which is limited by factors such as project planning, delivery mode, research and development environment, project configuration and the like in actual project development, and needs to carry out incremental deployment on projects to avoid greater risks. The method comprises the steps of firstly starting from the branch management of codes, in the daily management of a project, the code branch management of the project can be carried out according to a plurality of modes, at present, more members are used for grouping the project, a multi-branch parallel development management mode is adopted, a corresponding version branch is newly built according to the online requirement of each version, and when a test is submitted, the corresponding version branch is merged into a develop branch.
As shown in fig. 1, the method comprises the steps of:
s1, when the version is updated, obtaining git branch information needing to be combined, wherein the git branch information is obtained through a remote warehouse;
s2, judging whether git branch information exists in a git library, if so, entering the step S3, otherwise, returning to the step S1, wherein the git library is used for recording release information of a version and updating version recording information, and the git branch is managed in a multi-branch parallel mode;
s3, uniformly acquiring the submitted records on the git branch and the master branch, comparing the submitted records to generate a difference file list;
s4, analyzing the difference file list to obtain a corresponding source code file which is pulled on a master branch by the difference file list, wherein the source code file is a class binary file;
s5, checking whether the version of the source code file is consistent with the specified version, if so, entering the step S6, and if not, returning to the step S3;
in this embodiment, the version is a Java version.
S6, generating a corresponding project structure file;
s7, merging the project structure file into a corresponding release package file to form an increment release package of the current version, wherein the increment release package is an increment version WAR package;
and S8, deploying and issuing the incremental issuing package.
Specifically, in this embodiment, the incremental publishing package is automatically deployed and published through jenkins.
Among them, git is called a distributed version control system, and can effectively process the project version management from very small to very large at high speed.
When the git branch information exists in the git library, submitting records on the git branch and the master branch are uniformly obtained through codes and compared, so that the problems of inconsistent file paths and file loss when a plurality of files exist are solved, the unstable conditions of manual error recording, omission of recording, packaging omission and the like are avoided, and the risk of production accidents is reduced; in addition, the invention realizes that the increment package is uniformly and automatically produced by the program and reduces the labor cost by analyzing the difference file list by the program, checking the source file version and filtering the files to be packaged.
The invention contains class compiling version check, and avoids the incompatibility problem of the newly added code jvm.
According to the embodiment, the invention integrates version pulling, packaging and checking into a whole, and further improves the automation degree.
The above functions, if implemented in the form of software functional units and sold or used as a separate product, may be stored in a computer-readable storage medium. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
Example 2
The invention also provides an electronic device comprising a memory and a processor, wherein the memory stores a computer program, and the processor implements all the methods described in embodiment 1 when executing the program.
The embodiments described above are described to facilitate an understanding and use of the invention by those skilled in the art. It will be readily apparent to those skilled in the art that various modifications to these embodiments may be made, and the generic principles described herein may be applied to other embodiments without the use of the inventive faculty. Therefore, the present invention is not limited to the above embodiments, and those skilled in the art should make improvements and modifications within the scope of the present invention based on the disclosure of the present invention.
Claims (10)
1. An incremental release updating method, characterized in that the method comprises the following steps:
s1, acquiring git branch information needing to be combined when a version is updated;
s2, judging whether the git branch information exists in a git library, if so, uniformly acquiring submission records on the git branch and the master branch, comparing the submission records to generate a difference file list, and if not, returning to the S1;
s3, analyzing the difference file list to obtain a corresponding source code file;
s4, checking whether the version of the source code file is consistent with the specified version, if so, generating a corresponding project structure file, otherwise, returning to the S3;
s5, merging the project structure files into corresponding publishing package files to form an incremental publishing package;
and S6, deploying and publishing the increment publishing package.
2. The incremental release updating method according to claim 1, wherein the corresponding git branch information in step S1 is obtained through a remote repository.
3. An incremental release updating method as claimed in claim 1, wherein in step S2, the git library is used for recording release information of a version and updating version recording information.
4. The incremental release updating method according to claim 1, wherein the git branch in step S2 is managed in a multi-branch parallel manner.
5. The method as claimed in claim 1, wherein the source code file in step S3 is a class binary file.
6. The incremental release updating method according to claim 1, wherein the version in step S4 is Java version.
7. The incremental release updating method according to claim 1, wherein the incremental release packet in step S6 is an incremental version WAR packet.
8. The incremental release updating method according to claim 1, wherein the incremental release package in step S6 is automatically deployed and released by jenkins.
9. A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor implements the method of any one of claims 1 to 8 when executing the computer program.
10. A computer-readable storage medium, characterized in that the computer-readable storage medium stores a computer program for executing the method of any one of claims 1 to 8.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202211323007.8A CN115480804A (en) | 2022-10-27 | 2022-10-27 | Incremental release updating method, equipment and medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202211323007.8A CN115480804A (en) | 2022-10-27 | 2022-10-27 | Incremental release updating method, equipment and medium |
Publications (1)
Publication Number | Publication Date |
---|---|
CN115480804A true CN115480804A (en) | 2022-12-16 |
Family
ID=84396661
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202211323007.8A Pending CN115480804A (en) | 2022-10-27 | 2022-10-27 | Incremental release updating method, equipment and medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN115480804A (en) |
-
2022
- 2022-10-27 CN CN202211323007.8A patent/CN115480804A/en active Pending
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN106598612B (en) | Operation method and system for data table in database | |
US20050071359A1 (en) | Method for automated database schema evolution | |
CN101901265B (en) | Objectification management system of virtual test data | |
CN109739828B (en) | Data processing method and device and computer readable storage medium | |
US11487742B2 (en) | Consistency checks between database systems | |
CN112394942A (en) | Distributed software development compiling method and software development platform based on cloud computing | |
CN113138781B (en) | CSV configuration updating method and storage medium | |
CN110659063A (en) | Software project reconstruction method and device, computer device and storage medium | |
US9934216B2 (en) | Schema validation for metadata builder | |
CN108491218A (en) | A kind of method and apparatus of databases comparison file generated | |
US11977473B2 (en) | Providing a pseudo language for manipulating complex variables of an orchestration flow | |
CN115080114B (en) | Application program transplanting processing method, device and medium | |
CN113792026B (en) | Method and device for deploying database script and computer-readable storage medium | |
CN115480804A (en) | Incremental release updating method, equipment and medium | |
CN110222105B (en) | Data summarization processing method and device | |
CN112817931B (en) | Incremental version file generation method and device | |
CN111078273B (en) | Information acquisition method and device and storage medium | |
CN113901025A (en) | Database management method, device, equipment and storage medium | |
CN111142965A (en) | Language configuration method and device, electronic equipment and storage medium | |
CN116627390B (en) | ICD file substitution method and device in aviation software development | |
CN112559444A (en) | SQL (structured query language) file migration method and device, storage medium and equipment | |
US10521314B2 (en) | Cross-referenced irregular field storage in databases | |
CN113626423B (en) | Log management method, device and system of business database | |
CN113342885B (en) | Data import method, device, equipment and computer program product | |
JP4937387B2 (en) | Automatic rewriting program and automatic rewriting device |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination |