Application construction method and device, equipment, storage medium and program product

By reusing shared construction space and building space state information, the inefficiency problem caused by independent construction of multiple links in the application development process is solved, and resource reuse and efficiency improvement are achieved.

CN118916000APending Publication Date: 2024-11-08CCB FINTECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410960755.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-17
Publication Date
2024-11-08

AI Technical Summary

Technical Problem

In the application development process, the main body of the operational application in each link independently pulls the source code for construction, resulting in inefficiency, resulting in repeated operations and waste of space resources.

Method used

Through the concept of sharing the construction space, based on the spatial state information of the construction space, determine whether the source code of the target application needs to be constructed. If it has been constructed and the source code version is consistent, the construction result will be reused. If it is inconsistent, the space will be cleaned and the source code will be updated for construction. Achieve resource reuse and efficiency improvement.

Benefits of technology

It greatly improves the efficiency of application construction, reduces the time-consuming and space resources consumption of repeated operations, and improves the work efficiency of developers and the release efficiency of applications.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118916000A_ABST
    Figure CN118916000A_ABST
Patent Text Reader

Abstract

The invention provides an application construction method and device, equipment, a storage medium and a program product, and relates to the technical field of big data. The method comprises the steps that in response to a construction instruction for a current construction target of a target application, space information of a target construction space corresponding to the target application is obtained according to application information of the target application, and different construction targets share the target construction space; mounting a target construction space according to the space information; obtaining space state information of the target construction space, wherein the space state information comprises source code version information, construction state information and construction result information of the target application; according to the spatial state information, determining whether to construct a source code of the target application based on the current construction target; and if not, obtaining a target construction result of the target application from the target construction space according to the construction result information. The construction efficiency of the target application can be greatly improved, so that the working efficiency of developers is improved, and the consumption of space resources is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of big data technology, and in particular to an application construction method, device, equipment, storage medium and program product. Background Art

[0002] The application development process usually includes multiple steps, such as code writing, local testing, unit testing, system integration testing, application assembly testing, user acceptance testing, version verification testing, non-functional testing, system security verification, virus scanning, and application product archiving.

[0003] At present, in the application development process, there are different operating application subjects in each link, and different operating application subjects pull the source code of the application to build the application and obtain the application construction result. However, the application construction in the above manner has the problem of low efficiency. Summary of the invention

[0004] The present application provides an application construction method, device, equipment, storage medium and program product to improve application construction efficiency.

[0005] In a first aspect, the present application provides an application construction method, comprising:

[0006] In response to a build instruction for a current build target of a target application, obtaining space information of a target build space corresponding to the target application according to application information of the target application, and different build targets share the target build space;

[0007] According to the space information, mount the target to build the space;

[0008] Obtain the space status information of the target build space, which includes the source code version information, build status information, and build result information of the target application;

[0009] According to the space status information, determine whether to build the source code of the target application based on the current build target;

[0010] If not, the target build result of the target application is obtained from the target build space according to the build result information.

[0011] In one possible design, based on the space status information, it is determined whether to build the source code of the target application based on the current build target, including: based on the build status information, determining whether the target application has been built; if the target application has been built, determining whether the first source code version included in the build result information is consistent with the second source code version corresponding to the current build target, if they are consistent, determining not to build the source code of the target application based on the current build target; if they are inconsistent, determining to build the source code of the target application based on the current build target; if the target application has not been built, determining to build the source code of the target application based on the current build target.

[0012] In one possible design, after determining to build the source code of the target application based on the current build target, the application construction method also includes: determining whether the third source code version included in the source code version information is consistent with the second source code version corresponding to the current build target; if consistent, building the source code of the target application based on the current build target to obtain the current build result of the target application; if inconsistent, clearing the target build space, and obtaining the target source code corresponding to the second source code version, building the target source code, and obtaining the current build result of the target application.

[0013] In a possible design, after obtaining the current build result of the target application, the application building method further includes: copying the current build result to a target storage path outside the target building space.

[0014] In a possible design, after obtaining the target construction result of the target application, the application construction method further includes: unmounting the target construction space.

[0015] In one possible design, after unmounting the target build space, the application building method further includes: in response to a build instruction for a build target after the current build target, executing a step of acquiring space information of the target build space corresponding to the target application based on application information of the target application.

[0016] In one possible design, before responding to a build instruction for the current build target of the target application, the application building method also includes: responding to an application instruction for a target build space, allocating a target build space and an entry path of the target build space to the target application based on application information of the target application and space resource application information of the target build space.

[0017] In a possible design, after allocating a target build space and an entry path of the target build space to the target application, the application construction method further includes: obtaining source code corresponding to an initial source code version of the target application.

[0018] In one possible design, the space information includes an entry path and a device identifier of a device where the target construction space is located.

[0019] In a possible design, the space status information also includes usage status information of the target build space. If it is determined based on the usage status information that build instructions for build targets corresponding to multiple users are received, the steps of determining whether to build the source code of the target application based on the current build target are executed in accordance with the space status information in a build order; the build order includes at least one of the order in which users mount the target build space, the priority of the user, or the job order of the build target.

[0020] In a second aspect, the present application provides an application construction device, comprising:

[0021] A first acquisition module is used to respond to a build instruction for a current build target of a target application and acquire space information of a target build space corresponding to the target application according to application information of the target application, wherein different build targets share the target build space;

[0022] The mounting module is used to mount the target to build the space according to the space information;

[0023] A second acquisition module is used to acquire space status information of a target build space, where the space status information includes source code version information, build status information, and build result information of a target application;

[0024] A determination module, used to determine whether to build the source code of the target application based on the current build target according to the space status information;

