A software version release management method, system, storage medium and device
By implementing user authentication and CI/CD pipeline processing in the software version release management system, the problems of permission abuse and untimely information transmission during the release process are solved, enabling synchronous updates across multiple locations and clusters and improving data security.
Patent Information
- Application Number
- CN202411337684.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-25
- Publication Date
- 2026-01-27
- Estimated Expiration
- 2044-09-25
Smart Images

Figure CN118860478B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of software operation and maintenance technology, specifically to a software version release management method, system, storage medium, and device. Background Technology
[0002] With the increasingly widespread application of information technology, enterprise IT infrastructure is becoming increasingly complex, especially when it involves large-scale, multi-location business deployments, which presents numerous challenges to operation and maintenance management. As enterprises develop a wide variety of products, experience rapid updates and iterations, and engage in complex business deployments involving multiple IDCs (Internet Data Centers), the release process and management of software programs become even more difficult.
[0003] However, existing operation and maintenance management systems are not perfect in terms of access control, approval processes, and notification mechanisms. Specifically, they lack refined access control, standardized approval processes, and timely and effective notification mechanisms during the release process, which can easily lead to problems such as abuse of permissions, chaotic approval processes, and untimely information transmission. Summary of the Invention
[0004] In view of the shortcomings of the prior art, the purpose of this invention is to provide a software version release management method, system, storage medium and device, which aims to solve the problems of abuse of permissions, chaotic approval process and untimely information transmission in the release management process of the prior art.
[0005] A first aspect of the present invention is to provide a software version release management method, the method comprising:
[0006] The system detects the release information corresponding to the software program filled in by the user through a pre-loaded management interface in the front end, as well as the release request corresponding to the software program submitted based on the release information; wherein, the release information includes version number, release description and target environment;
[0007] When the pre-set server in the backend receives the release request, it extracts the code data in the software program according to the release request and the release information, generates environment variables and configuration files corresponding to the code data, and triggers the CI / CD pipeline in the backend.
[0008] The CI / CD pipeline is used to compile, test, and package the code data to obtain a program package, and the program package image is pushed to the container image repository.
[0009] The deployment configuration in the Kubernetes cluster is automatically updated based on the container image repository, enabling synchronous updates across multiple locations and clusters.
[0010] The steps include, when a pre-set server in the backend receives the release request, extracting code data from the software program based on the release request and release information, generating environment variables and configuration files corresponding to the code data, and triggering the backend CI / CD pipeline:
[0011] After the user fills in the release information and submits the release request in the management interface preloaded in the browser, the HTTP request operation is performed through the HTTP client on the front end.
[0012] When the pre-set server in the backend receives the HTTP request, it performs user authentication on the user who submitted the release request based on the HTTP flag in the HTTP header of the HTTP request.
[0013] During user authentication, code data in the software program is extracted based on the release information and the release request. Corresponding environment variables and configuration files are generated based on the code data. The CI / CD pipeline in the backend is then started based on the code data, environment variables and configuration files.
[0014] The steps of compiling, testing, and packaging the code data using the CI / CD pipeline to obtain a program package, and then pushing the program package image to the container image repository, include:
[0015] The code data is obtained, and the code data is compiled using a compilation tool to generate an executable file or intermediate code;
[0016] Perform unit testing, integration testing, end-to-end testing, and performance testing on the executable file or the intermediate code;
[0017] The executable file or intermediate code that passes all the tests is packaged into multiple packages according to its dependency relationship, and the packages and their runtime environment are packaged into corresponding package images.
[0018] The packaged program image is pushed to the container image repository for storage.
[0019] According to one aspect of the above technical solution, when a pre-set server in the backend receives the HTTP request, the step of authenticating the user who submitted the release request based on the HTTP flag in the HTTP header of the HTTP request includes:
[0020] When the pre-set server in the backend receives the HTTP request, it identifies the HTTP headers in the HTTP request;
[0021] Identify the HTTP flags carried in the HTTP header, and authenticate the user who initiated the release request based on the HTTP flags.
[0022] According to one aspect of the above technical solution, the step of identifying the HTTP flag carried in the HTTP header and authenticating the user who initiated the release request based on the HTTP flag includes:
[0023] Identify and parse the HTTP flags carried in the HTTP header;
[0024] Verifying the validity of the HTTP flag includes verifying whether the HTTP flag has expired, whether it has been revoked, and whether the user information carried in the HTTP flag matches the requested resource corresponding to the release request.
[0025] If the HTTP flag is valid, authentication is performed to allow the user to access the requested resource corresponding to the release request;
[0026] If not, return an authentication failure response to the management interface.
[0027] According to one aspect of the above technical solution, verifying the validity of the HTTP flag includes the steps of verifying whether the HTTP flag has expired, whether it has been revoked, and whether the user information carried in the HTTP flag matches the requested resource corresponding to the release request, including:
[0028] Extract the HTTP flag from the HTTP header of the HTTP request;
[0029] Verify whether the format of the HTTP flag conforms to preset requirements to determine the validity of the HTTP flag;
[0030] If so, the HTTP flags are parsed using a lightweight authentication and authorization mechanism based on JSON to determine whether the current time is earlier than the time specified in the exp field;
[0031] If not, query at least one database list that stores the HTTP flag that has been revoked, and determine whether the HTTP flag is in the database list;
[0032] If not, it is determined that the HTTP flag has not expired, and it is verified whether the user information carried in the HTTP flag matches the requested resource corresponding to the release request.
[0033] A second aspect of the present invention is to provide a software version release management system, applied to the method described in the above-mentioned technical solution, the system comprising:
[0034] The release request detection module is used to detect the release information corresponding to the software program filled in by the user through the management interface pre-loaded in the front end, as well as the release request corresponding to the software program submitted based on the release information.
[0035] The release request processing module is used to extract code data from the software program based on the release request and the release information when the preset server in the backend receives the release request, generate environment variables and configuration files corresponding to the code data, and trigger the CI / CD pipeline in the backend.
[0036] The code data processing module is used to compile, test and package the code data through the CI / CD pipeline to obtain a program package, and push the program package image to the container image repository.
[0037] The management execution module is used to automatically update the deployment configuration in the Kubernetes cluster based on the container image repository, so as to achieve synchronous updates across multiple locations and clusters.
[0038] According to one aspect of the above technical solution, the release request processing module is specifically used for:
[0039] After the user fills in the release information and submits the release request in the management interface preloaded in the browser, the HTTP request operation is performed through the HTTP client on the front end.
[0040] When the pre-set server in the backend receives the HTTP request, it performs user authentication on the user who submitted the release request based on the HTTP flag in the HTTP header of the HTTP request.
[0041] During user authentication, code data from the software program is extracted based on the release information and release request. Corresponding environment variables and configuration files are generated based on the code data. The CI / CD pipeline in the backend is then started based on the code data, environment variables, and configuration files.
[0042] According to one aspect of the above technical solution, the code data processing module is specifically used for:
[0043] The code data is obtained, and the code data is compiled using a compilation tool to generate an executable file or intermediate code;
[0044] Perform unit testing, integration testing, end-to-end testing, and performance testing on the executable file or the intermediate code;
[0045] The executable file or intermediate code that passes all the tests is packaged into multiple packages according to its dependency relationship, and the packages and their runtime environment are packaged into corresponding package images.
[0046] The packaged program image is pushed to the container image repository for storage.
[0047] A third aspect of the present invention is to provide a readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the method described in the above-described technical solutions.
[0048] A fourth aspect of the present invention is to provide an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the steps of the method described in the above technical solutions.
[0049] Compared with existing technologies, the advantages of using the software version release management method, system, storage medium, and device shown in this invention are as follows:
[0050] The method described in this invention detects the release information corresponding to the software program filled in by the user through a pre-loaded management interface on the front end, as well as the release request corresponding to the software program submitted based on the release information. The release information includes the version number, release description, and target ring. When a pre-set server in the back end receives the release request, it extracts code data from the software program based on the release request and release information, generates environment variables and configuration files corresponding to the code data, and triggers the backend CI / CD pipeline. The CI / CD pipeline compiles, tests, and packages the code data to obtain a program package, and pushes the program package image to a container image repository. The deployment configuration in the Kubernetes cluster is automatically updated based on the container image repository, achieving synchronous updates across multiple locations and clusters. Using the method described in this embodiment, by connecting R&D, testing, and operations personnel throughout the entire software program release process, communication costs can be greatly reduced, data security during the software program release process can be improved, and the rapid and secure execution of the software program release process can be facilitated. Attached Figure Description
[0051] The above and / or additional aspects and advantages of the present invention will become apparent and readily understood from the description of the embodiments taken in conjunction with the following drawings, in which:
[0052] Figure 1 This is a flowchart illustrating a software version release management method according to an embodiment of the present invention;
[0053] Figure 2 This is a structural block diagram of a software version release management system according to an embodiment of the present invention. Detailed Implementation
[0054] To make the objectives, features, and advantages of the present invention more apparent and understandable, specific embodiments of the present invention will be described in detail below with reference to the accompanying drawings. Several embodiments of the present invention are shown in the drawings. However, the present invention can be implemented in many different forms and is not limited to the embodiments described herein. Rather, these embodiments are provided so that the disclosure of the present invention will be more thorough and complete.
[0055] It should be noted that when a component is said to be "fixed to" another component, it can be directly on the other component or there may be an intervening component. When a component is said to be "connected to" another component, it can be directly connected to the other component or there may be an intervening component. The terms "vertical," "horizontal," "left," "right," and similar expressions used in this document are for illustrative purposes only.
[0056] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention pertains. The terminology used herein in the description of the invention is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention. The term "and / or" as used herein includes any and all combinations of one or more of the associated listed items.
[0057] Example 1
[0058] Please see Figure 1 The first embodiment of the present invention provides a software version release management method, the method comprising steps S10-S40:
[0059] Step S10: Detect the release information corresponding to the software program filled in by the user through the management interface pre-loaded in the front end, and the release request corresponding to the software program submitted based on the release information.
[0060] The release information includes the version number, release notes, and target environment, such as testing or production environments.
[0061] In this embodiment, the front end refers to the front end of the program development. When software program release management is required, the management interface is preloaded in the front end framework, and then the release information corresponding to the software program to be released is filled in, including the version number, release description and target environment (test environment, production environment). Then the software program release request can be submitted. After that, the software program release management will be carried out in this embodiment, realizing efficient management and deployment of large-scale, multi-location Kubernetes cluster environments, thereby solving many challenges faced by enterprises in operation and maintenance management.
[0062] Step S20: When the preset server in the backend receives the release request, it extracts the code data in the software program according to the release request and the release information, generates environment variables and configuration files corresponding to the code data, and triggers the CI / CD pipeline in the backend.
[0063] In this embodiment, when a pre-set server in the backend receives the release request, it extracts code data from the software program based on the release request and the release information, generates environment variables and configuration files corresponding to the code data, and triggers the backend CI / CD pipeline. The steps include:
[0064] After the user fills in the release information and submits the release request in the management interface preloaded in the browser, the HTTP request operation is performed through the HTTP client on the front end.
[0065] When the pre-set server in the backend receives the HTTP request, it performs user authentication on the user who submitted the release request based on the HTTP flag in the HTTP header of the HTTP request.
[0066] During user authentication, code data from the software program is extracted based on the release information and release request. Corresponding environment variables and configuration files are generated based on the code data. The CI / CD pipeline in the backend is then started based on the code data, environment variables, and configuration files.
[0067] Specifically, when a user submits a release request pre-loaded by the browser in the front end, the HTTP client will generate an HTTP request based on the release request. When the server in the back end receives the HTTP request, it will authenticate the user according to the HTTP flag in the HTTP header of the HTTP request. Only after the user passes the authentication can the software program code data be extracted according to the release request, and the CI / CD pipeline in the back end be started based on the release request to perform a series of processing on the code.
[0068] In this embodiment, when a pre-set server in the backend receives the HTTP request, the step of authenticating the user who submitted the release request based on the HTTP flags in the HTTP header of the HTTP request includes:
[0069] When the pre-set server in the backend receives the HTTP request, it identifies the HTTP headers in the HTTP request;
[0070] Identify the HTTP flags carried in the HTTP header, and authenticate the user who initiated the release request based on the HTTP flags.
[0071] The step of identifying the HTTP flag carried in the HTTP header and authenticating the user who initiated the release request based on the HTTP flag includes:
[0072] Identify and parse the HTTP flags carried in the HTTP header;
[0073] Verifying the validity of the HTTP flag includes verifying whether the HTTP flag has expired, whether it has been revoked, and whether the user information carried in the HTTP flag matches the requested resource corresponding to the release request.
[0074] If the HTTP flag is valid, authentication is performed to allow the user to access the requested resource corresponding to the release request;
[0075] If not, return an authentication failure response to the management interface.
[0076] The step of verifying the validity of the HTTP flag, including verifying whether the HTTP flag has expired or been revoked, and whether the user information carried in the HTTP flag matches the requested resource corresponding to the release request, includes:
[0077] Extract the HTTP flag from the HTTP header of the HTTP request;
[0078] Verify whether the format of the HTTP flag conforms to preset requirements to determine the validity of the HTTP flag;
[0079] If so, the HTTP flags are parsed using a lightweight authentication and authorization mechanism based on JSON to determine whether the current time is earlier than the time specified in the exp field;
[0080] If not, query at least one database list that stores the HTTP flag that has been revoked, and determine whether the HTTP flag is in the database list;
[0081] If not, it is determined that the HTTP flag has not expired, and it is verified whether the user information carried in the HTTP flag matches the requested resource corresponding to the release request.
[0082] In this embodiment, when authenticating users, the HTTP header in the HTTP request is first identified, then the HTTP flag (token) in the HTTP header is identified, and finally the user who submitted the release request is authenticated based on the HTTP flag.
[0083] More specifically, user authentication requires identifying and parsing the HTTP flags carried in the HTTP header, verifying the validity of the HTTP flags, including verifying whether the HTTP flags have expired or been revoked at the current time, and verifying whether the user information carried in the HTTP flags matches the requested resource corresponding to the release request. If the authentication verifies that the HTTP flags are valid, then the authentication verifies and allows the user to access the requested resource corresponding to the release request.
[0084] Of course, if authentication fails, such as when the user information does not match the requested resource, the authentication will be deemed unsuccessful and the result will be returned to the management interface where the user submitted the release request, so that the user is clear about the situation.
[0085] Step S30: The code data is compiled, tested, and packaged using the CI / CD pipeline to obtain a program package, and the program package image is pushed to the container image repository.
[0086] In this embodiment, the steps of compiling, testing, and packaging the code data using the CI / CD pipeline to obtain a program package, and then pushing the program package image to the container image repository, include:
[0087] The code data is obtained, and the code data is compiled using a compilation tool to generate an executable file or intermediate code;
[0088] Perform unit testing, integration testing, end-to-end testing, and performance testing on the executable file or the intermediate code;
[0089] The executable file or intermediate code that passes all the tests is packaged into multiple packages according to its dependency relationship, and the packages and their runtime environment are packaged into corresponding package images.
[0090] The packaged program image is pushed to the container image repository for storage.
[0091] During code testing, automated tests such as unit tests and integration tests are executed to ensure code quality. Test cases are written using a testing framework and integrated into the CI / CD process. Furthermore, test results are fed back to the front-end management interface in real time for user viewing.
[0092] During the code packaging process, the compiled and tested code and its dependencies are packaged into a program package (such as a JAR or WAR file), and the necessary configuration files and metadata are included in the packaging process.
[0093] Step S40: Automatically update the deployment configuration in the Kubernetes cluster according to the container image repository to achieve synchronous updates across multiple locations and clusters.
[0094] In this embodiment, the deployment configuration in the Kubernetes cluster is automatically updated based on the new image in the container image repository, and the deployment configuration is managed using Kubernetes YAML files or Helm diagrams. Finally, the multi-cluster management capabilities of Kubernetes are used to achieve synchronous updates across multiple locations and clusters.
[0095] As a concrete example, this implementation manages releases based on a front-end / back-end separation model. Specifically, it uses Vue.js as the front-end framework and Django as the back-end framework, interacting with data through a RESTful API to manage software version releases. Vue.js is used to build interactive web applications, Django is a high-level Python web framework used for application development and maintenance, and the RESTful API is an application programming interface based on the REST (Representational State Transfer) architectural style.
[0096] The overall release management process of the method shown in this embodiment is as follows:
[0097] The user sends a request in the browser, which is received by the server through the Vue.js interceptor. The server authenticates the user based on the token in the header (and HTTP header), retrieves data from the database, processes it, and returns the result to the browser. Finally, the browser displays the data to the user, thus realizing release management.
[0098] The front-end part includes:
[0099] 1. Router layer
[0100] The Router layer defines the application's navigation path and determines which component is loaded when a user accesses different URLs. Vue Router is the official routing library for Vue.js, responsible for managing different views in the application and allowing users to switch between views within the application.
[0101] 2. Components layer
[0102] The Components layer is the core of Vue.js interceptors and serves as the basic unit for building user interfaces. Each component typically contains HTML, CSS, and JavaScript to describe the view and handle logic. Components can be page-level components or smaller UI units such as buttons and forms.
[0103] 3. Service Layer
[0104] The Service layer is responsible for communicating with the backend, typically using Axios to perform HTTP request operations. Its main responsibilities are sending requests to the backend, processing response data, and then passing the data to components for display or further processing.
[0105] The backend includes:
[0106] 1. Rest Framework layer
[0107] Django REST Framework (DRF) is a powerful and flexible toolkit for building web APIs. It extends Django's capabilities, making it easy to create and manipulate RESTful APIs. Key features include serialization, authentication, permission management, and routing.
[0108] 2. Model layer
[0109] The Model layer is the core of Django's ORM (Object-Relational Mapping), defining the structure and behavior of the database. Models are defined as classes and mapped to tables in the database. Each class in the Model layer corresponds to a table in the database, and the class's attributes correspond to fields in the table.
[0110] 3. Database
[0111] Databases are used for persistent data storage. Django supports various database backends, such as SQLite, PostgreSQL, and MySQL.
[0112] In this embodiment, the Database stores all business-related data, such as user information and work order information.
[0113] Compared with existing technologies, the software version release management method shown in this embodiment has the following advantages:
[0114] The method described in this embodiment detects the release information corresponding to the software program filled in by the user through a pre-loaded management interface on the front end, as well as the release request corresponding to the software program submitted based on the release information. The release information includes the version number, release description, and target ring. When a pre-set server in the back end receives the release request, it extracts code data from the software program based on the release request and release information, generates environment variables and configuration files corresponding to the code data, and triggers the backend CI / CD pipeline. The CI / CD pipeline compiles, tests, and packages the code data to obtain a program package, and pushes the program package image to a container image repository. The deployment configuration in the Kubernetes cluster is automatically updated based on the container image repository, achieving synchronous updates across multiple locations and clusters. Using the method described in this embodiment, by connecting R&D, testing, and operations personnel throughout the entire software release process, communication costs can be greatly reduced, data security during the software release process can be improved, and the rapid and secure execution of the software release process can be facilitated.
[0115] Example 2
[0116] Please see Figure 2 The second embodiment of the present invention provides a software version release management system, which is applied to the method described in the above embodiments. The system includes: a release request detection module 10, a release request processing module 20, a code data processing module 30, and a management execution module 40.
[0117] Release request detection module 10 is used to detect the release information corresponding to the software program filled in by the user through the management interface pre-loaded in the front end, and the release request corresponding to the software program submitted based on the release information.
[0118] Release request processing module 20 is used to extract code data from the software program according to the release request and the release information when the preset server in the backend receives the release request, generate environment variables and configuration files corresponding to the code data, and trigger the CI / CD pipeline in the backend.
[0119] The code data processing module 30 is used to compile, test and package the code data through the CI / CD pipeline to obtain a program package, and push the program package image to the container image repository.
[0120] The management execution module 40 is used to automatically update the deployment configuration in the Kubernetes cluster according to the container image repository, so as to realize synchronous updates in multiple locations and multiple clusters.
[0121] In this embodiment, the release request processing module 20 is specifically used for:
[0122] After the user fills in the release information and submits the release request in the management interface preloaded in the browser, the HTTP request operation is performed through the HTTP client on the front end.
[0123] When the pre-set server in the backend receives the HTTP request, it performs user authentication on the user who submitted the release request based on the HTTP flag in the HTTP header of the HTTP request.
[0124] During user authentication, code data from the software program is extracted based on the release information and release request. Corresponding environment variables and configuration files are generated based on the code data. The CI / CD pipeline in the backend is then started based on the code data, environment variables, and configuration files.
[0125] In this embodiment, the code data processing module 30 is specifically used for:
[0126] The code data is obtained, and the code data is compiled using a compilation tool to generate an executable file or intermediate code;
[0127] Perform unit testing, integration testing, end-to-end testing, and performance testing on the executable file or the intermediate code;
[0128] The executable file or intermediate code that passes all the tests is packaged into multiple packages according to its dependency relationship, and the packages and their runtime environment are packaged into corresponding package images.
[0129] The packaged program image is pushed to the container image repository for storage.
[0130] Compared with existing technologies, the advantages of using the software version release management system shown in this embodiment are as follows:
[0131] The system described in this embodiment detects the release information corresponding to the software program filled in by the user through a pre-loaded management interface on the front end, as well as the release request corresponding to the software program submitted based on the release information. The release information includes the version number, release description, and target ring. When a pre-set server in the back end receives a release request, it extracts code data from the software program based on the release request and release information, generates environment variables and configuration files corresponding to the code data, and triggers the backend CI / CD pipeline. The CI / CD pipeline compiles, tests, and packages the code data to obtain a program package, and pushes the program package image to a container image repository. The deployment configuration in the Kubernetes cluster is automatically updated based on the container image repository, achieving synchronous updates across multiple locations and clusters. Using the method described in this embodiment, by connecting R&D, testing, and operations personnel throughout the entire software release process, communication costs can be greatly reduced, data security during the software release process can be improved, and the rapid and secure execution of the software release process can be facilitated.
[0132] Example 3
[0133] A third embodiment of the present invention provides a readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the methods described in the above embodiments.
[0134] Example 4
[0135] A fourth embodiment of the present invention provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the steps of the method described in the above embodiments.
[0136] In the description of this specification, references to terms such as "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of the invention. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples.
[0137] The embodiments described above are merely illustrative of several implementations of the present invention, and while the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the present invention. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of the present invention, and these all fall within the protection scope of the present invention. Therefore, the protection scope of this patent should be determined by the appended claims.
Claims
1. A software version release management method, characterized in that, The method includes: The system detects the release information corresponding to the software program filled in by the user through a pre-loaded management interface in the front end, as well as the release request corresponding to the software program submitted based on the release information; wherein, the release information includes version number, release description and target environment; When the pre-set server in the backend receives the release request, it extracts the code data in the software program according to the release request and the release information, and generates environment variables and configuration files corresponding to the code data; Parse the token in the HTTP header of the release request, verify the validity of the token and the user's operation permissions for the target environment. If the authentication is successful, the backend CI / CD pipeline is triggered. In a CI / CD pipeline, the code data is acquired, and the code data is compiled using a compilation tool to generate an executable file or intermediate code. Perform unit testing, integration testing, end-to-end testing, and performance testing on the executable file or the intermediate code; The executable file or intermediate code that passes all the tests is packaged into multiple packages according to its dependency relationship. The packages and their target environments are packaged into corresponding package images. The packaged package images are pushed to the container image repository for storage. Update the Kubernetes deployment configuration based on the package image to achieve synchronous updates for clusters in multiple locations; The steps of parsing the token in the HTTP header of the release request and verifying the token's validity and the user's operation permissions for the target environment include: After the user fills in the release information and submits the release request in the management interface preloaded in the browser, the HTTP request operation is performed through the HTTP client on the front end. When the pre-set server in the backend receives the HTTP request, it performs user authentication on the user who submitted the release request based on the HTTP flag in the HTTP header of the HTTP request, in order to verify the validity of the token and the user's operation permissions to the target environment. During user authentication, code data from the software program is extracted based on the release information and release request. Corresponding environment variables and configuration files are generated based on the code data. The CI / CD pipeline in the backend is then started based on the code data, environment variables, and configuration files.
2. The software version release management method according to claim 1, characterized in that, When the pre-defined server in the backend receives the HTTP request, it performs user authentication on the user who submitted the release request based on the HTTP flags in the HTTP header of the HTTP request, in order to verify the validity of the token and the user's operation permissions for the target environment. The steps include: When the pre-set server in the backend receives the HTTP request, it identifies the HTTP headers in the HTTP request; Identify the HTTP flags carried in the HTTP header, and authenticate the user who initiated the release request based on the HTTP flags.
3. The software version release management method according to claim 2, characterized in that, The steps of identifying HTTP flags carried in the HTTP header and authenticating the user who initiated the release request based on the HTTP flags include: Identify and parse the HTTP flags carried in the HTTP header; Verifying the validity of the HTTP flag includes verifying whether the HTTP flag has expired, whether it has been revoked, and whether the user information carried in the HTTP flag matches the requested resource corresponding to the release request. If the HTTP flag is valid, authentication is performed to allow the user to access the requested resource corresponding to the release request; If not, return an authentication failure response to the management interface.
4. The software version release management method according to claim 3, characterized in that, Verifying the validity of the HTTP flag includes steps such as verifying whether the HTTP flag has expired, been revoked, and whether the user information carried in the HTTP flag matches the requested resource corresponding to the release request, including: Extract the HTTP flag from the HTTP header of the HTTP request; Verify whether the format of the HTTP flag conforms to preset requirements to determine the validity of the HTTP flag; If so, the HTTP flags are parsed using a lightweight authentication and authorization mechanism based on JSON to determine whether the current time is earlier than the time specified in the exp field; If not, query at least one database list that stores the HTTP flag that has been revoked, and determine whether the HTTP flag is in the database list; If not, it is determined that the HTTP flag has not expired, and it is verified whether the user information carried in the HTTP flag matches the requested resource corresponding to the release request.
5. A software version release management system, characterized in that, The system, applicable to the method of any one of claims 1-4, comprises: The release request detection module is used to detect the release information corresponding to the software program filled in by the user through the management interface pre-loaded in the front end, as well as the release request corresponding to the software program submitted based on the release information. The release request processing module is used to extract code data from the software program based on the release request and the release information when the preset server in the backend receives the release request, generate environment variables and configuration files corresponding to the code data, and trigger the CI / CD pipeline in the backend. The code data processing module is used to compile, test and package the code data through the CI / CD pipeline to obtain a program package, and push the program package image to the container image repository. The management execution module is used to automatically update the deployment configuration in the Kubernetes cluster based on the container image repository, so as to achieve synchronous updates across multiple locations and clusters.
6. The software version release management system according to claim 5, characterized in that, The release request processing module is specifically used for: After the user fills in the release information and submits the release request in the management interface preloaded in the browser, the HTTP request operation is performed through the HTTP client on the front end. When the pre-set server in the backend receives the HTTP request, it performs user authentication on the user who submitted the release request based on the HTTP flag in the HTTP header of the HTTP request. During user authentication, code data from the software program is extracted based on the release information and release request. Corresponding environment variables and configuration files are generated based on the code data. The CI / CD pipeline in the backend is then started based on the code data, environment variables, and configuration files.
7. The software version release management system according to claim 5, characterized in that, The code data processing module is specifically used for: The code data is obtained, and the code data is compiled using a compilation tool to generate an executable file or intermediate code; Perform unit testing, integration testing, end-to-end testing, and performance testing on the executable file or the intermediate code; The executable file or intermediate code that passes all the tests is packaged into multiple packages according to its dependency relationship, and the packages and their runtime environment are packaged into corresponding package images. The packaged program image is pushed to the container image repository for storage.
8. A readable storage medium having a computer program stored thereon, characterized in that, When the program is executed by the processor, it implements the steps of the method as described in any one of claims 1 to 4.
9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the steps of the method as described in any one of claims 1 to 4.
Citation Information
Patent Citations
Deployment method of application program
CN118626138A