Automatic continuous integration system
Through the automated continuous integration system, we compare the public library version numbers of sub-modules and main modules and conduct simulation tests, which solves the integration difficulties caused by version inconsistencies, improves the efficiency and reliability of continuous integration, and reduces manual intervention.
Patent Information
- Application Number
- CN202410648358.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-23
- Publication Date
- 2024-08-27
- Estimated Expiration
- 2044-05-23
AI Technical Summary
In a version management scenario, the version history information of sub-modules is inconsistent with that of the main module, making it difficult to automate the continuous integration process and requiring manual inspections, which consumes a lot of human resources and is inefficient.
Design an automated continuous integration system that obtains the version history information of sub-modules at a preset time point, compares the public library version number, determines the version number to be tested, and conducts simulation testing. If it passes, the version history information of the main module is updated. Avoid compatibility issues caused by newer versions of the public library of factor modules.
Automated integration is achieved, improving the efficiency and reliability of continuous integration, reducing manual intervention, and avoiding compatibility issues caused by newer public library versions.
Smart Images

Figure CN118550894A
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of version management, and in particular to an automated continuous integration system. Background Art
[0002] In the version management scenario, the version history information of the main module needs to integrate the version history information of each sub-module. Since the development, verification and management of each sub-module are independent, the version history information of each sub-module is not consistent. As a result, it is difficult to specify the specific template version number of a sub-module or select the latest module version number of the sub-module for integration during the integration process. Instead, it is necessary to integrate the version history information of the sub-module that meets the prior conditions into the version history information of the main module based on the association between the public library version number of the sub-module and the public library version number of the main module.
[0003] At present, the above work still requires manual inspection to achieve continuous integration. However, manual inspection consumes a lot of human resources and the efficiency of continuous integration is poor. Therefore, how to improve the efficiency of continuous integration has become an urgent problem to be solved. Summary of the invention
[0004] In view of the above technical problems, the technical solution adopted by the present invention is:
[0005] An automated continuous integration system, the system comprising: a main module A and its corresponding first version history information TA, a submodule set B = {b1, b2, ..., b m , …, b M} and a database, wherein the database includes a first version number set CA included in TA = {ca1, ca2, ..., ca m ,…,ca M} and the second version number set DA contained in TA = {da1, da2, ..., da n ,…,da N}, b m is the mth submodule, m is an integer in the range [1, M], M is the number of submodules in B, ca m is the first version number of the mth submodule integrated in A, da n is the second version number of A corresponding to the nth public library, n is an integer in the range of [1, N], and N is the number of public libraries. When the computer program is executed by a processor, the following steps are implemented:
[0006] S101, obtain b at a preset time point m The second version of the historical information Tb m , Tb m Including b m The third version number cbm and b m Corresponding to the fourth version number db of the nth public library mn .
[0007] S102, cb m and ca m Compare and get the first comparison result p m .
[0008] S103, db mn and da n Compare and get the second comparison result q n m .
[0009] S104: If the first comparison result p m For cb m ≥ca m And for each value of n, the second comparison result q n m Both are db mn ≤da n , then cb m As the version number to be tested m .
[0010] S105, for e m The corresponding b m Conduct simulation tests.
[0011] S106, if the simulation test passes, use e m Update ca in TA m .
[0012] Compared with the prior art, the present invention has obvious beneficial effects. By means of the above technical solution, the present invention provides an automated continuous integration system that can achieve considerable technological advancement and practicality and has wide industrial utilization value. It has at least the following beneficial effects:
[0013] The present invention provides an automated continuous integration system, the system comprising: a main module A and its corresponding first version history information TA, a submodule set B = {b1, b2, ..., b m , …, b M} and a database, wherein the database includes a first version number set CA included in TA = {ca1, ca2, ..., ca m ,…,ca M} and the second version number set DA contained in TA = {da1, da2, ..., da n ,…,da N}, b mis the mth submodule, m is an integer in the range [1, M], M is the number of submodules in B, ca m is the first version number of the mth submodule integrated in A, da n is the second version number of A corresponding to the nth public library, n is an integer in the range of [1, N], and N is the number of public libraries. When the computer program is executed by a processor, the following steps are implemented: obtaining b at a preset time point m The second version of the historical information Tb m , Tb m Including b m The third version number cb m and b m Corresponding to the fourth version number db of the nth public library mn , cb m and ca m Compare and get the first comparison result p m , db mn and da n Compare and get the second comparison result q n m , if the first comparison result p m For cb m ≥ca m And for each value of n, the second comparison result q n m Both are db mn ≤da n , then cb m As the version number to be tested m , for e m The corresponding b m Perform a simulation test. If the simulation test passes, use e m Update ca in TA m .
[0014] It can be seen that the version history information of the sub-module is obtained at a preset time point, and the version number of the sub-module to be tested is determined based on the comparison result of the public library version number of the sub-module under each public library and the public library version number of the main module. After passing the test, the sub-module version number is integrated into the version history information of the main module, thereby realizing automatic integration, and continuous integration can be achieved by adjusting the preset time point. In addition, during the comparison process, the sub-module version number is integrated into the version history information of the main module only when the public library version number of the sub-module under all public libraries is not greater than the public library version number of the main module, thereby avoiding compatibility issues caused by the newer public library version of the sub-module, thereby improving the efficiency and reliability of continuous integration. BRIEF DESCRIPTION OF THE DRAWINGS
[0015] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0016] Figure 1 A flowchart of a computer program executed by a processor in an automated continuous integration system provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0017] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present invention.
[0018] This embodiment provides an automated continuous integration system, which includes: a main module A and its corresponding first version history information TA, a submodule set B = {b1, b2, ..., b m , …, b M} and a database, wherein the database includes a first version number set CA included in TA = {ca1, ca2, ..., ca m ,…,ca M} and the second version number set DA contained in TA = {da1, da2, ..., da n ,…,da N}, b m is the mth submodule, m is an integer in the range [1, M], M is the number of submodules in B, ca m is the first version number of the mth submodule integrated in A, da n is the second version number of A corresponding to the nth public library, n is an integer in the range [1, N], and N is the number of public libraries, see Figure 1 , a flowchart of a computer program executed by a processor in an automated continuous integration system provided by an embodiment of the present invention, when the computer program is executed by the processor, the following steps are implemented:
[0019] S101, obtain b at a preset time point m The second version of the historical information Tb m , Tb m Including b m The third version number cb m and b mCorresponding to the fourth version number db of the nth public library mn ;
[0020] S102, cb m and ca m Compare and get the first comparison result p m ;
[0021] S103, db mn and da n Compare and get the second comparison result q n m ;
[0022] S104: If the first comparison result p m For cb m ≥ca m And for each value of n, the second comparison result q n m Both are db mn ≤da n , then cb m As the version number to be tested m ;
[0023] S105, for e m The corresponding b m Conduct simulation tests;
[0024] S106, if the simulation test passes, use e m Update ca in TA m .
[0025] Among them, the main module A can refer to the top-level design module, the main module A is composed of a sub-module set B, and the first version history information TA can include the module version number integrated by each sub-module, that is, the first version number, and the public library version number of N public libraries corresponding to the main module A, that is, the second version number.
[0026] The preset time point may refer to a preset time point for version integration. The implementer may set multiple preset time points to achieve continuous integration. In this embodiment, in order to adapt to the time plan for manual development of each sub-module, the preset time point may be set to 2 a.m. every day. The implementer may adjust the preset time point according to actual conditions so that the computer program corresponding to this embodiment can be automatically executed by the processor and does not conflict with the manual development process of the sub-module.
[0027] The second version history information of the submodule may include the module version number of the submodule, that is, the third version number, and the public library version numbers of the public libraries corresponding to the submodule, that is, the fourth version number.
[0028] Specifically, in this embodiment, the version number of the newer version is greater than the version number of the older version. The integration of the third version number needs to meet two prior conditions. The first prior condition is that the first comparison result p m For cb m ≥ca m , indicating that the module version number of the submodule is newer than the module version number integrated in the first version history information. Otherwise, it indicates that the module version number of the submodule is older than the module version number integrated in the first version history information. On the basis of using the method of this embodiment for automatic continuous updating, under normal circumstances, the module version number of the submodule should be newer or the same as the module version number integrated in the first version history information. If the module version number of the submodule is older than the module version number integrated in the first version history information, it indicates that manual integration has occurred, that is, the module version number of the submodule is manually updated to the first version history information. Usually, the manual integration operation is generated to solve practical problems. Therefore, this embodiment defaults to the highest priority of manual integration, that is, when the first comparison result p m For cb m <ca m When, not cb m Integration is performed so that the automated continuous integration system provided by this embodiment can allow manual integration operations.
[0029] The second prior condition is that for each value of n, the second comparison result q n m Both are db mn ≤da n That is, for any public library, the public library version number of the sub-module corresponding to the public library is less than or equal to the public library version number of the main module corresponding to the public library, thereby ensuring that the public library version used by the sub-module is not higher than the public library version used by the main module, avoiding compatibility issues caused by the newer public library version of the sub-module and improving the reliability of continuous integration.
[0030] After the above two prior conditions are met, cb m As the version number to be tested m Perform simulation verification and use e after verification m Update ca in TA m , thereby further ensuring the reliability of sub-module template version number integration.
[0031] In a specific embodiment, cb m For the b m The latest version number that has passed the test.
[0032] Among them, cb mFor the b m The latest module version number that has passed self-testing in the submodule, or the lastgood version, is used instead of the latest module version number of the submodule, thereby improving the reliability of automated continuous integration.
[0033] In a specific embodiment, cb m and {db m1 , db m2 ,…,db mn ,…,db mN}There is a corresponding relationship.
[0034] The module version number of the submodule corresponds to the version number of each public library of the submodule.
[0035] In a specific implementation, the simulation test includes a smoke test and a feasibility test.
[0036] In a specific embodiment, when b m When the nth public library is not included, db mn Set as the first preset symbol, accordingly, when db mn When the first preset symbol is mn ≤da n .
[0037] In this embodiment, the first preset symbol may be set to “NaN”, and the implementer may adjust the setting of the first preset symbol according to actual conditions.
[0038] In a specific embodiment, when db mn > n When db mn and the second preset symbol to obtain the first splicing result r mn , a first information table is formed by all the first splicing results, and the first information table is used to send to the maintenance personnel of the main module A to remind them to update each public library in A.
[0039] In this embodiment, the second preset symbol can be set to "*", which will mn When splicing with the second preset symbol, put the second preset symbol in front, db mn After splicing, r mn Represented as *db mn In this embodiment, each second version number corresponding to the main module is also added to the first information table. See Table 1, which is a schematic diagram of the first information table provided in this embodiment, wherein:
[0040] "*db 11 " means db 11 >da1,"*db mN" means db mN > N , "*db Mn " means db Mn > n , without the second preset symbol, it means that the public library version number of the corresponding submodule is less than or equal to the public library version number of the main module. The first information table is used to send to the maintenance personnel of the main module A to remind them to update each public library in A. The maintenance personnel of the main module A can check the public library version number carrying the second preset symbol to determine whether there is a public library version number that is outdated, and then determine whether to update it later. It should be noted that since the first information table is for the maintenance personnel of the main module A, the first information table is formed by all the first splicing results. In order to ensure the integrity of the information, the implementer can also add the public library version numbers of all submodules whose public library version numbers are not spliced with the second preset symbol to the first information table.
[0041] Table 1
[0042]
[0043] In a specific embodiment, when db mn ≤da n When db mn Splice with the third preset symbol to obtain the second splicing result s mn A second information table is formed by all the second splicing results, and the second information table is used to send to the maintenance personnel of each submodule to remind them to update each public library in each submodule.
[0044] In this embodiment, the third preset symbol can be set to ">", which means that db mn When splicing with the third preset symbol, put the third preset symbol in front, db mn After splicing, r mn Represented as >db mn In this embodiment, each second version number corresponding to the main module is also added to the second information table. See Table 2, which is a schematic diagram of the second information table provided in this embodiment, wherein:
[0045] db 1n " means db 1n ≤da n , ">db mn " means db mn ≤da n ,">db MN " means db MN > N The second information table is used to send to the maintainers of each submodule to remind them to update each public library in each submodule, from module bm The maintenance personnel can check the public library version number carrying the third preset symbol to determine whether there is a public library version number that is outdated, and then determine whether to update it later. It should be noted that since the second information table is for the maintenance personnel of each sub-module, the second information table is formed by all the second splicing results. In order to ensure the integrity of the information, the implementer can also add all the public library version numbers of the sub-modules whose public library version numbers are not spliced with the third preset symbol to the second information table.
[0046] Table 2
[0047]
[0048] In a specific embodiment, if cb m Determined as e m And the simulation verification is passed by cb m ,ca m and the fourth preset symbol form the first reference sequence, otherwise, cb m ,ca m And the fifth preset symbol form a second reference sequence, and all the first reference sequences and all the second reference sequences form a third information table, which is used to be sent to the maintenance personnel of the main module A and each submodule to provide integrated information.
[0049] In this embodiment, the fourth preset symbol can be set to "update", and the fifth preset symbol can be set to "-". See Table 3, which is a schematic diagram of the third information table provided in this embodiment.
[0050] Table 3
[0051]
[0052] In this embodiment, the version history information of the sub-module is obtained at a preset time point, and the version number of the sub-module to be tested is determined based on the comparison results of the public library version numbers of the sub-modules under each public library and the public library version number of the main module. After passing the test, the sub-module version number is integrated into the version history information of the main module, thereby realizing automatic integration, and continuous integration can be achieved by adjusting the preset time point. In addition, during the comparison process, the sub-module version number is integrated into the version history information of the main module only when the public library version numbers of the sub-modules under all public libraries are not greater than the public library version number of the main module, thereby avoiding compatibility issues caused by the newer public library version of the sub-module, thereby improving the efficiency and reliability of continuous integration.
[0053] Although some specific embodiments of the present invention have been described in detail by way of example, it will be appreciated by those skilled in the art that the above examples are for illustration only and are not intended to limit the scope of the present invention. It will also be appreciated by those skilled in the art that various modifications may be made to the embodiments without departing from the scope and spirit of the present invention. The scope of the present invention is defined by the appended claims.
Claims
1. An automated continuous integration system, characterized in that: The system includes: a main module A and its corresponding first version history information TA, a submodule set B = {b1, b2, ..., b m , …, b M } and a database, wherein the database includes a first version number set CA included in TA = {ca1, ca2, ..., ca m ,…,ca M } and the second version number set DA contained in TA = {da1, da2, ..., da n ,…,da N }, b m is the mth submodule, m is an integer in the range [1, M], M is the number of submodules in B, ca m is the first version number of the mth submodule integrated in A, da n is the second version number of A corresponding to the nth public library, n is an integer in the range of [1, N], and N is the number of public libraries. When the computer program is executed by a processor, the following steps are implemented: S101, obtain b at a preset time point m The second version of the historical information Tb m , Tb m Including b m The third version number cb m and b m Corresponding to the fourth version number db of the nth public library mn ; S102, cb m and ca m Compare and get the first comparison result p m ; S103, db mn and da n Compare and get the second comparison result q n m ; S104: If the first comparison result p m For cb m ≥ca m And for each value of n, the second comparison result q n m Both are db mn ≤da n , then cb m As the version number to be tested m ; S105, for e m The corresponding b m Conduct simulation tests; S106, if the simulation test passes, use e m Update ca in TA m .
2. The automated continuous integration system according to claim 1, characterized in that: cb m For the b m The latest version number that has passed the test.
3. The automated continuous integration system according to claim 1, characterized in that: cb m and {db m1 , db m2 ,…,db mn ,…,db mN }There is a corresponding relationship.
4. The automated continuous integration system according to claim 1, characterized in that: The simulation test includes a smoke test and a feasibility test.
5. The automated continuous integration system according to claim 1, characterized in that: When b m When the nth public library is not included, db mn Set as the first preset symbol, accordingly, when db mn When the first preset symbol is mn ≤da n .
6. The automated continuous integration system according to claim 1, characterized in that: When db mn > n When db mn and the second preset symbol to obtain the first splicing result r mn , a first information table is formed by all the first splicing results, and the first information table is used to send to the maintenance personnel of the main module A to remind them to update each public library in A.
7. The automated continuous integration system according to claim 1, characterized in that: When db mn ≤da n When db mn Splice with the third preset symbol to obtain the second splicing result s mn A second information table is formed by all the second splicing results, and the second information table is used to send to the maintenance personnel of each submodule to remind them to update each public library in each submodule.
8. The automated continuous integration system according to claim 1, characterized in that: If cb m Determined as e m And the simulation verification is passed by cb m ,ca m and the fourth preset symbol form the first reference sequence, otherwise, cb m ,ca m And the fifth preset symbol form a second reference sequence, and all the first reference sequences and all the second reference sequences form a third information table, which is used to be sent to the maintenance personnel of the main module A and each submodule to provide integrated information.
Citation Information
Patent Citations
A method and an apparatus for version management
CN109189464A
Mobile application remote resource gray scale updating method
CN111209016A
Resource updating method and related equipment
CN111857781A
Database maintenance method and device, storage medium and electronic equipment
CN116048953A
Digital integrated circuit verification system for accelerating convergence of verification coverage rate
CN117993336A