[0025] The third acquisition module is used to acquire the target build result of the target application from the target build space according to the build result information if no.

[0026] In one possible design, the determination module is specifically used to: determine whether the target application has been built based on the build status information; if the target application has been built, determine whether the first source code version contained in the build result information is consistent with the second source code version corresponding to the current build target; if they are consistent, determine not to build the source code of the target application based on the current build target; if they are inconsistent, determine to build the source code of the target application based on the current build target; if the target application has not been built, determine to build the source code of the target application based on the current build target.

[0027] In one possible design, the determination module is also used to: after determining to build the source code of the target application based on the current build target, determine whether the third source code version contained in the source code version information is consistent with the second source code version corresponding to the current build target; if they are consistent, build the source code of the target application based on the current build target to obtain the current build result of the target application; if they are inconsistent, clean up the target build space, obtain the target source code corresponding to the second source code version, build the target source code, and obtain the current build result of the target application.

[0028] In a possible design, the determination module is further configured to: after obtaining the current build result of the target application, copy the current build result to a target storage path outside the target build space.

[0029] In a possible design, the third acquisition module is further used to: after acquiring the target build result of the target application, unmount the target build space.

[0030] In one possible design, the first acquisition module is also used to: after the third acquisition module unmounts the target build space, in response to a build instruction for a build target after the current build target, execute a step of acquiring space information of the target build space corresponding to the target application based on application information of the target application.

[0031] In one possible design, the application construction device also includes an allocation module for allocating a target construction space and an entry path of the target construction space to the target application based on application information of the target application and space resource application information of the target construction space in response to an application instruction for the target construction space before responding to a construction instruction for the current construction target of the target application.

[0032] In a possible design, the allocation module is further used to: after allocating a target build space and an entry path of the target build space to the target application, obtain the source code corresponding to the initial source code version of the target application.

[0033] In one possible design, the space information includes an entry path and a device identifier of a device where the target construction space is located.

[0034] In a possible design, the space status information also includes usage status information of the target build space. If it is determined based on the usage status information that build instructions for build targets corresponding to multiple users are received, the steps of determining whether to build the source code of the target application based on the current build target are executed in accordance with the space status information in a build order; the build order includes at least one of the order in which users mount the target build space, the priority of the user, or the job order of the build target.

[0035] In a third aspect, the present application provides an electronic device comprising: at least one processor and a memory; the memory stores computer-executable instructions; the at least one processor executes the computer-executable instructions stored in the memory, so that the at least one processor executes the application construction method described in the first aspect and various possible designs of the first aspect.

[0036] In a fourth aspect, the present application provides a computer-readable storage medium, in which computer execution instructions are stored. When the computer execution instructions are executed, they are used to implement the application construction method described in the first aspect and various possible designs of the first aspect.

[0037] In a fifth aspect, an embodiment of the present application provides a computer program product, including a computer program. When the computer program is executed, it implements the application construction method described in the first aspect and various possible designs of the first aspect.

[0038] The application construction method, apparatus, equipment, storage medium and program product provided by the present application respond to the construction instruction of the current construction target of the target application, obtain the space information of the target construction space corresponding to the target application according to the application information of the target application, and different construction targets share the target construction space; mount the target construction space according to the space information; obtain the space status information of the target construction space, the space status information includes the source code version information, construction status information and construction result information of the target application; determine whether to build the source code of the target application based on the current construction target according to the space status information; if not, obtain the target construction result of the target application from the target construction space according to the construction result information. In the present application, the target application corresponds to an exclusive target build space, and different build targets of the target application can share the target build space; by determining not to build the source code of the target application based on the space status information of the target build space, the target build result of the target application can be directly obtained from the target build space, that is, the target build result of the target application can be reused, which can greatly improve the build efficiency of the target application and reduce the time spent on repeated operations when building the target application, thereby improving the work efficiency of developers and reducing the consumption of space resources, thereby improving the overall release efficiency of the target application. BRIEF DESCRIPTION OF THE DRAWINGS

[0039] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.

[0040] Figure 1 A schematic diagram of an application scenario provided for an embodiment of the present application;

[0041] Figure 2A flowchart of an application construction method provided in one embodiment of the present application;

[0042] Figure 3 A flowchart of an application construction method provided in another embodiment of the present application;

[0043] Figure 4 A flowchart of an application construction method provided in yet another embodiment of the present application;

[0044] Figure 5 A schematic diagram of the structure of an application construction device provided in one embodiment of the present application;

[0045] Figure 6 A schematic diagram of the structure of an electronic device provided in one embodiment of the present application.

[0046] The above drawings have shown clear embodiments of the present application, which will be described in more detail later. These drawings and text descriptions are not intended to limit the scope of the present application in any way, but to illustrate the concept of the present application to those skilled in the art by referring to specific embodiments. DETAILED DESCRIPTION

[0047] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the following exemplary embodiments do not represent all implementations consistent with the present application. Instead, they are merely examples of devices and methods consistent with some aspects of the present application as detailed in the appended claims.

[0048] In the technical solution of this application, the collection, storage, use, processing, transmission, provision and disclosure of information such as financial data or user data involved shall comply with the provisions of relevant laws and regulations and shall not violate public order and good morals.

[0049] It should be noted that in the embodiments of the present application, certain software, components, models and other existing solutions in the industry may be mentioned, and they should be regarded as exemplary. Their purpose is only to illustrate the feasibility of implementing the technical solution of the present application, but it does not mean that the applicant has or will necessarily use the solution.

