Project source code version issuing management and control method, system and device based on continuous integration and continuous release and computer readable storage medium

By establishing data interaction between project management tools and continuous integration tools, linking development tasks and source codes, and automatically building and testing during continuous release, the problem of automatic source code integration in the existing technology is solved, and the development and testers are improved The collaboration and continuous release of closed-loop management.

CN119127274AInactive Publication Date: 2024-12-13ZHEJIANG EVERGREEN INFORMATION TECH CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202311412645.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-10-30
Publication Date
2024-12-13
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

In the prior art, project management tools and continuous integration tools are independent of each other, resulting in the automatically integrated source code and the source code that does not need to be released, resulting in the lack of work of developers, testers and release administrators in their respective system tools. Effective collaboration.

Method used

By establishing data interaction with the source code management tool Gitlab and the project management system, creating and submitting distribution requests, associating development tasks/bugs and source code, performing release operations regularly, combining the source code into the test branch, automatically building and testing, and after completing the test, Update task status and merge source code.

Benefits of technology

It realizes the automated docking of project management and continuous integration during the development process, avoids automatic construction of source codes that do not require release, improves the collaboration between developers and testers, and realizes closed-loop management of continuous integration and continuous release.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119127274A_ABST
    Figure CN119127274A_ABST
Patent Text Reader

Abstract

The invention belongs to the technical field of software management, and provides a project source code version issuing management and control method, system and device based on continuous integration and continuous release and a computer readable storage medium, and the method comprises the following steps: S1, establishing data interaction with a source code management tool Gitlab and a project management system, and creating and submitting a version issuing request, establishing association between the development task / Bug and the source code; step S2: regularly executing publishing operation: merging source codes in all submitted version issuing requests to a test branch, and automatically constructing and publishing the source codes to a test environment; s3, a test plan is made according to the edition issuing content, and testing is carried out; and S4, after the test is completed, operating the version issuing requests one by one. According to the method, closed-loop management of continuous integration and continuous release of development, testing and systems is realized, on one hand, source codes needing to be released and source codes not needing to be released are prevented from being automatically integrated together for construction, and on the other hand, the collaboration of developers and testers is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of software management, and specifically, relates to a project source code release management method, system, device and computer-readable storage medium based on continuous integration and continuous release. Background Art

[0002] Development management usually uses project management tools to manage task progress and continuous integration tools to automatically build and release source code. However, the two tools are independent of each other, resulting in the automatic integration of source code that needs to be released and source code that does not need to be released together for construction. Developers, testers, and release managers work in their own system tools without effective collaboration. Summary of the invention

[0003] The purpose of the present invention is to provide a project source code release management method based on continuous integration and continuous release to solve the technical problems existing in the prior art.

[0004] In order to achieve the above object, the technical solution adopted by the present invention is as follows:

[0005] A project source code release control method based on continuous integration and continuous release, comprising the following steps:

[0006] Step S1: Establish data interaction with the source code management tool Gitlab and the project management system, create and submit a release request, and establish the association between development tasks / bugs and source code;

[0007] Step S2: Scheduled release operations: merge the source code in all submitted release requests into the test branch, and automatically build and release to the test environment;

[0008] Step S3: formulate a test plan and conduct testing according to the published content;

[0009] Step S4: After the test is completed, the release requests are processed one by one: (1) For release requests that pass the test, the status of the corresponding task / bug in the project management system is updated to completed, and the source code is automatically merged into the trunk code; (2) For release requests that fail the test, the status of the corresponding task / bug in the project management system is updated to failed.

[0010] In one embodiment, the method for establishing the association between development tasks / bugs and source code in step S1 is as follows: query the corresponding source code version of the development branch from the source code management tool Gitlab, query the development tasks or bugs from the project management system, and associate and bind the queried data information.

[0011] In one embodiment, in step S1, the specific method of creating and submitting a release request is as follows:

[0012] Step S1.1: Create a release request and query the corresponding source code version of the development branch from the source code management tool Gitlab;

[0013] Step S1.2: Query development tasks or bugs from the project management system;

[0014] Step S1.3: Enter the release content details in the source code release control system and submit the release application.

[0015] In one embodiment, in step S2, the source code is merged into the test branch as follows:

[0016] Step S2.1: Switch to the development branch;

[0017] Step S2.2: Obtain the source code of the submitted release request;

[0018] Step S2.3: Switch to the test branch;

