System mirror image delivery method, device, equipment and medium
By setting feature branches for each requirement and generating a mirror file for plate testing, the problem of extended delivery cycles during parallel development of multiple requirements is solved, and efficient delivery and shortened delivery cycles are achieved.
Patent Information
- Application Number
- CN202510006184.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-02
- Publication Date
- 2025-04-11
AI Technical Summary
In the case of multiple requirements being developed in parallel, the existing technology is difficult to meet the development delivery capabilities, resulting in an extended delivery cycle of demand projects.
By setting the corresponding feature branches for each requirement for development, and combining the main application code and the basic package code to generate the mirror address of each service, obtaining the image file for version testing.
It realizes the efficiency of parallel development of multiple requirements, reduces the risk of code conflicts, ensures successful code compilation, and accelerates project delivery, improves delivery efficiency, and shortens delivery cycle.
Smart Images

Figure CN119807071A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computers, and in particular to a system image delivery method, device, equipment and medium. Background Art
[0002] When developing requirements for the system, the development environment deploys applications in the form of jar packages, and it is a single-branch deployment, so only single-branch development and joint debugging can be performed. This results in the development environment being unable to meet the situation of multiple requirements being developed in parallel. In related technologies, since there are fewer business and system requirements, there is no situation where multiple iterative requirements are developed in parallel and launched simultaneously, so no preventive measures are taken. However, once the above business and system requirements are inserted in parallel, the development delivery capability and the delivery cycle of the demand project will be reduced.
[0003] When conducting demand testing, the test environment deploys all applications in docker containers and runs them. When the development is delivered to the test stage, the code is delivered. In other words, the development will merge the branches of the environment to be tested, and let the tester select the branch on the quality assurance (QA) platform and build the image for testing. During the test, problems such as compilation failure will occur, which will also reduce the delivery cycle of the demand project. Therefore, how to quickly complete the delivery of the demand project has become a technical problem that needs to be solved urgently. Summary of the invention
[0004] In view of this, the purpose of this application is to provide a system image delivery method, device, equipment and medium, which can speed up project delivery, improve project delivery efficiency and shorten project delivery cycle. The specific scheme is as follows:
[0005] On the one hand, the present application provides a system image delivery method, including:
[0006] Obtain the code of the feature branch corresponding to each requirement of the system; each requirement corresponds to at least one service;
[0007] Merging the main application codes in all the codes to obtain a first merged code;
[0008] Perform pipeline construction based on the first merged code to obtain the mirror address of each of the services;
[0009] The image files of the services are obtained based on the image addresses, and the printing test is performed according to the image files.
[0010] Optionally, the obtaining of codes of feature branches corresponding to various requirements of the system includes:
[0011] Create feature branches corresponding to each of the requirements of the system;
[0012] Based on the requirements and the correspondence between the requirements and the services, selecting the services involved for each of the feature branches;
[0013] The code of each of the feature branches is determined based on the service.
[0014] Optionally, before merging the main application codes in all the codes to obtain the first merged code, the method further includes:
[0015] Merging the basic package codes in all the codes to obtain a second merged code;
[0016] Based on the configured script, the second merged code is stored in a local repository of the device where gitlabrunner is installed by running the script;
[0017] The step of merging the main application codes in all the codes to obtain a first merged code includes:
[0018] The main application code and the second merged code in all the codes are merged to obtain the first merged code.
[0019] Optionally, the method further comprises:
[0020] Get the pipeline build log;
[0021] Analyze the pipeline construction log to obtain a pipeline construction result; the pipeline construction result is used to identify whether the pipeline is successfully constructed;
[0022] When the pipeline construction result indicates that the target pipeline construction corresponding to the target service fails, an alarm message is issued.
[0023] Optionally, before merging the main application codes in all the codes to obtain the first merged code, the method further includes:
[0024] Scanning the code to obtain a scanning result; the scanning result is used to identify whether the code is correct;
[0025] A smoke test is performed on the code to obtain a test result; the test result is used to identify whether the basic function of the code is normal.
[0026] Optionally, acquiring the image file of each of the services based on each of the image addresses includes:
[0027] Comparing all the mirror addresses for consistency to obtain a comparison result;
[0028] When the comparison result indicates that the suffixes of all the mirror addresses are consistent, the mirror file of each service is obtained based on each mirror address.
[0029] On the other hand, the embodiment of the present application further provides a system image delivery device, including:
[0030] An acquisition unit, used to acquire the code of a feature branch corresponding to each requirement of the system; each requirement corresponds to at least one service;
[0031] A merging unit, used for merging the main application codes in all the codes to obtain a first merged code;
[0032] A construction unit, configured to perform pipeline construction based on the first merged code to obtain a mirror address of each of the services;
[0033] The testing unit is used to obtain the image file of each of the services based on each of the image addresses, and perform a version test according to the image file.
[0034] Optionally, the acquiring unit is used to:
[0035] Create feature branches corresponding to each of the requirements of the system;
[0036] Based on the requirements and the correspondence between the requirements and the services, selecting the services involved for each of the feature branches;
[0037] The code of each of the feature branches is determined based on the service.
[0038] In another aspect, an embodiment of the present application provides a computer device, the computer device comprising a processor and a memory:
[0039] The memory is used to store program code and transmit the program code to the processor;
[0040] The processor is configured to execute the method described above according to the instructions in the program code.
[0041] On the other hand, an embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium is used to store a computer program, and the computer program is used to execute the method described in the above aspects.
[0042] The embodiment of the present application provides a system image delivery method, device, equipment and medium, obtains the code of the feature branch corresponding to each requirement of the system; one requirement corresponds to at least one service; the main application code in all the codes is merged and processed to obtain a first merged code; pipeline construction is performed based on the first merged code to obtain the image address of each service; the image file of each service is obtained based on each image address, and the version test is performed according to the image file. It can be seen that by setting the corresponding feature branch for each requirement for development, multiple requirements can be developed in parallel, and they will not affect each other during the development process, thereby improving development efficiency. In the testing phase, version testing is performed through the image files corresponding to each service, which greatly reduces the risk of code conflicts and ensures that the code compilation can be successful. In short, the present application is delivered by using image files, combined with continuous integration and continuous delivery, which can speed up project delivery, improve project delivery efficiency, and shorten project delivery cycles in both the development and testing phases. BRIEF DESCRIPTION OF THE DRAWINGS
[0043] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0044] Figure 1 A schematic diagram of a process flow of a system image delivery method provided in an embodiment of the present application is shown;
[0045] Figure 2 A structural block diagram of a system image delivery device provided in an embodiment of the present application;
[0046] Figure 3 A structural diagram of a computer device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0047] In order to make the above-mentioned objects, features and advantages of the present application more obvious and easy to understand, the specific implementation methods of the present application are described in detail below with reference to the accompanying drawings.
[0048] In the following description, many specific details are set forth to facilitate a full understanding of the present application, but the present application may also be implemented in other ways different from those described herein, and those skilled in the art may make similar generalizations without violating the connotation of the present application. Therefore, the present application is not limited to the specific embodiments disclosed below.
[0049] The system image delivery method provided in the embodiment of the present application can be implemented by a computer device, which can be a terminal device or a server, wherein the server can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server providing cloud computing services. Terminal devices include but are not limited to mobile phones, computers, intelligent voice interaction devices, smart home appliances, vehicle-mounted terminals, etc. The terminal device and the server can be directly or indirectly connected via wired or wireless communication, and this application does not impose any restrictions on this.
[0050] For ease of understanding, a system image delivery method, apparatus, device and medium provided in an embodiment of the present application are described in detail below with reference to the accompanying drawings.
[0051] refer to Figure 1 As shown, it is a flow chart of a system image delivery method provided in an embodiment of the present application. The method can be executed by a computer device. In this embodiment, the computer device is taken as a server as an example. The method can include the following steps.
[0052] S101, obtaining the code of the feature branch corresponding to each requirement of the system.
[0053] Specifically, the system can be various software systems, such as a supply chain finance system. When developing requirements for the system, especially when multiple requirements are developed in parallel, the server can obtain the code of the feature branch corresponding to each requirement.
[0054] Among them, feature branches correspond to requirements one by one, one requirement corresponds to one feature branch, and the feature branch is used by developers to develop the requirement. The code of the feature branch can be understood as the code corresponding to the feature branch, which is used to implement a certain requirement. In addition, one requirement corresponds to at least one service. In other words, one requirement may involve one or more services, depending on the specific content of the requirement.
[0055] In a possible implementation, S101 obtains the code of the feature branch corresponding to each requirement of the system, which may specifically include steps S1011-S1013.
[0056] S1011, create feature branches corresponding to various system requirements.
[0057] Specifically, a corresponding feature branch can be created for each requirement. For example, feature branch a can be created for requirement 1, and feature branch b can be created for requirement 2.
[0058] S1012: Based on the requirements and the correspondence between the requirements and the services, the services involved are selected for each feature branch.
[0059] Specifically, for each feature branch, based on the requirements corresponding to the feature branch and the services corresponding to the requirements, the services involved in the feature branch can be selected from a large number of services. As an example, in the page of the development integration platform, the branch corresponding to the requirements can be checked as the service involved in the feature branch. In this way, the codes of different services can be clearly distinguished.
[0060] S1013, determining the code of each feature branch based on the service.
[0061] Specifically, developers can develop and debug codes on each feature branch, for example, by writing code to obtain codes for each feature branch, which are used to implement the requirements corresponding to the feature branch. The server can determine the code related to the service from a large amount of code based on the specific service, thereby determining the code as the code related to the requirements of the service, that is, determining which feature branch the code belongs to, thereby implementing the process of determining the corresponding code for each feature branch. In short, the server can associate the code with the feature branch, and can distinguish different codes of different feature branches.
[0062] In short, by creating a corresponding feature branch for each requirement for code development, multiple requirements can be developed in parallel, and the code of different feature branches can be developed independently. That is, the code of a certain requirement does not need to depend on another piece of code for development and deployment, which greatly improves the efficiency of requirement development.
[0063] S102: merge the main application codes in all the codes to obtain a first merged code.
[0064] Specifically, the main application code can be understood as the main code related to the requirements, and the main application code in all the codes can be merged to obtain the first merged code. The first merged code is the merged code that can realize all the requirements.
[0065] In a possible implementation, before S102 merges the main application code in all the codes to obtain the first merged code, S201-S202 may be further executed, and S102 may specifically merge the main application code in all the codes and the second merged code to obtain the first merged code.
[0066] S201, merging the basic package codes in all the codes to obtain a second merged code.
[0067] Specifically, the basic package code can be understood as a code for implementing the basic functions of the system, which is a universal code. By merging the basic package code in all the codes, a second merged code can be obtained.
[0068] S202, based on the configured script, the second merged code is stored in the local repository of the device where the gitlab runner is installed by running the script.
[0069] Specifically, script matching can be performed on gitlab-cl.yml, and the script can be run to automatically trigger code storage, and the second merged code can be stored in the local warehouse of the device where gitlab runner is installed. In this way, it is convenient to obtain the basic package code from the warehouse later, thereby improving the efficiency of obtaining the basic package code.
[0070] In addition, when merging codes to obtain the first merged code, not only the main application code can be merged in, but also the basic package code can be merged, that is, the first merged code includes both the basic package code and the main application code, so that when the pipeline is built later, the built image is more accurate.
[0071] In a possible implementation, before merging the main application code in all the codes to obtain the first merged code in S102, the code may be scanned to obtain a scan result, and a smoke test may be performed on the code to obtain a detection result.
[0072] Specifically, after the developer has finished writing the code, the code can be scanned to check whether the code is standardized, thereby obtaining the scanning result, which is used to identify whether the code is correct. In short, the scanning result can reflect whether there is an error in the code, and which specific section of the code is wrong, and of course, it can also give code modification suggestions.
[0073] In addition, you can also perform smoke testing on the code. Smoke testing can be understood as testing the basic functions of the code to ensure that the basic functions and processes can be run. The test results obtained by smoke testing can identify whether the basic functions of the code are normal, thereby ensuring that the basic functions of the code can be realized.
[0074] S103, constructing a pipeline based on the first merged code to obtain the mirror address of each service.
[0075] Specifically, the server can build a pipeline according to the first merged code, and the image address of the service can be obtained after the framework is completed. When the system has multiple services, for each service, a corresponding pipeline can be built to obtain the image address of each service. As an example, if there are 3 services, 3 pipelines can be built to obtain 3 image addresses in total. In addition, the image address can be stored in the harbor image warehouse, and subsequent developers can obtain the image address from the warehouse for aggregation to generate the required list.
[0076] In practical applications, this solution specifically includes three steps, namely environment preparation, gitlab configuration, and related script writing. In the environment preparation step, you can install a container deployment and management platform on the development environment, such as installing kubernetes (k8s), registering an executor (gitlab-runner), and setting up master and slave nodes, 1 master node and 2 slave nodes. K8s can be used to deploy image files, and the registrar is used to perform continuous integration (CI), continuous delivery (CD), and continuous deployment (CD) tasks, such as triggering the construction of a pipeline. CI / CD can significantly improve the speed and quality of software delivery, enabling teams to respond more quickly to market changes and user needs.
[0077] Specifically, in the gitlab configuration step, you can view the registration status of the runners of each service. The normal registration of the runners of each service is a prerequisite for normal CI / CD. In addition, developers can also pre-set the suffix of the image address, or the image name (tag). The suffix can be the release date, and the suffix can be used to distinguish the old and new versions of the software. In this way, the image address obtained through the pipeline construction can be named by the developer, which can ensure the correctness of the upper limit release application image and avoid the occurrence of the wrong image in production.
[0078] In the relevant script writing steps, you can write the gitlab-ci.yml file, which is used to compile the basic package and generate images for each service. The root-clean.sh file is mainly used to delete the previous dangling image to save storage space. The deployImageTarget.sh file is mainly used to batch modify the suffix of the image address when the environment is switched, such as when the development environment is switched to the test environment, so as to generate an image address that matches the test environment. The xiaoneng-image-notice.sh file is mainly used to implement the efficiency robot to push the image address, the developer's modification content, and issue warning information.
[0079] S104, obtaining the image files of each service based on each image address, and performing a version test according to the image files.
[0080] Specifically, the image file can be obtained based on the image address, a test version can be built based on the image file, and corresponding test processing can be performed.
[0081] In short, this application is developed by setting up corresponding feature branches for each requirement, so that multiple requirements can be developed in parallel, which will not affect each other during the development process and improve development efficiency. During the testing phase, the image files corresponding to each service are used for version testing, which greatly reduces the risk of code conflicts and ensures that the code compilation can be successful. In short, this application is delivered by using image files, combined with continuous integration and continuous delivery, which can speed up project delivery, improve project delivery efficiency, and shorten project delivery cycles in both the development and testing phases.
[0082] Because in related technologies, when developers submit tests, they will merge the basic packages and various application codes into the develop branch and then into the test branch. The intermediate process will be accompanied by conflict resolution, that is, the code may conflict, and manual intervention is required to remind the tester to make the corresponding application. This stage cannot finally ensure that the test can be compiled successfully. In addition, when the tester makes the version of the branch code given by the developer, he relies on the QA platform to determine the image name, and then makes the version of all back-end applications. In the middle, there are often problems such as version failure, compilation of xxsdk, xxBO, etc., which do not exist. Finally, due to the code being missed, other teams updating the sdk version without notification, or the warehouse not having the corresponding package, etc., this will also cause the test to fail to compile successfully.
[0083] In a possible implementation, S301 - S303 may also be performed.
[0084] S301, obtaining a pipeline construction log.
[0085] Specifically, the efficiency robot can also obtain relevant logs generated during pipeline construction, that is, pipeline construction logs, which can record the pipeline construction process.
[0086] S302, analyzing the pipeline construction log to obtain the pipeline construction result.
[0087] Specifically, the efficiency robot can analyze the log to obtain the pipeline construction result.
[0088] The pipeline construction result is used to identify whether the pipeline is successfully built, that is, the result can reflect whether the corresponding pipeline is successfully built for a certain service.
[0089] S303: When the pipeline construction result indicates that the target pipeline construction corresponding to the target service fails, an alarm message is issued.
[0090] Specifically, the target service can be any service. If the pipeline construction result indicates that the target pipeline construction corresponding to the target service fails, it means that the image is not generated, and an alarm message needs to be issued. The alarm message is used to prompt the tester that the pipeline construction fails and remedial measures need to be taken.
[0091] In short, through log analysis, testers can be reminded in time when the pipeline build fails, and the problem can be solved in time to avoid subsequent test version failures and ensure successful test compilation.
[0092] In a possible implementation, obtaining the image file of each of the services based on each of the image addresses can be specifically performed by comparing all of the image addresses for consistency to obtain a comparison result; when the comparison result indicates that the suffixes of all of the image addresses are consistent, obtaining the image file of each of the services based on each of the image addresses.
[0093] Specifically, in order to ensure that all mirror addresses are correct, they can be compared for consistency. The consistency comparison can be understood as comparing the suffix parts of the mirror addresses to determine whether they are the same. After the consistency comparison is completed, a comparison result can be obtained.
[0094] If the comparison result indicates that the suffixes of all the image addresses are the same, for example, they are all 2024-1201, it means that the image corresponding to the image address is the image of the latest updated code to be tested, then the image file of each service can be obtained based on each of the image addresses, so as to implement the test of the latest code and ensure the correctness of the test object.
[0095] If the comparison result does not indicate that the suffixes of all the image addresses are the same, that is, the suffix of at least one image address is different from the suffixes of other image addresses, it means that the image address is wrong, that is, it corresponds to an old version of the code, not the latest code, and you need to re-execute the code merging and image address generation process.
[0096] For example, a requirement involves three mirror addresses, namely http:........A-master-2024-1201, http:........B-master-2024-1201 and http:........C-master-2024-1101. After consistency comparison, it is found that the suffix of the third mirror address is different, which means that the mirror address is not the latest mirror address. You need to re-obtain the latest mirror address, that is, http:........C-master-2024-1201.
[0097] In addition, after the test is passed, in the production stage, you can also perform processes such as merging basic package codes, storing basic packages in local warehouses, merging main application codes, and generating mirror addresses. This mirror address is different from the aforementioned mirror address. This mirror address is mainly used to deploy the software in a production environment and put the software online.
[0098] In short, this application has significant effects in all stages. In the development stage, the mirror address can be modified in batches by calling the gitlab modification interface. Code merging can avoid subsequent code conflicts, and pipeline construction can be triggered manually or automatically, making pipeline construction more flexible. In addition, the mirror address of all services can be provided for testing, and the mirror address can be modified immediately after going online, and the basic package can be modified to prevent overwriting. In the testing stage, the integrity and consistency of the mirror address provided by R&D can be checked in batches to ensure the accuracy of the mirror address. In the testing stage, the mirror prefix can be modified with one click, and batch modifications can be made. In the operation and maintenance stage, the release mirror work order provided by R&D can be pulled online to improve the accuracy and efficiency of going online.
[0099] The embodiment of the present application provides a system image delivery method, which obtains the code of the feature branch corresponding to each requirement of the system; one requirement corresponds to at least one service; the main application code in all the codes is merged to obtain a first merged code; pipeline construction is performed based on the first merged code to obtain the image address of each service; the image file of each service is obtained based on each image address, and the version test is performed according to the image file. It can be seen that by setting the corresponding feature branch for each requirement for development, multiple requirements can be developed in parallel, and they will not affect each other during the development process, thereby improving development efficiency. In the testing phase, version testing is performed through the image files corresponding to each service, which greatly reduces the risk of code conflicts and ensures that the code compilation can be successful. In short, the present application is delivered by using image files, combined with continuous integration and continuous delivery, which can speed up project delivery, improve project delivery efficiency, and shorten project delivery cycles in both the development and testing phases.
[0100] Based on the above system image delivery method, the present application embodiment also provides a system image delivery device, referring to Figure 2 As shown, it is a structural block diagram of a system image delivery device provided in an embodiment of the present application, and the device may include:
[0101] An acquisition unit 201 is used to acquire the code of a feature branch corresponding to each requirement of the system; each requirement corresponds to at least one service;
[0102] A merging unit 202, configured to merge the main application codes in all the codes to obtain a first merged code;
[0103] A construction unit 203 is used to perform pipeline construction based on the first merged code to obtain the mirror address of each of the services;
[0104] The testing unit 204 is used to obtain the image file of each of the services based on each of the image addresses, and perform a version test according to the image file.
[0105] Optionally, the acquiring unit is used to:
[0106] Create feature branches corresponding to each of the requirements of the system;
[0107] Based on the requirements and the correspondence between the requirements and the services, selecting the services involved for each of the feature branches;
[0108] The code of each of the feature branches is determined based on the service.
[0109] Optionally, the device further comprises:
[0110] A merging unit, used for merging the basic package codes in all the codes to obtain a second merged code;
[0111] A storage unit, configured to store the second merged code in a local repository of a device on which gitlab runner is installed, based on a configured script by running the script;
[0112] The merging unit is further used for:
[0113] The main application code and the second merged code in all the codes are merged to obtain the first merged code.
[0114] Optionally, the device further comprises:
[0115] The acquisition unit is used to obtain the pipeline build log;
[0116] An analysis unit, used to analyze the pipeline construction log to obtain a pipeline construction result; the pipeline construction result is used to indicate whether the pipeline is successfully constructed;
[0117] The alarm unit is used to issue an alarm message when the target pipeline construction result indicates that the target service corresponding to the target pipeline construction fails.
[0118] Optionally, the device further comprises:
[0119] A scanning unit, used to scan the code to obtain a scanning result; the scanning result is used to identify whether the code is correct;
[0120] The testing unit is used to perform a smoke test on the code to obtain a test result; the test result is used to identify whether the basic function of the code is normal.
[0121] Optionally, the acquiring unit is used to:
[0122] Comparing all the mirror addresses for consistency to obtain a comparison result;
[0123] When the comparison result indicates that the suffixes of all the mirror addresses are consistent, the mirror file of each service is obtained based on each mirror address.
[0124] The embodiment of the present application provides a system image delivery device, which can realize parallel development of multiple requirements by setting corresponding feature branches for each requirement for development, and will not affect each other during the development process, thereby improving development efficiency. During the testing phase, the image files corresponding to each service are used for version testing, which greatly reduces the risk of code conflicts and ensures that the code compilation can be successful. In short, this application uses image files for delivery, combined with continuous integration and continuous delivery, to speed up project delivery, improve project delivery efficiency, and shorten project delivery cycles in both the development and testing phases.
[0125] In another aspect, the present application provides a computer device, referring to Figure 3 , which is a structural diagram of a computer device provided in an embodiment of the present application, wherein the computer device includes a processor 310 and a memory 320:
[0126] The memory 320 is used to store program codes and transmit the program codes to the processor 310;
[0127] The processor 310 is used to execute the method provided in the above embodiment according to the instructions in the program code.
[0128] The computer device may include a terminal device or a server, and the aforementioned apparatus may be configured in the computer device.
[0129] On the other hand, an embodiment of the present application further provides a storage medium, wherein the storage medium is used to store a computer program, and the computer program is used to execute the method provided by the above embodiment.
[0130] A person skilled in the art can understand that all or part of the steps of implementing the above method embodiment can be completed by program instruction hardware, and the above program can be stored in a computer-readable storage medium. When the program is executed, it executes the steps of the above method embodiment; and the above storage medium can be at least one of the following media: read-only memory (English: Read-only Memory, abbreviated: ROM), RAM, magnetic disk or optical disk, etc. Various media that can store program codes.
[0131] Each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.
[0132] The above is only a preferred implementation of the present application. Although the present application has been disclosed as a preferred embodiment, it is not intended to limit the present application. Any technician familiar with the art can use the above disclosed methods and technical contents to make many possible changes and modifications to the technical solution of the present application without departing from the scope of the technical solution of the present application, or modify it into an equivalent embodiment of equivalent changes. Therefore, any simple modification, equivalent change and modification made to the above embodiments based on the technical essence of the present application without departing from the content of the technical solution of the present application still falls within the scope of protection of the technical solution of the present application.
Claims
1. A system image delivery method, characterized in that: include: Get the code of the feature branch corresponding to each requirement of the system; One of the requirements corresponds to at least one service; Merging the main application codes in all the codes to obtain a first merged code; Perform pipeline construction based on the first merged code to obtain the mirror address of each of the services; The image files of the services are obtained based on the image addresses, and the printing test is performed according to the image files.
2. The method according to claim 1, characterized in that The code of the feature branch corresponding to each requirement of the system is obtained, including: Create feature branches corresponding to each of the requirements of the system; Based on the requirements and the correspondence between the requirements and the services, selecting the services involved for each of the feature branches; The code of each of the feature branches is determined based on the service.
3. The method according to claim 1, characterized in that Before merging the main application codes in all the codes to obtain the first merged code, the method further includes: Merging the basic package codes in all the codes to obtain a second merged code; Based on the configured script, the second merged code is stored in a local repository of the device where gitlab runner is installed by running the script; The step of merging the main application codes in all the codes to obtain a first merged code includes: The main application code and the second merged code in all the codes are merged to obtain the first merged code.
4. The method according to claim 1, characterized in that: The method further comprises: Get the pipeline build log; Analyze the pipeline construction log to obtain a pipeline construction result; the pipeline construction result is used to identify whether the pipeline is successfully constructed; When the pipeline construction result indicates that the target pipeline construction corresponding to the target service fails, an alarm message is issued.
5. The method according to any one of claims 1 to 4, characterized in that: Before merging the main application codes in all the codes to obtain the first merged code, the method further includes: Scanning the code to obtain a scanning result; the scanning result is used to identify whether the code is correct; A smoke test is performed on the code to obtain a test result; the test result is used to identify whether the basic function of the code is normal.
6. The method according to any one of claims 1 to 4, characterized in that: Obtaining the image files of each of the services based on each of the image addresses includes: Comparing all the mirror addresses for consistency to obtain a comparison result; When the comparison result indicates that the suffixes of all the mirror addresses are consistent, the mirror file of each service is obtained based on each mirror address.
7. A system image delivery device, characterized in that: include: The acquisition unit is used to obtain the code of the feature branch corresponding to each requirement of the system; One of the requirements corresponds to at least one service; A merging unit, used for merging the main application codes in all the codes to obtain a first merged code; A construction unit, configured to perform pipeline construction based on the first merged code to obtain a mirror address of each of the services; The testing unit is used to obtain the image file of each of the services based on each of the image addresses, and perform a version test according to the image file.
8. The device according to claim 7, characterized in that The acquisition unit is used to: Create feature branches corresponding to each of the requirements of the system; Based on the requirements and the correspondence between the requirements and the services, selecting the services involved for each of the feature branches; The code of each of the feature branches is determined based on the service.
9. A computer device, characterized in that: The computer device comprises a processor and a memory: The memory is used to store program code and transmit the program code to the processor; The processor is configured to execute the method according to any one of claims 1 to 6 according to the instructions in the program code.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium is used to store a computer program, and the computer program is used to execute the method according to any one of claims 1 to 6.