[0050] The application development process usually includes multiple links. For example, the application development process of financial enterprises includes code writing, local testing, unit testing, system integration testing, application assembly testing, user acceptance testing, version verification testing, non-functional testing, system security verification, virus scanning, and application artifact archiving. Among them, existing enterprise-level build pipeline technology and source code and artifact warehouse management technology can be used, such as gitlab (an open source project for warehouse management systems), jenkins (a continuous integration tool), nexus-oss (an open source warehouse manager) artifact library and artifactory (a general binary warehouse manager).

[0051] At present, in the application development process, there are different operating application subjects in each link, and different operating application subjects pull the source code of the application to build the application and obtain the application construction results. Since different operating application subjects are independent of each other in resource management, the source code of the application will be repeatedly pulled and compiled by different operating application subjects, and the built application products will be repeatedly copied and circulated to form multiple copies. Therefore, the application construction in the above way has the problem of low efficiency, and in the development process, it causes a lot of unnecessary waste of space and time. In serious cases, it may take several hours in the whole process of system integration, which seriously affects the work efficiency of developers.

[0052] To solve the above problems, an embodiment of the present application provides an application construction method, which proposes a concept of a shared construction space based on git (an open source distributed version control system) source code management technology, maven (a project management tool) and gradle (an open source project automation construction tool) and other program construction technologies, various product warehouse management foundations and various standard file storage and network transmission technologies provided by the operating system, including a standard code storage space and a workspace; each application has its own exclusive construction space, and different construction targets of the application can share the same construction space; when it is determined not to build the source code of the application based on the current construction target according to the space status information of the construction space, the construction result of the application can be directly obtained from the construction space, that is, the construction result of the application can be reused, which can greatly improve the construction efficiency of the application and reduce the time-consuming repeated operations when building the application, thereby improving the work efficiency of developers, and reducing the consumption of space resources, thereby improving the overall release efficiency of the application.

[0053] In the following, the application scenarios of the solution provided in this application are first illustrated.

[0054] Figure 1 This is a schematic diagram of an application scenario provided by an embodiment of the present application. Figure 1As shown, the application scenario includes: a build task server 101, a client 102, and a storage space server 103 for providing a shared build space. Exemplarily, the client 102 mounts the target build space corresponding to the target application in the storage space server 103 in response to the build instruction for the current build target of the target application sent by the build task server 101, and obtains the target build result of the target application based on the target build space.

[0055] In some optional embodiments, the scene may also include a space management server 104. The server is a business point that provides data processing, database and other functions. The server may be an integrated server or a distributed server across multiple computers or computer data centers. The server may include hardware, software, or an embedded logic component or a combination of two or more such components for executing appropriate functions supported or implemented by the server. The server may be, for example, a blade server, a cloud server, etc., or may be a server group consisting of multiple servers.

[0056] Among them, the client 102 and the storage space server 103 are in communication with the space management server 104 through a wired network or a wireless network. In the embodiment of the present application, the space management server 104 can perform some functions of the above-mentioned client 102.

[0057] Exemplarily, the space management server 104 can record the application information of the target application and allocate the target construction space corresponding to the target application; the client 102 responds to the build instruction for the current build target of the target application triggered by the build task server 101, mounts the target construction space corresponding to the target application in the storage space server 103, and the space management server 104 records the usage of the target construction space; the client 102 obtains the target construction result of the target application based on the target construction space.

[0058] It should be noted that Figure 1 This is only a schematic diagram of an application scenario provided by the embodiment of the present application. Figure 1 does not limit the equipment included in Figure 1 The positional relationship between the devices is limited.

[0059] The technical solution of the present application and how the technical solution of the present application solves the above-mentioned technical problems are described in detail below with specific embodiments. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments. The embodiments of the present application will be described below in conjunction with the accompanying drawings.

[0060] Figure 2This is a flow chart of an application construction method provided in an embodiment of the present application. The application construction method can be executed by software and / or hardware devices. For example, the hardware device can be an application construction device, and the application construction device can be an electronic device or a processing chip in the electronic device. Figure 2 As shown, the method of the embodiment of the present application includes:

[0061] S201 . In response to a build instruction for a current build target of a target application, obtain space information of a target build space corresponding to the target application according to application information of the target application, and different build targets share the target build space.

[0062] In the embodiment of the present application, it can be understood that the development process of the application usually includes multiple links, among which there are multiple independent management links, and these management links all correspond to different build targets, and all need to independently pull the source code of the application and operate the application build results based on the build target. The build target is, for example, the unit test link pulls the source code of the application for construction. In this step, the build instruction for the current build target of the target application can be input by the user to the electronic device executing the embodiment of the present method, or it is sent by other devices to the electronic device executing the embodiment of the present method. The application information of the target application, for example, includes the application identification (also referred to as the application number) and the application name of the target application. The embodiment of the present application proposes a concept of a shared build space, and according to some customized protocols and specifications, the sharing and reuse of resources in multiple links of enterprise-level development are realized to reduce the time-consuming repeated operations and reduce the consumption of resources. In this step, the target build space corresponding to the target application is pre-allocated, and one target application corresponds to an exclusive target build space, and the target build space corresponding to the target application is shared for different build targets of the target application.

[0063] Optionally, before responding to a build instruction for the current build target of the target application, the application construction method provided by the embodiment of the present application may also include: responding to an application instruction for a target build space, allocating a target build space and an entry path of the target build space to the target application based on the application information of the target application and the space resource application information of the target build space.

[0064] Exemplarily, the application instruction for the target build space is triggered by the application manager after registering the target application, and is used to apply for space resources. Among them, the application registration information of the target application includes basic information such as the application identifier and application name of the target application; the space resource application information includes the space size, memory and central processing unit (CPU) of the target build space. In this embodiment, a series of independent shared workspaces can be delineated on one or a group of shared space devices, so that in response to the application instruction for the target build space, according to the application information of the target application and the space resource application information of the target build space, a dedicated target build space and an entry path of the target build space can be allocated from the shared workspace for each target application that meets the preset standards, and the entry path can also be understood as a target path or a target build directory for building the target application. For example, taking a project that complies with the Maven build rules as an example, a predefined build directory is provided for each application as the build space of the Maven project.