[0019] Step S2.4: Merge the source code in step S2.2 into the test branch;

[0020] Step S2.5: Submit.

[0021] In one embodiment, in step S2, the method for automatically building and publishing to the test environment is as follows: building mirror data of the source code, and updating the mirror data to the test environment.

[0022] In one embodiment, the method of automatically merging the source code into the trunk code in step S4 is as follows:

[0023] Step S4.1: Switch to the test branch;

[0024] Step S4.2: Obtain the source code of the release request that has passed the test;

[0025] Step S4.3: Switch to the trunk;

[0026] Step S4.4: Merge the source code in step S4.2 into the main code;

[0027] Step S4.5: Submit.

[0028] To achieve the above object, the present invention also provides a project source code release management and control system based on continuous integration and continuous release, which is characterized by comprising:

[0029] Create a release request module: establish data interaction with the source code management tool Gitlab and the project management system, create and submit release requests, and establish the association between development tasks / bugs and source code;

[0030] Scheduled release module: Scheduled release operations: merge the source code in all submitted release requests into the test branch, and automatically build and release to the test environment;

[0031] Testing module: formulate test plan and conduct test according to the release content;

[0032] Release request operation module: After the test is completed, the release requests are operated one by one: (1) For release requests that pass the test, the status of the corresponding task / bug in the project management system is updated to completed, and the source code is automatically merged into the main code; (2) For release requests that fail the test, the status of the corresponding task / bug in the project management system is updated to failed.

[0033] To achieve the above-mentioned purpose, the present invention also provides a computer-readable storage medium on which a computer program is stored, and the computer program is executed by a processor to implement the project source code release management method based on continuous integration and continuous release.

[0034] To achieve the above-mentioned purpose, the present invention also provides a project source code release control device based on continuous integration and continuous release, comprising a processor and a memory; the memory is used to store a computer program; the processor is connected to the memory, and is used to execute the computer program stored in the memory, so that the project source code release control device based on continuous integration and continuous release executes the above-mentioned project source code release control method based on continuous integration and continuous release.

[0035] Compared with the prior art, the present invention has the following beneficial effects:

[0036] The present invention automates the connection between project management and continuous integration in the development process, and realizes closed-loop management of development, testing, and system continuous integration and continuous release. On the one hand, it avoids the automatic integration of source code that needs to be released and source code that does not need to be released together for construction. On the other hand, it improves the collaboration between developers and testers, thereby effectively solving the problems existing in the prior art. BRIEF DESCRIPTION OF THE DRAWINGS

[0037] Figure 1 This is a schematic diagram of the process of Example 1 of the present invention.

[0038] Figure 2 This is a principle block diagram of Example 2 of the present invention.

[0039] Figure 3 This is a principle block diagram of Example 4 of the present invention. DETAILED DESCRIPTION

[0040] In order to enable those skilled in the art to have a clearer understanding and knowledge of the present invention, the present invention is further described in detail below in conjunction with the embodiments. It should be understood that the specific embodiments described below are only used to explain the present invention, and are convenient for understanding. The technical solutions provided by the present invention are not limited to the technical solutions provided by the following embodiments, and the technical solutions provided by the embodiments should not limit the protection scope of the present invention.

[0041] It should be noted that the illustrations provided in the following embodiments are only used to illustrate the basic concept of the present invention in a schematic manner. Therefore, the drawings only show components related to the present invention rather than being drawn according to the number, shape and size of components in actual implementation. In actual implementation, the form, quantity and proportion of each component may be changed arbitrarily, and the component layout may also be more complicated.

[0042] Example 1

[0043] This embodiment provides a project source code release management and control method based on continuous integration and continuous release, which mainly includes the following steps:

[0044] 1. Create and submit a release request

[0045] Confirm the development task / bug in the project management system. After the development is completed, establish data interaction with the source code management tool Gitlab and the project management system, create and submit a release request, and establish the association between the development task / bug and the source code. The specific method of creating and submitting a release request is as follows: (1) Create a release request, query the corresponding source code version of the development branch from the source code management tool Gitlab. Specifically, use the git command to interact (query) with the source code management tool GitLab, and use the command git diff --name-only to query; (2) Query the development task or bug from the project management system. Specifically, use the API interface to interact with the project management system; (3) Enter the release content details in the source code release control system (for example: enter a description of what function has been modified) and submit the release application.