[0065] Optionally, the space information of the target construction space corresponding to the target application includes an entry path and a device identifier of a device where the target construction space is located.

[0066] Exemplarily, the spatial information of the target build space corresponding to the target application can also be understood as the coordinates of the target build space of the target application in the shared workspace. The device identifier and entry path (i.e., target path) of the device where the target build space is located can be used as the location identifier of the build directory of the target application.

[0067] Optionally, after allocating a target build space and an entry path of the target build space to the target application, the application construction method provided in the embodiment of the present application may further include: obtaining source code corresponding to an initial source code version of the target application.

[0068] For example, when registering a target application, necessary information such as the target application's source code download address can be defined for standard source code management tools to obtain resources. After allocating a target build space for the target application, in order to improve application building efficiency, the source code corresponding to the initial source code version of the target application can be obtained according to the target application's source code download address and stored in the target build space.

[0069] It can be understood that after the target build space is allocated for the target application, the specific build deployment tool can use the target build space. The use of the target build space adopts a global sharing rule, that is, all external tools that build the target application can perform builds in the target build space.

[0070] Optionally, you can also define the output path of the build results corresponding to each build target according to the standard build specification.

[0071] In this step, in response to the build instruction for the current build target of the target application, the space information of the target build space corresponding to the target application can be acquired according to the application information of the target application.

[0072] S202. Mount the target to build space according to the space information.

[0073] Exemplarily, the space information of the target build space corresponding to the target application includes the entry path of the target build space and the device identifier of the device where the target build space is located. Therefore, the target build space can be mounted according to the space information. For example, for the test release package build process, the test release pipeline releases the build instructions for the current build target of the target application, and completes the mounting of the remotely shared target build space according to the space information of the target build space corresponding to the target application, and marks the usage status of the target build space, which includes, for example, the user of the target build space. Among them, when mounting the target build space, the Linux (an operating system) standard network storage disk mounting method can be adopted, or other standard or customized shared storage loading methods can be adopted.

[0074] S203: Acquire the space status information of the target build space, where the space status information includes source code version information, build status information, and build result information of the target application.

[0075] In this step, after the target build space is mounted, the space status information of the target build space can be obtained to perform necessary build operations on the target build space according to the space status information. The space status information includes the source code version information, build status information and build result information of the target application. The build status information includes, for example, the built target application and the unbuilt target application. The build result information includes, for example, the most recent build result of the target application and the corresponding source code version.

[0076] S204: Determine whether to build the source code of the target application based on the current build target according to the space status information.

[0077] In this step, after obtaining the spatial status information of the target build space, it can be determined whether to build the source code of the target application based on the current build target based on the spatial status information. For example, determine whether the target application has been built based on the build status information. If the target application has not been built, determine whether to build the source code of the target application based on the current build target; if the target application has been built, determine whether to build the source code of the target application based on the current build target based on the source code version contained in the build result information and the source code version corresponding to the current build target. For details on how to determine whether to build the source code of the target application based on the current build target based on the spatial status information, please refer to the subsequent embodiments, which will not be repeated here.

[0078] S205: If not, obtain the target build result of the target application from the target build space according to the build result information.

[0079] In this step, if it is determined not to build the source code of the target application based on the current build target, that is, the target build result of the target application corresponding to the current build target is stored in the target build space, then the target build result of the target application can be obtained directly from the target build space without the need to build the source code of the target application, thereby achieving the purpose of reusing the target build result of the target application in the target build space, which can effectively improve the build efficiency of the target application.

[0080] Optionally, if it is determined to build the source code of the target application based on the current build target, the target application can be built based on the source code version included in the source code version information and the source code version corresponding to the current build target. For specific information on how to build the target application, please refer to subsequent embodiments.

[0081] The application construction method provided in the embodiment of the present application, by responding to the construction instruction of the current construction target of the target application, according to the application information of the target application, obtains the space information of the target construction space corresponding to the target application, and different construction targets share the target construction space; according to the space information, mounts the target construction space; obtains the space state information of the target construction space, and the space state information includes the source code version information, construction state information and construction result information of the target application; according to the space state information, determines whether to build the source code of the target application based on the current construction target; if not, according to the construction result information, obtains the target construction result of the target application from the target construction space. In the embodiment of the present application, the target application corresponds to an exclusive target construction space, and the target construction space can be shared for different construction targets of the target application; by determining not to build the source code of the target application based on the current construction target according to the space state information of the target construction space, the target construction result of the target application can be directly obtained from the target construction space, that is, the target construction result of the target application can be reused, which can greatly improve the construction efficiency of the target application, reduce the time-consuming repeated operations when building the target application, thereby improving the work efficiency of developers, and reducing the consumption of space resources, thereby improving the overall release efficiency of the target application.

[0082] On the basis of the above embodiments, optionally, the space status information of the target build space corresponding to the target application may also include the usage status information of the target build space. If it is determined based on the usage status information that build instructions for build targets corresponding to multiple users are received, step S204 and steps after S204 are executed in the build order; the build order includes at least one of the order in which users mount the target build space, the priority of the user, or the operation order of the build target.

[0083] Exemplarily, the usage status information includes information such as the current user and the build target of the current user. When multiple users of the target build space trigger concurrent build requests, step S204 and steps after S204 can be executed in the build order. The build order includes at least one of the order in which the users mount the target build space, the priority of the users, or the job order of the build targets. For example, assuming that user A corresponds to build target 1 for unit testing, and assuming that user B corresponds to build target 2 for system integration testing, and the job order of build target 1 is ahead of the job order of build target 2, then step S204 and steps after S204 can be executed in the job order to obtain the target build result of the target application.