[0046] The method for establishing the association between development tasks / bugs and source code is as follows: query the corresponding source code version of the development branch from the source code management tool Gitlab, query the development tasks or bugs from the project management system, and associate and bind the queried data information, thereby realizing the association between development tasks / bugs and source code.

[0047] 2. Scheduled publishing operations

[0048] Merge the source code in all submitted release requests into the test branch, and automatically build and publish to the test environment. The method for merging the source code into the test branch is as follows: (1) Switch to the development branch, using the command: git checkoutdev; (2) Get the source code of the submitted release request, using the command: git checkout<commit hash> ; (3) Switch to the test branch, using the command: git checkout test; (4) Merge the source code into the test branch, using the command: git merge test; (5) Submit, using the command: get push; The method for automatically building and publishing to the test environment is as follows: Use the docker build command to build the image data of the source code, and update the image data to the test environment.

[0049] 3. Develop a test plan and conduct testing based on the release content.

[0050] 4. After completing the test, operate the release requests one by one

[0051] This step mainly includes two aspects:

[0052] The first is based on a release request that has passed the test: for a release request that has passed the test, the status of the corresponding task / bug in the project management system is updated to completed, and the source code is automatically merged into the main code. The method for automatically merging the source code into the main code is as follows: (1) Switch to the test branch, using the command: git checkout test; (2) Get the source code of the release request that has passed the test, using the command: git checkout<commit hash> ; (3) Switch to the trunk, using the command: git checkout master; (4) Merge the source code into the trunk code, using the command: git merge master; (5) Commit, using the command: get push.

[0053] The second is the release request based on test failure: for the release request due to test failure, the status of the corresponding task / bug in the project management system is updated to test failure.

[0054] Through the above technical solution, project management and continuous integration in the development process are automatically connected to achieve closed-loop management of development, testing, system continuous integration and continuous release. On the one hand, it avoids the automatic integration of source code that needs to be released and source code that does not need to be released together for construction. On the other hand, it improves the collaboration between developers and testers.

[0055] Example 2

[0056] like Figure 2As shown, this embodiment provides a project source code release management and control system based on continuous integration and continuous release, including the following functional modules:

[0057] Create a release request module: establish data interaction with the source code management tool GitLab and the project management system, create and submit release requests, and establish the association between development tasks / bugs and source code; the project source code release control system based on continuous integration and continuous release interacts with the source code management tool GitLab through git commands, and the project source code release control system based on continuous integration and continuous release interacts with the project management system through the API interface;

[0058] Scheduled release module: Scheduled release operations: merge the source code in all submitted release requests into the test branch, and automatically build and release to the test environment;

[0059] Testing module: formulate test plan and conduct test according to the release content;

[0060] Release request operation module: After the test is completed, the release requests are operated one by one: (1) For release requests that pass the test, the status of the corresponding task / bug in the project management system is updated to completed, and the source code is automatically merged into the main code; (2) For release requests that fail the test, the status of the corresponding task / bug in the project management system is updated to failed.

[0061] The working principle of each functional module described above corresponds to the method provided in Example 1, so it will not be described here. It should be noted that it should be understood that the division of each module of the above system is only a division of logical functions, and in actual implementation, all or part of it can be integrated into one physical entity.

[0062] Example 3

[0063] This embodiment provides a computer-readable storage medium on which a computer program is stored, and the computer program is executed by a processor to implement a project source code release control method based on continuous integration and continuous release provided in Example 1. A person of ordinary skill in the art can understand that all or part of the steps of implementing the method provided in Example 1 can be completed by hardware related to the computer program, and the above-mentioned computer program can be stored in a computer-readable storage medium, and when the program is executed, the steps of the method provided in Example 1 are executed; and the above-mentioned storage medium includes: ROM, RAM, magnetic disk or optical disk and other media that can store program codes.

[0064] Example 4

[0065] like Figure 3As shown, this embodiment provides a project source code release control device based on continuous integration and continuous release, including: a processor and a memory; the memory is used to store computer programs; the processor is connected to the memory, and is used to execute the computer programs stored in the memory, so that a project source code release control device based on continuous integration and continuous release executes a project source code release control method based on continuous integration and continuous release provided in Example 1.

[0066] Specifically, the memory includes: ROM, RAM, disk, USB flash drive, memory card or CD and other media that can store program codes.