[0084] Figure 3 This is a flowchart of an application construction method provided by another embodiment of the present application. Based on the above embodiment, the present application embodiment further illustrates the application construction method. Figure 3 As shown, the method of the embodiment of the present application may include:

[0085] S301 . In response to a build instruction for a current build target of a target application, obtain space information of a target build space corresponding to the target application according to application information of the target application, and different build targets share the target build space.

[0086] The detailed description of this step can be found in Figure 2 The relevant description of S201 in the illustrated embodiment will not be repeated here.

[0087] S302. Mount the target to build space according to the space information.

[0088] The detailed description of this step can be found in Figure 2 The relevant description of S202 in the illustrated embodiment will not be repeated here.

[0089] S303, obtaining space status information of the target build space, where the space status information includes source code version information, build status information, and build result information of the target application;

[0090] The detailed description of this step can be found in Figure 2 The relevant description of S203 in the illustrated embodiment will not be repeated here.

[0091] In the embodiment of the present application, Figure 2 The step S204 may further include the following steps S304 to S308:

[0092] S304: Determine whether the target application has been built according to the build status information.

[0093] In this step, the build status information includes, for example, whether the target application has been built and whether the target application has not been built. Therefore, it can be determined whether the target application has been built according to the build status information. If the target application has been built, step S305 is executed; if the target application has not been built, step S308 is executed.

[0094] S305: If the target application has been built, determine whether the first source code version included in the build result information is consistent with the second source code version corresponding to the current build target.

[0095] In this step, if it is determined that the target application has been built, the first source code version included in the build result information and the second source code version corresponding to the current build target can be compared to determine whether the two are consistent. If they are consistent, step S306 is executed; if they are inconsistent, step S307 is executed.

[0096] S306: Determine not to build the source code of the target application based on the current build target, and continue to execute step S309.

[0097] S307 , determine to build the source code of the target application based on the current build target, and continue to execute step S310 .

[0098] S308. If the target application is not built, determine to build the source code of the target application based on the current build target, and continue to execute step S310.

[0099] This step, for example, builds the source code of the target application for the first time through the target build space.

[0100] S309: Acquire a target build result of a target application from a target build space according to the build result information.

[0101] The detailed description of this step can be found in Figure 2 The relevant description of S205 in the illustrated embodiment will not be repeated here.

[0102] S310: Determine whether the third source code version included in the source code version information is consistent with the second source code version corresponding to the current build target.

[0103] In this step, after determining to build the source code of the target application based on the current build target, compare the third source code version included in the source code version information with the second source code version corresponding to the current build target to determine whether the two are consistent. Specifically, the source code branch of the target application and the source code version corresponding to the source code branch can be compared. If they are consistent, execute step S311; if they are inconsistent, execute step S312.

[0104] S311. Build the source code of the target application based on the current build target, obtain the current build result of the target application, and continue to execute step S313.

[0105] It can be understood that after determining that the third source code version contained in the source code version information of the target application is consistent with the second source code version corresponding to the current build target, the source code of the target application can be built directly based on the current build target without having to re-acquire the source code of the target application, thereby obtaining the current build result of the target application.

[0106] S312, clean up the target building space, obtain the target source code corresponding to the second source code version, build the target source code, obtain the current building result of the target application, and continue to execute step S313.

[0107] In this step, after determining that the third source code version included in the source code version information of the target application is inconsistent with the second source code version corresponding to the current build target, the target build space can be cleaned up, such as cleaning up the current source code of the target application in the target build space, and obtaining the target source code corresponding to the second source code version according to the source code download address of the target application, and building the target source code to obtain the current build result of the target application.

[0108] Optionally, if the build target is unit testing, a secondary operation can be performed based on the primary result of the build to obtain a secondary result such as a unit test report.

[0109] S313: Copy the current build result to a target storage path outside the target build space.

[0110] In this step, the target storage path is pre-configured. Considering that the target build space will be unmounted after the target application is built, the current build result can be copied to the target storage path outside the target build space.

[0111] S314. Unmount the target build space.

[0112] In this step, after the target application is built, the target build space is unmounted and the completion of the target application build is recorded.

[0113] Optionally, after unmounting the target build space, the application building method provided in the embodiment of the present application may further include: executing steps S301 to S314 in response to a build instruction for a build target subsequent to the current build target.

[0114] This embodiment can be understood as the case of building a space for a secondary mount target. The occurrence of secondary mounting generally occurs in the following scenarios: in an application development pipeline, in addition to the first application test build, independent unit test scans, security vulnerability scans, virus detection scans, and subsequent user acceptance tests and version verification tests will be performed. These operations will repeatedly execute build instructions based on the same or different configurations on the same source code due to different build purposes. For this embodiment, illustratively, assuming that the current build target is to pull the source code of the application in the unit test phase for construction, after completing the application construction in the unit test phase, if the system integration test is continued, the build target (i.e., the build target after the current build target) for pulling the source code of the application in the system integration test phase can be remounted. The target build space. Specifically, the build target for pulling the source code of the application in the system integration test phase is used as the new current build target, and the application construction in the system integration test phase is completed by executing steps S301 to S314.

[0115] In the application construction method provided by the embodiment of the present application, a target application corresponds to an exclusive target construction space, and different construction targets of the target application can share the target construction space; by responding to the construction instruction for the current construction target of the target application, the target construction space is mounted according to the space information of the target construction space corresponding to the target application; according to the construction status information contained in the space status information of the target construction space, it is determined whether the target application has been built; if the target application has not been built, it is determined whether the third source code version contained in the source code version information is consistent with the second source code version corresponding to the current construction target; if they are consistent, the source code of the target application is built based on the current construction target to obtain the current construction result of the target application; if they are inconsistent, the target construction space is cleaned up, and the target source code corresponding to the second source code version is obtained, and the target source code is built to obtain the current construction result of the target application; if the target application has been built, the target construction result of the target application can be directly obtained from the target construction space according to the construction result information, that is, the target construction result of the target application can be reused, which can greatly improve the construction efficiency of the target application, reduce the time-consuming repeated operations when building the target application, thereby improving the work efficiency of developers, and reducing the consumption of space resources, thereby improving the overall release efficiency of the target application.

[0116] Based on the above embodiments, it can be understood that in the traditional application construction pipeline, for the purpose of simplifying management, a docker (an application container engine) construction container is usually independently allocated for each link to pull the source code of the application, build it, and then output the results. Based on the principle of shared space, the embodiments of the present application mount the same construction space for all construction containers of the same application, or other construction hosts.

[0117] After each shared build space is mounted, based on the description of steps S303 to S314 above, necessary changes to branches and versions can be performed for the source code and build results of the current build space, the build space can be cleaned up, the build can be performed, a second operation can be performed based on the build results, and build results can be obtained based on the target definition.

[0118] Based on the above embodiment, in a possible implementation, Figure 4 This is a flowchart of an application construction method provided by another embodiment of the present application, which realizes application construction by constructing the interaction between task service, space management service, client and storage space. Figure 4 As shown, the method of the embodiment of the present application may include:

[0119] S401. The build task service triggers execution of a build task for a target application and sends a build preparation instruction for the target application to a client.

[0120] Accordingly, the client receives a build preparation instruction for the target application.

[0121] S402: The client sends a message to the space management service for obtaining space usage status of a target construction space corresponding to a target application.

[0122] Accordingly, the space management service receives the message.

[0123] S403: The space management service verifies the space usage of the target construction space and sends the verification result to the client.

[0124] Accordingly, the client receives the verification result.

[0125] S404: After determining that the target build space is free, the client sends a mount instruction to the storage space.

[0126] Correspondingly, the storage space receives the mount instruction.

[0127] S405: The storage space completes the mounting of the target build space and sends the mounting result of the target build space to the client.

[0128] Correspondingly, the client receives the mounting result.

[0129] S406: The client sends the mounting result of the target build space to the space management service.

[0130] Correspondingly, the space management service receives the mount result.

[0131] S407: The space management service records the usage of the target construction space.

[0132] S408: The space management service sends the mounting result of the target build space to the build task service.

[0133] Accordingly, the build task service receives the mounting result.

[0134] S409: The build task service sends a build instruction for the current build target of the target application to the client.

[0135] Accordingly, the client receives the build instruction.

[0136] S410: The client generates a construction operation record.

[0137] S411. The client sends a build operation record to the space management service.

[0138] Accordingly, the space management service receives and saves the construction operation record.

[0139] S412. The client obtains the space status information of the target build space, where the space status information includes the source code version information, build status information, and build result information of the target application; and determines whether the target application has been built according to the space status information of the target build space.

[0140] S413: If the target application has been built, and the first source code version included in the build result information is consistent with the second source code version corresponding to the current build target, then obtain the target build result of the target application from the target build space.

[0141] If the target application is not built (not shown in the figure), determine whether the third source code version included in the source code version information is consistent with the second source code version corresponding to the current build target; if they are consistent, perform a build operation on the source code of the target application based on the current build target to obtain the current build result of the target application, and accordingly, the storage space saves the current build result (not shown in the figure); if they are inconsistent, clean up the target build space, and obtain the target source code corresponding to the second source code version, and accordingly, the storage space changes the space content (not shown in the figure); perform a build operation on the target source code to obtain the current build result of the target application, and accordingly, the storage space saves the current build result (not shown in the figure).

[0142] S414: The client sends the target build result of the target application to the build task service.

[0143] Accordingly, the build task service receives the target build result of the target application to perform subsequent processing on the target build result.

[0144] S415: The build task service sends an unmount instruction for the target build space to the client.

[0145] Accordingly, the client receives an unmount instruction.

[0146] S416: The client sends an unmount instruction to the storage space.

[0147] Accordingly, the storage space receives the unmount instruction.

[0148] S417: The storage space unmounts the target build space.

[0149] S418. The storage space sends a message to the client indicating that the target build space has been unmounted.

[0150] Accordingly, the client receives the message.

[0151] S419: The client processes the unmounting result for the target build space.

[0152] S420: The client sends an unmounting result for the target build space to the space management service.

[0153] Accordingly, the space management service receives the unmounting result for the target build space and records the unmounting result.

[0154] S421. The space management service sends an unmounting result for the target build space to the build task service.

[0155] Accordingly, the build task service receives the unmounting result for the target build space and performs subsequent build operations.

[0156] The application construction method provided in the embodiment of the present application constructs the application by constructing the interaction among the task service, the space management service, the client and the storage space, and can provide the external operable instructions and information reading capability for development, uniformly complete the commands from multiple operation sources, and feedback the work results; wherein, the target application corresponds to an exclusive target construction space, and the target construction space can be shared for different construction targets of the target application; after mounting the target construction space, it can be determined whether the target application has been built according to the construction status information contained in the space status information of the target construction space; if the target application has not been built, it is determined whether the third source code version contained in the source code version information is the same as the second source code version corresponding to the current construction target This is consistent. If it is consistent, the source code of the target application is built based on the current build target to obtain the current build result of the target application. If it is inconsistent, the target build space is cleaned up, and the target source code corresponding to the second source code version is obtained, the target source code is built to obtain the current build result of the target application; if the target application has been built, the target build result of the target application can be directly obtained from the target build space according to the build result information, that is, the target build result of the target application can be reused, which can greatly improve the build efficiency of the target application and reduce the time spent on repeated operations when building the target application, thereby improving the work efficiency of developers and reducing the consumption of space resources, thereby improving the overall release efficiency of the target application.