[0067] Preferably, the processor can be a general-purpose processor, including a central processing unit, a network processor, etc.; it can also be a digital signal processor, an application-specific integrated circuit, a field programmable gate array or other programmable logic device, a discrete gate or transistor logic device, or a discrete hardware component.

[0068] The above embodiments are merely illustrative of the principles and effects of the present invention, and are not intended to limit the present invention. Anyone familiar with the art may modify or alter the above embodiments without departing from the spirit and scope of the present invention. Therefore, all equivalent modifications or alterations made by a person of ordinary skill in the art without departing from the spirit and technical concept disclosed by the present invention shall still be covered by the claims of the present invention.

Claims

1. A project source code release management and control method based on continuous integration and continuous release, characterized in that: The following steps are involved: Step S1: Establish data interaction with the source code management tool Gitlab and the project management system, create and submit a release request, and establish the association between development tasks / bugs and source code; Step S2: Scheduled release operations: merge the source code in all submitted release requests into the test branch, and automatically build and release to the test environment; Step S3: formulate a test plan and conduct testing according to the published content; Step S4: After the test is completed, the release requests are processed one by one: (1) For release requests that pass the test, the status of the corresponding task / bug in the project management system is updated to completed, and the source code is automatically merged into the trunk code; (2) For release requests that fail the test, the status of the corresponding task / bug in the project management system is updated to failed.

2. The project source code release management and control method based on continuous integration and continuous release according to claim 1 is characterized in that: The method for establishing the association between development tasks / bugs and source code in step S1 is as follows: query the corresponding source code version of the development branch from the source code management tool Gitlab, query the development tasks or bugs from the project management system, and associate and bind the queried data information.

3. The project source code release management and control method based on continuous integration and continuous release according to claim 2 is characterized in that: In step S1, the specific method of creating and submitting a release request is as follows: Step S1.1: Create a release request and query the corresponding source code version of the development branch from the source code management tool Gitlab; Step S1.2: Query development tasks or bugs from the project management system; Step S1.3: Enter the release content details in the source code release control system and submit the release application.

4. The project source code release management and control method based on continuous integration and continuous release according to claim 3 is characterized in that: In step S2, the source code is merged into the test branch as follows: Step S2.1: Switch to the development branch; Step S2.2: Obtain the source code of the submitted release request; Step S2.3: Switch to the test branch; Step S2.4: Merge the source code in step S2.2 into the test branch; Step S2.5: Submit.

5. The project source code release management and control method based on continuous integration and continuous release according to claim 4 is characterized in that: In step S2, the method for automatically building and publishing to the test environment is as follows: building mirror data of the source code, and updating the mirror data to the test environment.

6. The project source code release management and control method based on continuous integration and continuous release according to claim 5 is characterized in that: The method for automatically merging the source code into the trunk code in step S4 is as follows: Step S4.1: Switch to the test branch; Step S4.2: Obtain the source code of the release request that has passed the test; Step S4.3: Switch to the trunk; Step S4.4: Merge the source code in step S4.2 into the main code; Step S4.5: Submit.

7. A project source code release management and control system based on continuous integration and continuous release, characterized in that: include: Create a release request module: establish data interaction with the source code management tool Gitlab and the project management system, create and submit release requests, and establish the association between development tasks / bugs and source code; Scheduled release module: Scheduled release operations: merge the source code in all submitted release requests into the test branch, and automatically build and release to the test environment; Testing module: formulate test plan and conduct test according to the release content; Release request operation module: After the test is completed, the release requests are operated one by one: (1) For release requests that pass the test, the status of the corresponding task / bug in the project management system is updated to completed, and the source code is automatically merged into the main code; (2) For release requests that fail the test, the status of the corresponding task / bug in the project management system is updated to failed.

8. A computer-readable storage medium having a computer program stored thereon, characterized in that: The computer program is executed by a processor to implement the project source code release management and control method based on continuous integration and continuous release as claimed in any one of claims 1 to 6.

9. A project source code release control device based on continuous integration and continuous release, characterized in that: include: Processor and memory; The memory is used to store computer programs; The processor is connected to the memory and is used to execute the computer program stored in the memory, so that the project source code release control device based on continuous integration and continuous release executes the project source code release control method based on continuous integration and continuous release as described in any one of claims 1 to 6.

Citation Information

Patent Citations

  • Automated branching workflow for a version control system

    CA3075044A1

  • Software continuous integration method and system

    CN107450933A

  • Code development and test process management method based on git

    CN107678773A