[0157] The application construction method provided in the embodiment of the present application is particularly applicable to financial enterprises. When there are multiple independent management links in an application release process, and these links all need to independently pull the source code and operation construction results of the application, the embodiment of the present application can greatly reduce the time consumed by the repetitive operation of application construction and improve the overall application release efficiency.

[0158] The following are device embodiments of the present application, which can be used to execute the method embodiments of the present application. For details not disclosed in the device embodiments of the present application, please refer to the method embodiments of the present application.

[0159] Figure 5A schematic diagram of the structure of an application construction device provided in an embodiment of the present application is shown in FIG. Figure 5 As shown, the application construction device 500 of the embodiment of the present application includes: a first acquisition module 501, a mounting module 502, a second acquisition module 503, a determination module 504 and a third acquisition module 505. Among them:

[0160] The first acquisition module 501 is used to respond to the build instruction of the current build target of the target application and acquire the space information of the target build space corresponding to the target application according to the application information of the target application. Different build targets share the target build space.

[0161] The mounting module 502 is used to mount the target construction space according to the space information.

[0162] The second acquisition module 503 is used to acquire the space status information of the target construction space, where the space status information includes the source code version information, construction status information and construction result information of the target application.

[0163] The determination module 504 is used to determine whether to build the source code of the target application based on the current build target according to the space status information.

[0164] The third acquisition module 505 is configured to, if not, acquire the target build result of the target application from the target build space according to the build result information.

[0165] In one possible design, the determination module 504 can be specifically used to: determine whether the target application has been built based on the build status information; if the target application has been built, determine whether the first source code version contained in the build result information is consistent with the second source code version corresponding to the current build target; if they are consistent, determine not to build the source code of the target application based on the current build target; if they are inconsistent, determine to build the source code of the target application based on the current build target; if the target application has not been built, determine to build the source code of the target application based on the current build target.

[0166] In one possible design, the determination module 504 can also be used to: after determining to build the source code of the target application based on the current build target, determine whether the third source code version included in the source code version information is consistent with the second source code version corresponding to the current build target; if consistent, build the source code of the target application based on the current build target to obtain the current build result of the target application; if inconsistent, clean up the target build space, obtain the target source code corresponding to the second source code version, build the target source code, and obtain the current build result of the target application.

[0167] In a possible design, the determination module 504 may also be used to: after obtaining the current build result of the target application, copy the current build result to a target storage path outside the target build space.

[0168] In a possible design, the third acquisition module 505 may also be used to: after acquiring the target build result of the target application, unmount the target build space.

[0169] In one possible design, the first acquisition module 501 can also be used for: after the third acquisition module 505 unmounts the target build space, in response to a build instruction for a build target after the current build target, executing a step of acquiring the space information of the target build space corresponding to the target application based on the application information of the target application.

[0170] In one possible design, the application construction device 500 may also include an allocation module (not shown in the figure), which is used to allocate a target construction space and an entry path of the target construction space to the target application based on application information of the target application and space resource application information of the target construction space before responding to a construction instruction for the current construction target of the target application and in response to an application instruction for the target construction space.

[0171] In a possible design, the allocation module may also be used to: after allocating a target build space and an entry path of the target build space to the target application, obtain the source code corresponding to the initial source code version of the target application.

[0172] In one possible design, the space information includes an entry path and a device identifier of a device where the target construction space is located.

[0173] In a possible design, the space status information also includes usage status information of the target build space. If it is determined based on the usage status information that build instructions for build targets corresponding to multiple users are received, the steps of determining whether to build the source code of the target application based on the current build target are executed in accordance with the space status information in a build order; the build order includes at least one of the order in which users mount the target build space, the priority of the user, or the job order of the build target.

[0174] It is worth noting that the application construction device provided in the above embodiments can be used to execute the various steps in the application construction method provided in any of the above embodiments. The specific implementation methods and technical effects are similar and will not be repeated here.

[0175] The above-mentioned device embodiments provided in the present application are merely illustrative, and the module division therein is merely a logical function division, and there may be other division methods in actual implementation. For example, multiple modules can be combined or integrated into another system. The coupling between the modules can be achieved through some interfaces, which are usually electrical communication interfaces, but it is not ruled out that they may be mechanical interfaces or other forms of interfaces. Therefore, the modules described as separate components may or may not be separated in terms of logistics, and may be located in one place or distributed to different locations of the same or different devices.

[0176] Figure 6 This is a schematic diagram of the structure of an electronic device provided by an embodiment of the present application. Figure 6 As shown, the electronic device 600 may include: at least one processor 601 and a memory 602 .

[0177] The memory 602 is used to store programs. Specifically, the programs may include program codes, and the program codes include computer-executable instructions.

[0178] The memory 602 may include a high-speed random access memory (Random Access Memory, RAM), and may also include a non-volatile memory (Non-Volatile Memory), such as at least one disk memory.

[0179] The processor 601 is used to execute the computer-executable instructions stored in the memory 602 to implement the application construction method described in the aforementioned method embodiment. Among them, the processor 601 may be a central processing unit (CPU), or an application-specific integrated circuit (ASIC), or one or more integrated circuits configured to implement the embodiments of the present application. Specifically, when implementing the application construction method described in the aforementioned method embodiment, the electronic device can be, for example, an electronic device with processing functions such as a server.

[0180] Optionally, the electronic device 600 may further include a communication interface 603. In a specific implementation, if the communication interface 603, the memory 602 and the processor 601 are implemented independently, the communication interface 603, the memory 602 and the processor 601 may be interconnected through a bus and communicate with each other. The bus may be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. The bus may be divided into an address bus, a data bus, a control bus, etc., but it does not mean that there is only one bus or one type of bus.

[0181] Optionally, in a specific implementation, if the communication interface 603, the memory 602 and the processor 601 are integrated on a chip, the communication interface 603, the memory 602 and the processor 601 can communicate through an internal interface.

[0182] The present application also provides a computer-readable storage medium, which may include: a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory, a disk or an optical disk, and other media that can store program codes. Specifically, a computer program is stored in the computer-readable storage medium. When at least one processor of an electronic device executes the computer program, the electronic device executes each step of the application construction method provided in the above-mentioned various implementation modes.

[0183] The present application also provides a computer program product, which includes a computer program stored in a readable storage medium. At least one processor of the electronic device can read the computer program from the readable storage medium, and at least one processor executes the computer program so that the electronic device implements each step of the application construction method provided in the above various embodiments.

[0184] Those skilled in the art will readily appreciate other embodiments of the present application after considering the specification and practicing the invention disclosed herein. The present application is intended to cover any variations, uses or adaptations of the present application, which follow the general principles of the present application and include common knowledge or customary techniques in the art that are not disclosed in the present application. The specification and examples are intended to be exemplary only, and the true scope and spirit of the present application are indicated by the following claims.

[0185] It should be understood that the present application is not limited to the precise structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present application is limited only by the appended claims.

Claims

1. An application construction method, characterized in that: include: In response to a build instruction for a current build target of a target application, obtaining space information of a target build space corresponding to the target application according to application information of the target application, wherein different build targets share the target build space; Mounting the target build space according to the space information; Acquire space status information of the target build space, the space status information including source code version information, build status information and build result information of the target application; Determining, according to the space state information, whether to build the source code of the target application based on the current build target; If not, the target build result of the target application is acquired from the target build space according to the build result information.

2. The application construction method according to claim 1, characterized in that: The determining, according to the space state information, whether to build the source code of the target application based on the current build target includes: Determining whether the target application has been built according to the build status information; If the target application has been built, determining whether the first source code version included in the build result information is consistent with the second source code version corresponding to the current build target; if they are consistent, determining not to build the source code of the target application based on the current build target; if they are inconsistent, determining to build the source code of the target application based on the current build target; If the target application is not built, it is determined to build the source code of the target application based on the current build target.

3. The application construction method according to claim 2, characterized in that: After determining to build the source code of the target application based on the current build target, the method further includes: Determining whether the third source code version included in the source code version information is consistent with the second source code version corresponding to the current build target; If they are consistent, the source code of the target application is built based on the current build target to obtain the current build result of the target application; If they are inconsistent, the target building space is cleaned up, and the target source code corresponding to the second source code version is obtained, and the target source code is built to obtain the current building result of the target application.

4. The application construction method according to claim 3, characterized in that: After obtaining the current construction result of the target application, the method further includes: The current build result is copied to a target storage path outside the target build space.

5. The application construction method according to any one of claims 1 to 4, characterized in that: After obtaining the target construction result of the target application, the method further includes: Unmount the target build space.

6. The application construction method according to claim 5, characterized in that: After the target construction space is unmounted, the method further includes: In response to a build instruction for a build target subsequent to the current build target, the step of acquiring space information of a target build space corresponding to the target application according to the application information of the target application is performed.

7. The application construction method according to any one of claims 1 to 4, characterized in that: Before responding to the building instruction of the current building target of the target application, the method further includes: In response to an application instruction for the target construction space, the target construction space and an entry path of the target construction space are allocated to the target application according to application information of the target application and space resource application information of the target construction space.

8. The application construction method according to claim 7, characterized in that: After allocating the target construction space and the entry path of the target construction space to the target application, the method further includes: Obtain source code corresponding to the initial source code version of the target application.

9. The application construction method according to claim 7, characterized in that: The space information includes the entry path and the device identifier of the device where the target construction space is located.

10. The application construction method according to any one of claims 1 to 4, characterized in that: The space status information also includes usage status information of the target build space. If, based on the usage status information, it is determined that build instructions for build targets corresponding to multiple users are received, the step of determining whether to build the source code of the target application based on the current build target based on the space status information is executed in a build order; the build order includes at least one of the order in which the users mount the target build space, the priority of the users, or the job order of the build targets.

11. An application construction device, characterized in that: include: A first acquisition module, configured to respond to a build instruction for a current build target of a target application and acquire space information of a target build space corresponding to the target application according to application information of the target application, wherein different build targets share the target build space; A mounting module, used for mounting the target construction space according to the space information; A second acquisition module is used to acquire space status information of the target construction space, wherein the space status information includes source code version information, construction status information and construction result information of the target application; A determination module, configured to determine whether to build the source code of the target application based on the current build target according to the space state information; The third acquisition module is used to, if not, acquire the target construction result of the target application from the target construction space according to the construction result information.

12. An electronic device comprising: at least one processor and memory; The memory stores computer-executable instructions; The at least one processor executes the computer-executable instructions stored in the memory, so that the at least one processor performs the application construction method according to any one of claims 1 to 10.

13. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions, which are used to implement the application construction method according to any one of claims 1 to 10 when executed.

14. A computer program product, characterized in that The invention comprises a computer program, which implements the application construction method according to any one of claims 1 to 10 when being executed.