CN113094083A - Version construction method, version construction device, electronic equipment and readable storage medium - Google Patents

Version construction method, version construction device, electronic equipment and readable storage medium Download PDF

Info

Publication number
CN113094083A
CN113094083A CN202110375168.0A CN202110375168A CN113094083A CN 113094083 A CN113094083 A CN 113094083A CN 202110375168 A CN202110375168 A CN 202110375168A CN 113094083 A CN113094083 A CN 113094083A
Authority
CN
China
Prior art keywords
electronic device
branch
target
storage path
version
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202110375168.0A
Other languages
Chinese (zh)
Other versions
CN113094083B (en
Inventor
李寒雨
田洁
王彩娟
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Industrial and Commercial Bank of China Ltd ICBC
Original Assignee
Industrial and Commercial Bank of China Ltd ICBC
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Industrial and Commercial Bank of China Ltd ICBC filed Critical Industrial and Commercial Bank of China Ltd ICBC
Priority to CN202110375168.0A priority Critical patent/CN113094083B/en
Publication of CN113094083A publication Critical patent/CN113094083A/en
Application granted granted Critical
Publication of CN113094083B publication Critical patent/CN113094083B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/71Version control; Configuration management
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/16File or folder operations, e.g. details of user interfaces specifically adapted to file systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/17Details of further file system functions
    • G06F16/178Techniques for file synchronisation in file systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/40Transformation of program code
    • G06F8/41Compilation

Abstract

The embodiment of the disclosure provides a version construction method, a version construction device, electronic equipment and a readable storage medium, which can be applied to the financial field or other fields. The method comprises the following steps: obtaining a version build request, wherein the version build request comprises a target branch storage path of the intermediate product and a warehouse address of the first target GIT warehouse; acquiring a first target GIT warehouse from second electronic equipment according to the warehouse address of the first target GIT warehouse to obtain a first clone GIT warehouse; obtaining other products and other source code files from the first cloned GIT repository; acquiring an intermediate product from the first electronic device according to the target branch storage path; and constructing a new version product according to the intermediate product, the other products and the other source code files.

Description

Version construction method, version construction device, electronic equipment and readable storage medium
Technical Field
The disclosed embodiments relate to the field of computer technologies, and in particular, to a version construction method, a version construction apparatus, an electronic device, a computer-readable storage medium, and a computer program product.
Background
The GIT warehouse is an open-source distributed version control system and is used for realizing version management of products, such as version construction of the products.
In the process of implementing the present disclosure, the inventors found that there are at least the following problems in the related art, and the version construction using the related art is not efficient and has a large version capacity.
Disclosure of Invention
In view of this, the disclosed embodiments provide a version construction method, a version construction apparatus, an electronic device, a computer-readable storage medium, and a computer program product.
One aspect of the embodiments of the present disclosure provides a version building method applied to a third electronic device capable of being communicatively connected to a first electronic device and a second electronic device, respectively, including: acquiring a version construction request, wherein the version construction request comprises a target branch storage path of the intermediate product and a warehouse address of a first target GIT warehouse; acquiring a first target GIT warehouse from the second electronic device according to the warehouse address of the first target GIT warehouse to obtain a first clone GIT warehouse; acquiring other products and other source code files from the first clone GIT warehouse; obtaining the intermediate product from the first electronic device according to the target branch storage path; and constructing a new version product according to the intermediate product, the other products and the other source code files.
According to an embodiment of the present disclosure, the acquiring other artifacts and other source code files from the first cloned GIT repository includes: acquiring a target incremental file directory in the first clone GIT warehouse; and acquiring other products and other source code files corresponding to the other source code file directories under the condition that the target incremental file directory is determined to have other source code file directories.
According to an embodiment of the present disclosure, the obtaining the intermediate product from the first electronic device according to the target branch storage path includes: and under the condition that the source code file directory exists in the target incremental file target, acquiring the intermediate product from the first electronic equipment according to the target branch storage path.
According to an embodiment of the present disclosure, the obtaining of the version construction request includes: receiving a version build request sent from a fourth electronic device, wherein the version build request is generated by the fourth electronic device in response to a version build task generated by a persistent integration tool deployed at the fourth electronic device being triggered.
According to an embodiment of the present disclosure, the version building task is generated by the persistent integration tool according to version configuration information.
According to an embodiment of the present disclosure, the version construction method further includes: generating log information aiming at the new version product according to the storage path of the new version product; and transmitting the log information to the fourth electronic device.
According to an embodiment of the present disclosure, the target branch storage path includes a first branch storage path or a second branch storage path; the intermediate product is obtained by processing a target source code file by the first electronic device in response to a product construction request for the intermediate product to be constructed; the article construction request includes the first branch storage path, a warehouse address of the second target GIT warehouse, and a branch identification; the target source code file is obtained from a second clone GIT warehouse according to the branch identification; the second cloned GIT repository is obtained by acquiring a second target GIT repository from the second electronic device for cloning according to the repository address of the second target GIT repository; the second branch storage path is obtained by executing a branch synchronization operation with respect to the second branch storage path according to the first branch storage path transmitted by the first electronic device, by a second target GIT repository disposed on the second electronic device, where the second branch storage path is used for characterizing a storage path of a second branch, and the second branch is a branch subsequent to the first branch.
Another aspect of the embodiments of the present disclosure provides a version building method, applied to a first electronic device capable of being communicatively connected to a third electronic device, including: acquiring a product construction request aiming at an intermediate product to be constructed, wherein the product construction request comprises a first branch storage path, a warehouse address of a second target GIT warehouse and a branch identifier, and the first branch storage path is used for representing the storage path of a first branch; acquiring a second target GIT warehouse from the second electronic device according to the warehouse address of the second target GIT warehouse to obtain a second clone GIT warehouse; acquiring a target source code file corresponding to the branch identifier from the second clone GIT warehouse; processing the target source code file to obtain an intermediate product; transmitting a first branch storage path corresponding to the intermediate product to the second electronic device, so that a second target GIT warehouse disposed on the second electronic device performs a branch synchronization operation with respect to a second branch storage path according to the first branch storage path, wherein the second branch is a subsequent branch of the first branch; and storing the intermediate product according to the first branch storage path, so that the third electronic device performs version construction in response to a version construction request.
According to an embodiment of the present disclosure, the other product and the other source code file are obtained by the third electronic device from a first clone GIT repository in response to the version construction request, the version construction request includes a target branch storage path of the intermediate product and a repository address of a first target GIT repository, and the first clone GIT repository is obtained by the third electronic device from the second electronic device in response to the version construction request, and cloning the first clone GIT repository according to the repository address of the first target GIT repository.
According to an embodiment of the present disclosure, the sending, to the second electronic device, a first branch storage path corresponding to the intermediate product, so that the second target GIT warehouse disposed on the second electronic device performs a branch synchronization operation with respect to a second branch storage path according to the first branch storage path, includes: and sending a first branch storage path corresponding to the intermediate product to the second electronic device, so that a second target GIT warehouse deployed on the second electronic device processes the first branch storage path by using a three-way merge method, and the second storage path of the second branch is synchronized to the first branch storage path.
According to an embodiment of the present disclosure, the obtaining of the artifact construction request for the intermediate artifact to be constructed includes: receiving an article build request sent from a fifth electronic device, wherein the article build request is generated by the fifth electronic device in response to an article build task from a sixth electronic device being triggered.
According to an embodiment of the disclosure, the article building task is generated by the sixth electronic device invoking the persistent integration service according to the page configuration information.
According to an embodiment of the present disclosure, the processing the target source code file to obtain an intermediate product includes: compiling the target source code file of the intermediate product to be constructed under the condition that the date for constructing the intermediate product meets the preset condition to obtain a compiled file; generating a differential file, wherein the differential file is obtained according to the compiled file and the compiled file of the latest version product stored in the second clone GIT warehouse; generating a signature file for the compiled file and the delta file; and using the compiled file, the delta file, and the signature file as the intermediate product.
According to an embodiment of the present disclosure, the version construction method further includes: storing the compiled file and the delta file in a front-end directory; and storing the signature file to a back-end directory.
Another aspect of the embodiments of the present disclosure provides a version creating apparatus, provided in a third electronic device capable of being communicatively connected to a first electronic device and a second electronic device, respectively, including: a first obtaining module, configured to obtain a version construction request, where the version construction request includes a target branch storage path of an intermediate product and a warehouse address of a first target GIT warehouse; a second obtaining module, configured to obtain a first target GIT warehouse from the second electronic device according to the warehouse address of the first target GIT warehouse, to obtain a first clone GIT warehouse; a third obtaining module, configured to obtain other products and other source code files from the first cloned GIT repository; a fourth obtaining module, configured to obtain the intermediate product from the first electronic device according to the target branch storage path; and the first construction module is used for constructing a new version product according to the intermediate product, the other products and the other source code files.
Another aspect of the embodiments of the present disclosure provides a version creating apparatus, provided in a first electronic device capable of being communicatively connected to a third electronic device, including: a fifth obtaining module, configured to obtain a product construction request for an intermediate product to be constructed, where the product construction request includes a first branch storage path, a warehouse address of a second target GIT warehouse, and a branch identifier, and the first branch storage path is used to characterize a storage path of a first branch; a sixth obtaining module, configured to obtain a second target GIT repository from the second electronic device according to the repository address of the second target GIT repository, to obtain a second clone GIT repository; a seventh obtaining module, configured to obtain a target source code file corresponding to the branch identifier from the second cloned GIT repository; the processing module is used for processing the target source code file to obtain an intermediate product; a sending module, configured to send a first branch storage path corresponding to the intermediate product to the second electronic device, so that a second target GIT warehouse disposed on the second electronic device performs a branch synchronization operation for a second branch storage path according to the first branch storage path, where the second branch is a subsequent branch of the first branch; and a first storage module, configured to store the intermediate product according to the first branch storage path, so that the third electronic device performs version building in response to a version building request.
Another aspect of an embodiment of the present disclosure provides an electronic device including: one or more processors. A memory for storing one or more programs, wherein the one or more programs, when executed by the one or more processors, cause the one or more processors to implement the method as described above.
Another aspect of the embodiments of the present disclosure provides a computer-readable storage medium storing computer-executable instructions for implementing the method as described above when executed.
Another aspect of an embodiment of the present disclosure provides a computer program product comprising computer executable instructions for implementing the method as described above when executed.
According to an embodiment of the present disclosure, a version build request including a target branch storage path of an intermediate product and a warehouse address of a first target GIT warehouse is acquired through a third electronic device, the first target GIT warehouse is acquired from a second electronic device according to the warehouse address of the first target GIT warehouse, the first target GIT warehouse is cloned to obtain a first clone GIT warehouse, other products and other source code files are acquired from the first clone GIT warehouse, the intermediate product is acquired from the first electronic device according to the target branch storage path, and a new version product is built according to the intermediate product, the other products and the other source code files. Since the intermediate product is obtained from the first electronic device and is not directly obtained from the second electronic device on which the first target GIT warehouse is deployed, it is realized to construct the intermediate product without the GIT warehouse, and further, the total amount of the GIT warehouse is reduced, thereby improving the version construction efficiency. Meanwhile, the intermediate products corresponding to the target branch storage path are obtained, but not all the intermediate products of each branch, so that the intermediate products of the required branches can be obtained more accurately, and further the version slimming is realized, and the technical problems that the version construction efficiency is not high and the version capacity is large due to the adoption of the related technology are at least partially overcome.
Drawings
The above and other objects, features and advantages of the present disclosure will become more apparent from the following description of embodiments of the present disclosure with reference to the accompanying drawings, in which:
FIG. 1 schematically illustrates an exemplary system architecture to which a version construction method may be applied, according to an embodiment of the present disclosure;
FIG. 2 schematically illustrates a flow diagram of a version construction method according to an embodiment of the present disclosure;
FIG. 3 schematically illustrates a flow chart of another version construction method according to an embodiment of the present disclosure;
fig. 4 schematically shows a signaling diagram of a version construction method according to an embodiment of the present disclosure;
FIG. 5 schematically illustrates a block diagram of a version building apparatus according to an embodiment of the present disclosure;
FIG. 6 schematically illustrates a block diagram of another version building apparatus according to an embodiment of the present disclosure; and
fig. 7 schematically shows a block diagram of an electronic device adapted to implement a version construction method according to an embodiment of the present disclosure.
Detailed Description
Hereinafter, embodiments of the present disclosure will be described with reference to the accompanying drawings. It should be understood that the description is illustrative only and is not intended to limit the scope of the present disclosure. In the following detailed description, for purposes of explanation, numerous specific details are set forth in order to provide a thorough understanding of the embodiments of the disclosure. It may be evident, however, that one or more embodiments may be practiced without these specific details. Moreover, in the following description, descriptions of well-known structures and techniques are omitted so as to not unnecessarily obscure the concepts of the present disclosure.
The terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the disclosure. The terms "comprises," "comprising," and the like, as used herein, specify the presence of stated features, operations, and/or components, but do not preclude the presence or addition of one or more other features, operations, or components.
All terms (including technical and scientific terms) used herein have the same meaning as commonly understood by one of ordinary skill in the art unless otherwise defined. It is noted that the terms used herein should be interpreted as having a meaning that is consistent with the context of this specification and should not be interpreted in an idealized or overly formal sense.
Where a convention analogous to "at least one of A, B and C, etc." is used, in general such a construction is intended in the sense one having skill in the art would understand the convention (e.g., "a system having at least one of A, B and C" would include but not be limited to systems that have a alone, B alone, C alone, a and B together, a and C together, B and C together, and/or A, B, C together, etc.). Where a convention analogous to "A, B or at least one of C, etc." is used, in general such a construction is intended in the sense one having skill in the art would understand the convention (e.g., "a system having at least one of A, B or C" would include but not be limited to systems that have a alone, B alone, C alone, a and B together, a and C together, B and C together, and/or A, B, C together, etc.).
In the related art, the version build is generally implemented in such a manner that an intermediate product is built in response to a product build request for the intermediate product to be built, and the intermediate product is transmitted to the GIT warehouse for storage. And responding to the version construction request, and constructing a new version product according to the intermediate product, the other source code files and the other products acquired from the GIT warehouse. An intermediate product is understood to be a product that is required for building a new version of a product.
In the course of implementing the disclosed concept, the inventors found that as the demand for manufacturing the product rises, the frequency of building and pushing the intermediate product becomes higher and higher, so that the quantity of the intermediate product becomes larger and larger. In the related art, since the intermediate product is stored in the GIT warehouse after the intermediate product is built, the phenomenon that the total quantity of the GIT warehouse rapidly expands occurs, which affects the development work, and further causes the version building efficiency to be low. Meanwhile, it is also found that it is difficult to obtain the intermediate product of the required branch accurately, so that the version capacity is large.
To solve the above problems, the inventors found out that it is critical how to reduce the overall volume of the GIT warehouse. Thus, it is proposed to build and store an intermediate article with a first electronic device, without storing the intermediate article to a GIT warehouse, which is deployed to a second electronic device. And the third electronic equipment responds to the version construction request, acquires the intermediate product from the first electronic equipment according to the target branch storage path, and constructs a new version product according to the intermediate product and other source code files and other products acquired by using the method of cloning the GIT warehouse of the second electronic equipment. In order to achieve accurate acquisition of the intermediate products of the required branches without acquiring the intermediate products corresponding to the branch storage path of each branch in each branch storage path, a scheme based on a synchronizing mechanism of the GIT warehouse may be adopted.
Specifically, the embodiment of the present disclosure provides a version construction method, a version construction apparatus, an electronic device, a computer-readable storage medium, and a computer program product, which may be applied to the financial field or any field other than the financial field, and are not limited thereto. The method is applied to a third electronic device which can be respectively connected with the first electronic device and the second electronic device in a communication mode, and comprises the following steps: acquiring a version construction request, wherein the version construction request comprises a target branch storage path of the intermediate product and a warehouse address of a first target GIT warehouse, acquiring the first target GIT warehouse from a second electronic device according to the warehouse address of the first target GIT warehouse to obtain a first clone GIT warehouse, acquiring other products and other source code files from the first clone GIT warehouse, acquiring the intermediate product from the first electronic device according to the target branch storage path, and constructing a new version product according to the intermediate product, the other products and the other source code files.
Fig. 1 schematically illustrates an exemplary system architecture 100 to which a version building method may be applied, according to an embodiment of the present disclosure. It should be noted that fig. 1 is only an example of a system architecture to which the embodiments of the present disclosure may be applied to help those skilled in the art understand the technical content of the present disclosure, and does not mean that the embodiments of the present disclosure may not be applied to other devices, systems, environments or scenarios.
As shown in fig. 1, the system architecture 100 according to this embodiment may include a first electronic device 101, a second electronic device 102, a third electronic device 103, a fourth electronic device 104, a fifth electronic device 105, a sixth electronic device 106, and a network 107. The network 107 is used to provide a medium for communication links between the first electronic device 101, the second electronic device 102, the third electronic device 103, the fourth electronic device 104, the fifth electronic device 105, and the sixth electronic device 106. The network 107 may include various connection types, such as wired and/or wireless communication links, and so forth.
The first electronic device 101, the second electronic device 102, the third electronic device 103, the fourth electronic device 104, the fifth electronic device 105, and the sixth electronic device 106 may be servers that provide various services.
For example, a first target GIT repository and a second target GIT repository may be deployed on the second electronic device 102. The first target GIT repository and the second target GIT repository may be the same or different.
The third electronic device 103 may receive a version construction request sent from the fourth electronic device 104, where the version construction request may include a target branch storage path of the intermediate product and a warehouse address of the first target GIT warehouse, the third electronic device 103 may obtain the first target GIT warehouse from the second electronic device 102 according to the warehouse address of the first target GIT warehouse, clone the first target GIT warehouse to obtain a first clone GIT warehouse, obtain other products and other source code files from the first clone GIT warehouse, the third electronic device 103 obtains the intermediate product from the first electronic device 101 according to the target branch storage path, and the third electronic device 103 may construct a new version product according to the intermediate product, the other products, and the other source code files.
The first electronic device 101 may receive a product construction request from the fifth electronic device 105, where the product construction request may include a first branch storage path, a warehouse address of the second target GIT warehouse, and a branch identifier, the first electronic device 101 may obtain the second target GIT warehouse from the second electronic device 102 according to the warehouse address of the second target GIT warehouse, clone the second target GIT warehouse to obtain a second clone GIT warehouse, obtain a target source code file corresponding to the branch identifier from the second clone GIT warehouse, and the first electronic device 101 may process the target source code file to obtain an intermediate product and store the intermediate product according to the first branch storage path. The article build request is generated by the fifth electronic device 105 in response to the article build task from the sixth electronic device 106 being triggered.
The first electronic device 101 may send a first branch storage path corresponding to the intermediate article to the second electronic device 102 to cause a second target GIT repository deployed on the second electronic device 102 to perform a branch synchronization operation for a second branch storage path according to the first branch storage path, wherein the second branch is a subsequent branch of the first branch.
It should be noted that the version construction method provided by the embodiment of the present disclosure may be generally executed by the third electronic device 103. Accordingly, the version building apparatus provided by the embodiment of the present disclosure may be generally disposed in the third electronic device 103. The version building method provided by the embodiment of the present disclosure may also be executed by a server cluster different from the third electronic device 103 and capable of communicating with the third electronic device 103. Correspondingly, the version building apparatus provided in the embodiment of the present disclosure may also be disposed in a server cluster different from the third electronic device 103 and capable of communicating with the third electronic device 103.
It should be understood that the first electronic device, the second electronic device, the third electronic device, the fourth electronic device, the fifth electronic device, the sixth electronic device, and the network in fig. 1 are merely illustrative. There may be any number of first, second, third, fourth, fifth, sixth electronic devices and networks, as desired for implementation.
FIG. 2 schematically shows a flow diagram of a version construction method according to an embodiment of the present disclosure. The version construction method can be applied to a third electronic device which can be respectively connected with the first electronic device and the second electronic device in a communication mode.
As shown in fig. 2, the method includes operations S210 to S250.
In operation S210, a version build request is obtained, wherein the version build request includes a target branch storage path of the intermediate article and a repository address of the first target GIT repository.
According to embodiments of the present disclosure, the intermediate artifacts may be artifacts that are needed for building new versions of products, each intermediate artifact having a corresponding branched storage path. The target branch storage path may be used to characterize the storage path of the intermediate article that currently needs to be fetched. The target branch storage path may comprise a first branch storage path that may be used to characterize the branch storage path of the first branch or a second branch storage path that may be used to characterize the branch storage path of the second branch, which may be a subsequent branch of the first branch. The second branch storage path may be a GIT repository based synchronization mechanism that synchronizes the second branch storage path to the first branch storage path.
According to the embodiment of the present disclosure, the target branch storage path is different from the full storage path, and the full storage path includes the storage paths of the respective branches, that is, the full storage path may include the storage paths of other branches in addition to the storage path of the intermediate product that needs to be currently acquired (i.e., the target branch storage path).
According to an embodiment of the present disclosure, the intermediate product may be obtained by the first electronic device processing a target source code file in response to a product construction request for the intermediate product to be constructed, wherein the product construction request may include the first branch storage path, the warehouse address of the second target GIT warehouse, and the branch identifier, and the target source code file may be obtained from the second clone GIT warehouse according to the branch identifier. The target source code file may include a JS source file. The second clone GIT repository may be obtained by acquiring the second target GIT repository from the second electronic device for cloning according to the repository address of the second target GIT repository. The intermediate product corresponding to each branch can be obtained in the above manner.
According to embodiments of the present disclosure, the intermediate article may comprise a Bundle article. The intermediate article may include different types of files, optionally compilation files, delta files, and signature files, and different types of intermediate articles may be stored in different directories. The directories may include a front-end directory (i.e., a Web directory) and a back-end directory (i.e., an application directory). The front-end directory may correspond to a deployed Web front-end server, and the back-end directory may correspond to a deployed application server.
According to an embodiment of the present disclosure, the first target GIT repository and the second target GIT repository may be deployed at the second electronic device. The first target GIT repository and the second target GIT repository may be the same or different.
In operation S220, the first target GIT repository is acquired from the second electronic device 102 according to the repository address of the first target GIT repository, resulting in a first clone GIT repository.
According to an embodiment of the present disclosure, the third electronic device may clone the first target GIT repository acquired from the second electronic device, resulting in a first cloned GIT repository.
In operation S230, other products and other source code files are acquired from the first cloned GIT repository.
In operation S240, an intermediate article is acquired from the first electronic device according to the target branch storage path.
In operation S250, a new version product is constructed according to the intermediate artifacts, other artifacts, and other source code files.
According to the embodiment of the disclosure, the intermediate product, other products and other source code files can be integrated to obtain a new version product.
According to an embodiment of the disclosure, the first electronic device may be a server in a server cluster, and the first electronic device may be determined from the server cluster based on load balancing.
According to an embodiment of the present disclosure, a version construction request including a target branch storage path of an intermediate product and a warehouse address of a first target GIT warehouse is acquired through a third electronic device, the first target GIT warehouse is acquired from a second electronic device according to the warehouse address of the first target GIT warehouse, the first target GIT warehouse is cloned to obtain a first clone GIT warehouse, other products and other source code files are acquired from the first clone GIT warehouse, the intermediate product is acquired from the first electronic device according to the target branch storage path, and a new version product is constructed according to the intermediate product, the other products and the other source code files. Since the intermediate product is obtained from the first electronic device and is not directly obtained from the second electronic device on which the first target GIT warehouse is deployed, it is realized to construct the intermediate product without the GIT warehouse, and further, the total amount of the GIT warehouse is reduced, thereby improving the version construction efficiency.
Meanwhile, the intermediate products corresponding to the target branch storage path are obtained, but not all the intermediate products of each branch, so that the intermediate products of the required branches can be obtained more accurately, and further the version slimming is realized, and the technical problems that the version construction efficiency is not high and the version capacity is large due to the adoption of the related technology are at least partially overcome.
According to an embodiment of the present disclosure, acquiring other artifacts and other source code files from the first cloned GIT repository may include the following operations.
Acquiring a target incremental file directory in a first clone GIT warehouse; and under the condition that other source code file directories exist in the target incremental file directory, acquiring other products and other source code files corresponding to the other source code file directories.
According to the embodiment of the disclosure, the third electronic device may determine whether other source code file directories required by other versions exist in the target incremental file directory, and if it is determined that other source code file directories exist in the target incremental file directory, may acquire other artifacts and other source code files corresponding to the other source code file directories. The other source code files can be compiled to obtain other compiled source code files, the other compiled source code files can be stored in the temporary directory, and other products and the temporary directory are stored in the corresponding storage paths.
According to an embodiment of the present disclosure, obtaining an intermediate article from a first electronic device according to a target branch storage path may include the following operations.
And under the condition that the source code file directory exists in the target incremental file target, acquiring the intermediate product from the first electronic equipment according to the target branch storage path.
According to the embodiment of the disclosure, the third electronic device may determine whether the target delta file directory has a source code file directory, and if the source code file directory is determined to exist, it may indicate that a new intermediate product is constructed, in which case, the intermediate product may be obtained from the first electronic device according to the target branch storage path. A portion of the intermediate artifacts may be retrieved from a front-end target of the first electronic device and a portion of the intermediate artifacts may be retrieved from a back-end directory of the first electronic device based on the target branch storage path.
According to an embodiment of the present disclosure, obtaining a version build request may include the following operations.
A version build request sent from a fourth electronic device is received, wherein the version build request is generated by the fourth electronic device in response to a version build task generated by a persistent integration tool deployed at the fourth electronic device being triggered.
According to an embodiment of the present disclosure, a persistent integration tool may be deployed on the fourth electronic device, optionally the persistent integration tool may include devices.
According to the embodiment of the disclosure, the continuous integration tool can build a production line, carry out version configuration to obtain version configuration information, generate a version construction task under the condition of obtaining the version configuration information, trigger the version construction task through the production line, generate a version construction request, send the version construction request to a server cluster where the first electronic device is located, and determine the first electronic device from the server cluster through the server cluster based on load balancing. The version build task may be the first Jenkins task.
According to an embodiment of the present disclosure, the version build task is generated by the persistent integration tool according to the version configuration information.
According to an embodiment of the present disclosure, the above version construction method may further include the following operations.
Generating log information aiming at the new version product according to the storage path of the new version product; and sending the log information to the fourth electronic equipment.
According to the embodiment of the disclosure, the log information may include a storage path of the new version product, and may further include a size, a generation time, and the like of the new version product. The third electronic device can send the log information to a version construction task in the fourth electronic device, and the version construction task sends the log information to a production line built by the continuous integration tool. After obtaining the log information, the pipeline may send the log information to the test environment, so that the test environment deploys the new version product.
According to an embodiment of the present disclosure, the target branch storage path comprises a first branch storage path or a second branch storage path; the intermediate product is obtained by processing a target source code file by first electronic equipment in response to a product construction request aiming at the intermediate product to be constructed; the article build request includes the first branch storage path, the warehouse address of the second target GIT warehouse, and the branch identification; the target source code file is obtained from the second clone GIT warehouse according to the branch identification; the second cloned GIT warehouse is obtained by acquiring a second target GIT warehouse from the second electronic equipment according to the warehouse address of the second target GIT warehouse and cloning; and the second branch storage path is obtained by executing branch synchronization operation aiming at the second branch storage path according to the first branch storage path transmitted by the first electronic equipment by a second target GIT warehouse deployed on the second electronic equipment, wherein the second branch storage path is used for characterizing the storage path of the second branch, and the second branch is a subsequent branch of the first branch.
FIG. 3 schematically shows a flow chart of another version construction method according to an embodiment of the present disclosure. The version construction method can be applied to a first electronic device which can be connected with a third electronic device in a communication mode.
As shown in fig. 3, the method includes operations S310 to S360.
In operation S310, a product build request for an intermediate product to be built is obtained, wherein the product build request includes a first branch storage path, a warehouse address of a second target GIT warehouse, and a branch identification, and wherein the first branch storage path is used to characterize the storage path of the first branch.
In operation S320, a second target GIT repository is acquired from the second electronic device according to the repository address of the second target GIT repository, to obtain a second clone GIT repository.
According to an embodiment of the present disclosure, the first electronic device may clone the second target GIT repository acquired from the second electronic device, resulting in a second cloned GIT repository.
In operation S330, a target source code file corresponding to the branch identification is acquired from the second cloned GIT repository.
In operation S340, the target source code file is processed to obtain an intermediate product.
According to the embodiment of the disclosure, the target source code file can be processed by using an IFTide tool, so that an intermediate product is obtained.
In operation S350, a first branch storage path corresponding to the intermediate product is transmitted to the second electronic device, so that the second target GIT warehouse disposed on the second electronic device performs a branch synchronization operation with respect to the second branch storage path according to the first branch storage path, wherein the second branch is a subsequent branch of the first branch.
According to the embodiment of the disclosure, in order to facilitate subsequent version construction, intermediate products of required branches can be acquired more accurately without acquiring the intermediate products of each branch, and the method can be implemented based on a synchronization mechanism of the GIT warehouse, that is, the first electronic device sends the first branch storage path to the second electronic device, and the second target GIT warehouse deployed on the second electronic device synchronizes the second branch storage path to the first branch storage path based on the synchronization mechanism of the GIT warehouse. Since the second branch storage path is synchronized to the first branch storage path, it is possible to realize that the branch storage path in each branch is the latest version of the branch storage path.
In operation S360, the intermediate article is stored according to the first branch storage path, so that the third electronic device performs version construction in response to the version construction request.
According to an embodiment of the present disclosure, the first electronic device may store the intermediate article to a location corresponding to the first branch storage path, so that the third electronic device may retrieve the intermediate article according to the target branch storage path in response to the version construction request, so as to process the intermediate article, the other article, and the other source code file, and construct a new version product, wherein the target branch storage path may include the first branch storage path or the second branch storage path. The other articles and the other source code files may be obtained by the third electronic device from the first cloned GIT repository in response to a version construction request including the target branch storage path and the repository address of the first target GIT repository, the first cloned GIT repository being obtained by obtaining the first target GIT repository from the second electronic device for cloning based on the repository address of the first target GIT repository.
According to an embodiment of the present disclosure, a product construction request for an intermediate product to be constructed including a first branch storage path, a warehouse address of a second target GIT warehouse, and a branch identifier is acquired through a first electronic device, the second target GIT warehouse is acquired from the second electronic device according to the warehouse address of the second target GIT warehouse, the second target GIT warehouse is cloned to obtain a second clone GIT warehouse, a target source code file corresponding to the branch identifier is acquired from the second clone GIT warehouse, the target source code file is processed to obtain the intermediate product, the first branch storage path corresponding to the intermediate product is transmitted to the second electronic device, so that the second target GIT warehouse deployed on the second electronic device performs a branch synchronization operation for the second branch storage path according to the first branch storage path, and the intermediate product is stored according to the first branch storage path, such that the third electronic device performs a version build in response to the version build request. The intermediate product is obtained by processing the target source code file by the first electronic device in response to the product construction request for the intermediate product to be constructed, and is not directly obtained from the second electronic device deployed with the second target GIT warehouse, so that the intermediate product is constructed without the GIT warehouse, the total quantity of the GIT warehouse is reduced, and the version construction efficiency is improved.
Meanwhile, the intermediate products corresponding to the target branch storage path are obtained, but not all the intermediate products of each branch, so that the intermediate products of the required branches can be obtained more accurately, and further the version slimming is realized, and the technical problems that the version construction efficiency is not high and the version capacity is large due to the adoption of the related technology are at least partially overcome.
In addition, because a basic environment does not need to be built on local equipment, the intermediate product generated by the first electronic equipment can be obtained, and therefore, the manual operation cost is reduced.
According to an embodiment of the present disclosure, the other article and the other source code file are obtained by the third electronic device from the first cloned GIT repository in response to a version build request, the version build request including a target branch storage path of the intermediate article and a repository address of the first target GIT repository, and the first cloned GIT repository is obtained by the third electronic device obtaining the first target GIT repository from the second electronic device for cloning according to the repository address of the first target GIT repository in response to the version build request.
According to an embodiment of the present disclosure, transmitting the first branch storage path corresponding to the intermediate product to the second electronic device, so that the second target GIT warehouse disposed on the second electronic device performs a branch synchronization operation with respect to the second branch storage path according to the first branch storage path, may include the following operations.
Sending the first branch storage path corresponding to the intermediate article to the second electronic device, so that the second target GIT warehouse disposed on the second electronic device processes the first branch storage path by using a three-way merge method, and the second storage path of the second branch is synchronized to be the first branch storage path.
According to embodiments of the present disclosure, the second branch storage path may be synchronized to the first branch storage path using a three-way merge method.
For example, three branches are included, namely a first branch, a second branch and a third branch, which are subsequent branches of the first branch. A second target GIT repository deployed on a second electronic device may perform a branch synchronization operation to synchronize branch storage paths of the second branch and the third branch, respectively, to the first branch storage path.
According to an embodiment of the present disclosure, obtaining an article build request for an intermediate article to be built may include the following operations.
Receiving an article build request sent from a fifth electronic device, wherein the article build request is generated by the fifth electronic device in response to an article build task from a sixth electronic device being triggered.
According to an embodiment of the present disclosure, page configuration may be performed on the sixth electronic device, and page configuration information may be obtained, where the page configuration information may include the target branch storage path, the warehouse address of the second target GIT warehouse, and the branch identifier. The sixth electronic device may invoke a link to the persistent integration service, through which an artifact build task on the fifth electronic device is triggered. The fifth electronic device generates an article build request in response to the triggered article build task and sends the article build request to the third electronic device for building the intermediate article. The article building task may be a second Jenkins task.
According to the embodiment of the disclosure, the article building task is generated by the sixth electronic device calling the persistent integration service according to the page configuration information.
According to an embodiment of the present disclosure, processing the target source code file to obtain the intermediate product may include the following operations.
Compiling a target source code file of an intermediate product to be constructed under the condition that the date of constructing the intermediate product meets the preset condition to obtain a compiled file; generating a differential file, wherein the differential file is obtained according to the compiled file and the compiled file of the latest version product stored in the second clone GIT warehouse; generating a signature file for the compiled file and the delta file; the compilation file, delta file, and signature file are used as intermediate artifacts.
An example of an article build task as a second Jenkins task is illustrated according to an embodiment of the present disclosure. The second Jenkins task in the fifth electronic device is triggered, and the first electronic device may be configured as an execution machine of the Jenkins platform and used as an execution node for executing the second Jenkins task. The first electronic device determines whether the date of building the intermediate product meets a preset condition, if the date of building the intermediate product meets the preset condition, the intermediate product can be constructed, and otherwise, the intermediate product cannot be constructed.
According to an embodiment of the present disclosure, the first electronic device may acquire the dependency file, which may include the target branch storage path, the warehouse address of the second target GIT warehouse, and the branch identification, if it is determined that the date of building the intermediate article satisfies the preset condition. And cloning a second target GIT warehouse corresponding to the warehouse address of the second target GIT warehouse of the second electronic equipment by using the IFTide tool according to the dependency file to obtain a second cloned GIT warehouse, and acquiring a target source code file corresponding to the branch identifier from the second cloned GIT warehouse.
According to embodiments of the present disclosure, the compilation file and the delta file may be stored to a front-end directory and the signature file may be stored to a back-end directory. The compiled file may be compressed to obtain a compressed file.
According to an embodiment of the present disclosure, the above version construction method may further include the following operations.
Storing the compiled file and the delta file to a front-end directory; and storing the signature file to a back-end directory.
According to the embodiment of the disclosure, different types of intermediate products can be stored in corresponding catalogs respectively to prepare for the construction of new versions of products.
Fig. 4 schematically shows a signaling diagram of a version construction method according to an embodiment of the disclosure.
As shown in fig. 4, the sixth electronic device may generate an article building task according to the page configuration information, and the fifth electronic device may generate an article building request in response to the article building task.
The first electronic device may acquire the second target GIT repository from the second electronic device according to the repository address of the second target GIT repository in response to the article construction request, and clone the second target GIT repository to obtain a second cloned GIT repository. The first electronic device, in response to the article build request, obtains the target source code file from the second cloned GIT repository based on the branch identification.
The first electronic device may compile the target source code file to obtain a compiled file, process the compiled file according to the compiled file and a latest version of the compiled file in the second clone GIT repository to obtain a delta file, and store the compiled file and the delta file in a front-end directory of the first electronic device. The first electronic device signs the compiled file and the differential file to obtain a signature file, and the signature file is stored in a back-end directory of the first electronic device. The compilation file, delta file, and signature file are used as intermediate artifacts.
The first electronic device may store the intermediate article according to the first branch storage path. The first electronic device may send the second electronic device the first branch storage path.
The second target GIT repository deployed on the second electronic device may utilize a three-way merge method to synchronize the second branch storage path as the first branch storage path, the second branch being a subsequent branch of the first branch.
The fourth electronic device may generate a version construction task based on the version configuration information, generate a version construction request in response to the version construction task being triggered, and send the version construction request to the third electronic device.
The third electronic device may acquire the first target GIT repository from the second electronic device according to the repository address of the first target GIT repository in response to the version construction request, and clone the first target GIT repository to obtain a first cloned GIT repository. And acquiring a target incremental file directory in the first clone GIT warehouse, and acquiring other products and other source code files corresponding to other source code file directories under the condition that the target incremental file directory is determined to have other source code file directories.
The third electronic device may obtain the intermediate product from the first electronic device according to the target branch storage path when it is determined that the source code file directory exists in the target delta file directory of the intermediate product.
The third electronic device may integrate the intermediate article, the other article, and the other source code file to build a new version of the product.
The third electronic device may generate log information for the new version product and send the log information to the fourth electronic device, which stores the log information for the developer to view.
Fig. 5 schematically shows a block diagram of a version construction apparatus according to an embodiment of the present disclosure. The version building device is arranged on a third electronic device which can be in communication connection with the first electronic device and the second electronic device respectively.
As shown in fig. 5, the version construction apparatus 500 may include a first obtaining module 510, a second obtaining module 520, a third obtaining module 530, a fourth obtaining module 540, and a first constructing module 550.
A first obtaining module 510 is configured to obtain a version build request, wherein the version build request includes a target branch storage path of the intermediate product and a repository address of the first target GIT repository.
The second obtaining module 520 is configured to obtain the first target GIT repository from the second electronic device 102 according to the repository address of the first target GIT repository to obtain the first clone GIT repository.
A third obtaining module 530 for obtaining other artifacts and other source code files from the first cloned GIT repository.
A fourth obtaining module 540, configured to obtain the intermediate product from the first electronic device 101 according to the target branch storage path.
A first build module 550 for building a new version of the product from the intermediate artifacts, other artifacts, and other source code files.
According to an embodiment of the present disclosure, a version build request including a target branch storage path of an intermediate product and a warehouse address of a first target GIT warehouse is acquired through a third electronic device, the first target GIT warehouse is acquired from a second electronic device according to the warehouse address of the first target GIT warehouse, the first target GIT warehouse is cloned to obtain a first clone GIT warehouse, other products and other source code files are acquired from the first clone GIT warehouse, the intermediate product is acquired from the first electronic device according to the target branch storage path, and a new version product is built according to the intermediate product, the other products and the other source code files. Since the intermediate product is obtained from the first electronic device and is not directly obtained from the second electronic device on which the first target GIT warehouse is deployed, it is realized to construct the intermediate product without the GIT warehouse, and further, the total amount of the GIT warehouse is reduced, thereby improving the version construction efficiency.
Meanwhile, the intermediate products corresponding to the target branch storage path are obtained, but not all the intermediate products of each branch, so that the intermediate products of the required branches can be obtained more accurately, and further the version slimming is realized, and the technical problems that the version construction efficiency is not high and the version capacity is large due to the adoption of the related technology are at least partially overcome.
According to an embodiment of the present disclosure, the third obtaining module 530 may include a first obtaining unit and a second obtaining unit.
A first obtaining unit, configured to obtain a target incremental file directory in the first cloned GIT repository.
And the second acquisition unit is used for acquiring other products and other source code files corresponding to other source code file directories under the condition that other source code file directories exist in the target incremental file directory.
According to an embodiment of the present disclosure, the fourth obtaining module 540 may include a third obtaining unit.
And the third acquisition unit is used for acquiring the intermediate product from the first electronic equipment according to the target branch storage path under the condition that the source code file directory exists in the target incremental file target.
According to an embodiment of the present disclosure, the first obtaining module 510 may include a first receiving unit.
The system comprises a first receiving unit and a second receiving unit, wherein the first receiving unit is used for receiving a version construction request sent by a fourth electronic device, and the version construction request is generated by the fourth electronic device in response to a version construction task generated by a continuous integration tool deployed on the fourth electronic device.
According to an embodiment of the present disclosure, the version build task is generated by the persistent integration tool according to the version configuration information.
According to an embodiment of the present disclosure, the version building apparatus 500 may further include a generating module and a second transmitting module.
And the generating module is used for generating the log information aiming at the new version product according to the storage path of the new version product.
And the second sending module is used for sending the log information to the fourth electronic equipment.
According to an embodiment of the present disclosure, the target branch storage path comprises a first branch storage path or a second branch storage path; the intermediate product is obtained by processing a target source code file by first electronic equipment in response to a product construction request aiming at the intermediate product to be constructed; the article build request includes the first branch storage path, the warehouse address of the second target GIT warehouse, and the branch identification; the target source code file is obtained from the second clone GIT warehouse according to the branch identification; the second cloned GIT warehouse is obtained by acquiring a second target GIT warehouse from the second electronic equipment according to the warehouse address of the second target GIT warehouse and cloning; and the second branch storage path is obtained by executing branch synchronization operation aiming at the second branch storage path according to the first branch storage path transmitted by the first electronic equipment by a second target GIT warehouse deployed on the second electronic equipment, wherein the second branch storage path is used for characterizing the storage path of the second branch, and the second branch is a subsequent branch of the first branch.
Fig. 6 schematically shows a block diagram of another version construction apparatus according to an embodiment of the present disclosure. The version building device may be provided in a first electronic device capable of being communicatively connected to a third electronic device.
As shown in fig. 6, the version construction apparatus 600 may include a fifth obtaining module 610, a sixth obtaining module 620, a seventh obtaining module 630, a processing module 640, a transmitting module 650, and a first storage module 660.
A fifth obtaining module 610, configured to obtain a product construction request for an intermediate product to be constructed, where the product construction request includes a first branch storage path, a warehouse address of the second target GIT warehouse, and a branch identifier, and the first branch storage path is used to characterize a storage path of the first branch.
A sixth obtaining module 620, configured to obtain the second target GIT repository from the second electronic device 102 according to the repository address of the second target GIT repository, so as to obtain a second clone GIT repository.
A seventh obtaining module 630, configured to obtain the target source code file corresponding to the branch identifier from the second cloned GIT repository.
And the processing module 640 is used for processing the target source code file to obtain an intermediate product.
A sending module 650, configured to send the first branch storage path corresponding to the intermediate product to the second electronic device 102, so that the second target GIT warehouse disposed on the second electronic device 102 performs a branch synchronization operation for the second branch storage path according to the first branch storage path, where the second branch is a subsequent branch of the first branch.
A first storage module 660 configured to store the intermediate article according to the first branch storage path, so that the third electronic device 103 performs version construction in response to the version construction request.
According to an embodiment of the present disclosure, a product construction request for an intermediate product to be constructed including a first branch storage path, a warehouse address of a second target GIT warehouse, and a branch identifier is acquired through a first electronic device, the second target GIT warehouse is acquired from the second electronic device according to the warehouse address of the second target GIT warehouse, the second target GIT warehouse is cloned to obtain a second clone GIT warehouse, a target source code file corresponding to the branch identifier is acquired from the second clone GIT warehouse, the target source code file is processed to obtain the intermediate product, the first branch storage path corresponding to the intermediate product is transmitted to the second electronic device, so that the second target GIT warehouse deployed on the second electronic device performs a branch synchronization operation for the second branch storage path according to the first branch storage path, and the intermediate product is stored according to the first branch storage path, such that the third electronic device performs a version build in response to the version build request. The intermediate product is obtained by processing the target source code file by the first electronic device in response to the product construction request for the intermediate product to be constructed, and is not directly obtained from the second electronic device deployed with the second target GIT warehouse, so that the intermediate product is constructed without the GIT warehouse, the total quantity of the GIT warehouse is reduced, and the version construction efficiency is improved.
Meanwhile, the intermediate products corresponding to the target branch storage path are obtained, but not all the intermediate products of each branch, so that the intermediate products of the required branches can be obtained more accurately, and further the version slimming is realized, and the technical problems that the version construction efficiency is not high and the version capacity is large due to the adoption of the related technology are at least partially overcome.
In addition, because a basic environment does not need to be built on local equipment, the intermediate product generated by the first electronic equipment can be obtained, and therefore, the manual operation cost is reduced.
According to an embodiment of the present disclosure, the other article and the other source code file are obtained by the third electronic device from the first cloned GIT repository in response to a version build request, the version build request including a target branch storage path of the intermediate article and a repository address of the first target GIT repository, and the first cloned GIT repository is obtained by the third electronic device obtaining the first target GIT repository from the second electronic device for cloning GIT according to the repository address of the first target GIT repository in response to the version build request.
The transmitting module 650 may include a transmitting unit according to an embodiment of the present disclosure.
A sending unit, configured to send the first branch storage path corresponding to the intermediate product to the second electronic device, so that the second target GIT warehouse disposed on the second electronic device processes the first branch storage path by using a three-way merge method, so that the second storage path of the second branch is synchronized as the first branch storage path.
According to an embodiment of the present disclosure, the fifth obtaining module 610 may include a second receiving unit.
The second receiving unit is used for receiving the product building request sent by the fifth electronic device, wherein the product building request is generated by the fifth electronic device in response to the triggering of the product building task from the sixth electronic device.
According to the embodiment of the disclosure, the article building task is generated by the sixth electronic device calling the persistent integration service according to the page configuration information.
According to an embodiment of the present disclosure, the processing module 640 may include a compiling unit, a first generating unit, a second generating unit, and a determining unit.
And the compiling unit is used for compiling the target source code file to obtain a compiled file under the condition that the date for constructing the intermediate product meets the preset condition.
A first generating unit for generating a delta file, wherein the delta file is obtained from the compiled file and the compiled file of the latest version of the product stored by the second clone GIT repository.
A second generation unit to generate a signature file for the compilation file and the delta file.
A determination unit for taking the compilation file, the delta file, and the signature file as an intermediate product.
According to an embodiment of the present disclosure, the version building apparatus 600 may further include a second storage module and a third storage module.
And the second storage module is used for storing the compiling file and the difference file to the front-end directory.
And the third storage module is used for storing the signature file to a back-end directory.
Any of the modules, units, or at least part of the functionality of any of them according to embodiments of the present disclosure may be implemented in one module. Any one or more of the modules and units according to the embodiments of the present disclosure may be implemented by being split into a plurality of modules. Any one or more of the modules, units according to the embodiments of the present disclosure may be implemented at least partially as a hardware Circuit, such as a Field Programmable Gate Array (FPGA), a Programmable Logic Array (PLA), a system on a chip, a system on a substrate, a system on a package, an Application Specific Integrated Circuit (ASIC), or may be implemented by hardware or firmware in any other reasonable manner of integrating or packaging a Circuit, or implemented by any one of three implementations of software, hardware, and firmware, or any suitable combination of any of them. Alternatively, one or more of the modules, units according to embodiments of the present disclosure may be implemented at least partly as computer program modules, which, when executed, may perform the respective functions.
For example, any plurality of the first obtaining module 510, the first cloning module 520, the second obtaining module 530, the third obtaining module 540, and the integrating module 550, or the fifth obtaining module 610, the sixth obtaining module 620, the seventh obtaining module 630, the processing module 640, the sending module 650, and the first storing module 660 may be combined in one module/unit to be implemented, or any one of the modules/units may be split into a plurality of modules/units. Alternatively, at least part of the functionality of one or more of these modules/units may be combined with at least part of the functionality of other modules/units and implemented in one module/unit. According to the embodiment of the present disclosure, at least one of the first obtaining module 510, the first cloning module 520, the second obtaining module 530, the third obtaining module 540 and the integrating module 550, or the fifth obtaining module 610, the sixth obtaining module 620, the seventh obtaining module 630, the processing module 640, the sending module 650 and the first storing module 660 may be at least partially implemented as a hardware circuit, such as a Field Programmable Gate Array (FPGA), a Programmable Logic Array (PLA), a system on a chip, a system on a substrate, a system on a package, an Application Specific Integrated Circuit (ASIC), or may be implemented by hardware or firmware in any other reasonable manner of integrating or packaging a circuit, or implemented by any one of three manners of software, hardware and firmware, or implemented by a suitable combination of any of them. Alternatively, at least one of the first obtaining module 510, the first cloning module 520, the second obtaining module 530, the third obtaining module 540 and the integrating module 550, or the fifth obtaining module 610, the sixth obtaining module 620, the seventh obtaining module 630, the processing module 640, the sending module 650 and the first storage module 660 may be at least partially implemented as a computer program module, which may perform corresponding functions when executed.
It should be noted that the version construction apparatus part in the embodiment of the present disclosure corresponds to the version construction method part in the embodiment of the present disclosure, and the specific description of the version construction apparatus part may refer to the version construction method part, which is not described herein again.
Fig. 7 schematically shows a block diagram of an electronic device adapted to implement the above described method according to an embodiment of the present disclosure. The electronic device shown in fig. 7 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present disclosure.
As shown in fig. 7, an electronic device 700 according to an embodiment of the present disclosure includes a processor 701, which can perform various appropriate actions and processes according to a program stored in a Read-Only Memory (ROM) 702 or a program loaded from a storage section 708 into a Random Access Memory (RAM) 703. The processor 701 may include, for example, a general purpose microprocessor (e.g., a CPU), an instruction set processor and/or associated chipset, and/or a special purpose microprocessor (e.g., an Application Specific Integrated Circuit (ASIC)), among others. The processor 701 may also include on-board memory for caching purposes. The processor 701 may comprise a single processing unit or a plurality of processing units for performing the different actions of the method flows according to embodiments of the present disclosure.
In the RAM 703, various programs and data necessary for the operation of the electronic apparatus 700 are stored. The processor 701, the ROM 702, and the RAM 703 are connected to each other by a bus 704. The processor 701 performs various operations of the method flows according to the embodiments of the present disclosure by executing programs in the ROM 702 and/or the RAM 703. It is noted that the programs may also be stored in one or more memories other than the ROM 702 and RAM 703. The processor 701 may also perform various operations of method flows according to embodiments of the present disclosure by executing programs stored in the one or more memories.
Electronic device 700 may also include input/output (I/O) interface 705, which input/output (I/O) interface 705 is also connected to bus 704, according to an embodiment of the present disclosure. The electronic device 700 may also include one or more of the following components connected to the I/O interface 705: an input portion 706 including a keyboard, a mouse, and the like; an output section 707 including a Display panel such as a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and a speaker; a storage section 708 including a hard disk and the like; and a communication section 709 including a network interface card such as a LAN card, a modem, or the like. The communication section 709 performs communication processing via a network such as the internet. A drive 710 is also connected to the I/O interface 705 as needed. A removable medium 711 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is mounted on the drive 710 as necessary, so that a computer program read out therefrom is mounted into the storage section 708 as necessary.
According to embodiments of the present disclosure, method flows according to embodiments of the present disclosure may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer readable storage medium, the computer program containing program code for performing the method illustrated by the flow chart. In such an embodiment, the computer program can be downloaded and installed from a network through the communication section 709, and/or installed from the removable medium 711. The computer program, when executed by the processor 701, performs the above-described functions defined in the system of the embodiment of the present disclosure. The systems, devices, apparatuses, modules, units, etc. described above may be implemented by computer program modules according to embodiments of the present disclosure.
The present disclosure also provides a computer-readable storage medium, which may be contained in the apparatus/device/system described in the above embodiments; or may exist separately and not be assembled into the device/apparatus/system. The computer-readable storage medium carries one or more programs which, when executed, implement the method according to an embodiment of the disclosure.
According to an embodiment of the present disclosure, the computer-readable storage medium may be a non-volatile computer-readable storage medium. Examples may include, but are not limited to: a portable Computer diskette, a hard disk, a Random Access Memory (RAM), a Read-Only Memory (ROM), an Erasable Programmable Read-Only Memory (EPROM) or flash Memory), a portable compact Disc Read-Only Memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the preceding. In the present disclosure, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
For example, according to embodiments of the present disclosure, a computer-readable storage medium may include the ROM 702 and/or the RAM 703 and/or one or more memories other than the ROM 702 and the RAM 703 described above.
Embodiments of the present disclosure also include a computer program product comprising a computer program containing program code for performing the method provided by the embodiments of the present disclosure, when the computer program product is run on an electronic device, the program code being adapted to cause the electronic device to carry out the version construction method provided by the embodiments of the present disclosure.
The computer program, when executed by the processor 701, performs the above-described functions defined in the system/apparatus of the embodiments of the present disclosure. The systems, apparatuses, modules, units, etc. described above may be implemented by computer program modules according to embodiments of the present disclosure.
In one embodiment, the computer program may be hosted on a tangible storage medium such as an optical storage device, a magnetic storage device, or the like. In another embodiment, the computer program may also be transmitted in the form of a signal on a network medium, distributed, downloaded and installed via the communication section 709, and/or installed from the removable medium 711. The computer program containing program code may be transmitted using any suitable network medium, including but not limited to: wireless, wired, etc., or any suitable combination of the foregoing.
In accordance with embodiments of the present disclosure, program code for executing computer programs provided by embodiments of the present disclosure may be written in any combination of one or more programming languages, and in particular, these computer programs may be implemented using high level procedural and/or object oriented programming languages, and/or assembly/machine languages. The programming language includes, but is not limited to, programming languages such as Java, C + +, python, the "C" language, or the like. The program code may execute entirely on the user computing device, partly on the user device, partly on a remote computing device, or entirely on the remote computing device or server. In situations involving remote computing devices, the remote computing devices may be connected to the user computing device through any kind of Network, including a Local Area Network (LAN) or Wide Area Network (WAN), or may be connected to external computing devices (e.g., through the internet using an internet service provider).
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams or flowchart illustration, and combinations of blocks in the block diagrams or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions. Those skilled in the art will appreciate that various combinations and/or combinations of features recited in the various embodiments and/or claims of the present disclosure can be made, even if such combinations or combinations are not expressly recited in the present disclosure. In particular, various combinations and/or combinations of the features recited in the various embodiments and/or claims of the present disclosure may be made without departing from the spirit or teaching of the present disclosure. All such combinations and/or associations are within the scope of the present disclosure.
The embodiments of the present disclosure have been described above. However, these examples are for illustrative purposes only and are not intended to limit the scope of the present disclosure. Although the embodiments are described separately above, this does not mean that the measures in the embodiments cannot be used in advantageous combination. The scope of the disclosure is defined by the appended claims and equivalents thereof. Various alternatives and modifications can be devised by those skilled in the art without departing from the scope of the present disclosure, and such alternatives and modifications are intended to be within the scope of the present disclosure.

Claims (19)

1. A version construction method is applied to a third electronic device which can be respectively connected with a first electronic device and a second electronic device in a communication mode, and comprises the following steps:
obtaining a version build request, wherein the version build request comprises a target branch storage path of an intermediate product and a repository address of a first target GIT repository;
acquiring a first target GIT warehouse from the second electronic device according to the warehouse address of the first target GIT warehouse to obtain a first clone GIT warehouse;
obtaining other products and other source code files from the first cloned GIT repository;
obtaining the intermediate article from the first electronic device according to the target branch storage path; and
and constructing a new version product according to the intermediate product, the other products and the other source code files.
2. The method of claim 1, wherein said obtaining other artifacts and other source code files from said first cloned GIT repository comprises:
acquiring a target incremental file directory in the first clone GIT warehouse; and
and under the condition that other source code file directories exist in the target incremental file directory, acquiring other products and other source code files corresponding to the other source code file directories.
3. The method of claim 2, wherein the retrieving the intermediate article from the first electronic device according to the target branch storage path comprises:
and under the condition that the source code file directory exists in the target incremental file target, acquiring the intermediate product from the first electronic equipment according to the target branch storage path.
4. The method of claim 1, wherein the obtaining a version build request comprises:
receiving a version build request sent from a fourth electronic device, wherein the version build request is generated by the fourth electronic device in response to a version build task generated by a persistent integration tool deployed at the fourth electronic device being triggered.
5. The method of claim 4, wherein the version build task is generated by the persistent integration tool from version configuration information.
6. The method of claim 4, further comprising:
generating log information aiming at the new version product according to the storage path of the new version product; and
and sending the log information to the fourth electronic equipment.
7. The method of claim 1, wherein,
the target branch storage path comprises a first branch storage path or a second branch storage path;
the intermediate product is obtained by processing a target source code file by the first electronic equipment in response to a product construction request for the intermediate product to be constructed;
the article build request comprises the first branch storage path, a warehouse address of a second target GIT warehouse, and a branch identification; the target source code file is obtained from a second clone GIT warehouse according to the branch identification; the second cloned GIT repository is obtained by acquiring a second target GIT repository from the second electronic device for cloning according to the repository address of the second target GIT repository;
the second branch storage path is obtained by a second target GIT warehouse deployed on the second electronic device executing a branch synchronization operation for the second branch storage path according to the first branch storage path sent by the first electronic device, wherein the second branch storage path is used for characterizing a storage path of a second branch, and the second branch is a subsequent branch of the first branch.
8. A version building method is applied to a first electronic device which can be in communication connection with a third electronic device, and comprises the following steps:
obtaining a product construction request aiming at an intermediate product to be constructed, wherein the product construction request comprises a first branch storage path, a warehouse address of a second target GIT warehouse and a branch identifier, and the first branch storage path is used for characterizing the storage path of a first branch;
acquiring a second target GIT warehouse from the second electronic device according to the warehouse address of the second target GIT warehouse to obtain a second clone GIT warehouse;
acquiring a target source code file corresponding to the branch identification from the second clone GIT warehouse;
processing the target source code file to obtain an intermediate product;
sending a first branch storage path corresponding to the intermediate article to the second electronic device to cause a second target GIT repository deployed on the second electronic device to perform a branch synchronization operation for a second branch storage path according to the first branch storage path, wherein the second branch is a subsequent branch of the first branch;
storing the intermediate article of manufacture according to the first branch storage path to cause the third electronic device to perform a version build in response to a version build request.
9. The method of claim 8, wherein,
the other products and the other source code files are obtained by the third electronic device from a first clone GIT repository in response to the version construction request, the version construction request includes a target branch storage path of the intermediate product and a repository address of a first target GIT repository, and the first clone GIT repository is obtained by the third electronic device from the second electronic device in response to the version construction request, and obtaining a first target GIT repository for clone GIT according to the repository address of the first target GIT repository.
10. The method of claim 8, wherein the sending to the second electronic device a first branch storage path corresponding to the intermediate article to cause a second target GIT repository deployed on the second electronic device to perform a branch synchronization operation for a second branch storage path according to the first branch storage path comprises:
sending a first branch storage path corresponding to the intermediate article to the second electronic device to cause a second target GIT repository deployed on the second electronic device to process the first branch storage path using a three-way merge method such that a second storage path of the second branch is synchronized to the first branch storage path.
11. The method of claim 8, wherein the obtaining an article build request for an intermediate article to be built comprises:
receiving an article build request sent from a fifth electronic device, wherein the article build request is generated by the fifth electronic device in response to an article build task from a sixth electronic device being triggered.
12. The method of claim 11, wherein the artifact construction task is a call by the sixth electronic device to a persistent integration service, generated from page configuration information.
13. The method of claim 8, wherein the processing the target source code file to obtain an intermediate article of manufacture comprises:
compiling the target source code file to obtain a compiled file under the condition that the date for constructing the intermediate product meets the preset condition;
generating a delta file, wherein the delta file is obtained according to the compiled file and a compiled file of a latest version of a product stored by the second clone GIT repository;
generating a signature file for the compiled file and the delta file; and
taking the compiled file, the delta file, and the signature file as the intermediate article.
14. The method of claim 13, further comprising:
storing the compiled file and the delta file to a front-end directory; and
and storing the signature file to a back-end directory.
15. A version building device is arranged on a third electronic device which can be respectively connected with a first electronic device and a second electronic device in a communication mode, and comprises:
a first obtaining module, configured to obtain a version build request, where the version build request includes a target branch storage path of an intermediate product and a warehouse address of a first target GIT warehouse;
a second obtaining module, configured to obtain a first target GIT repository from the second electronic device according to the repository address of the first target GIT repository to obtain a first clone GIT repository;
a third obtaining module, configured to obtain other products and other source code files from the first cloned GIT repository;
a fourth obtaining module, configured to obtain the intermediate product from the first electronic device according to the target branch storage path; and
and the first construction module is used for constructing a new version product according to the intermediate product, the other products and the other source code files.
16. A version building device arranged on a first electronic device capable of being connected with a third electronic device in a communication way comprises:
a fifth obtaining module, configured to obtain a product construction request for an intermediate product to be constructed, where the product construction request includes a first branch storage path, a warehouse address of a second target GIT warehouse, and a branch identifier, where the first branch storage path is used to characterize a storage path of a first branch;
a sixth obtaining module, configured to obtain a second target GIT repository from the second electronic device according to the repository address of the second target GIT repository to obtain a second clone GIT repository;
a seventh obtaining module, configured to obtain a target source code file corresponding to the branch identifier from the second cloned GIT repository;
the processing module is used for processing the target source code file to obtain an intermediate product;
a sending module, configured to send a first branch storage path corresponding to the intermediate product to the second electronic device, so that a second target GIT warehouse deployed on the second electronic device performs a branch synchronization operation for a second branch storage path according to the first branch storage path, where the second branch is a subsequent branch of the first branch;
a first storage module, configured to store the intermediate product according to the first branch storage path, so that the third electronic device performs version construction in response to a version construction request.
17. An electronic device, comprising:
one or more processors;
a memory for storing one or more programs,
wherein the one or more programs, when executed by the one or more processors, cause the one or more processors to implement the method of any of claims 1-7 or claims 8-14.
18. A computer readable storage medium having stored thereon executable instructions which, when executed by a processor, cause the processor to carry out the method of any one of claims 1 to 7 or claims 8 to 14.
19. A computer program product comprising a computer program which, when executed by a processor, is adapted to carry out the method of any one of claims 1 to 7 or 8 to 14.
CN202110375168.0A 2021-04-07 2021-04-07 Version construction method, version construction device, electronic equipment and readable storage medium Active CN113094083B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110375168.0A CN113094083B (en) 2021-04-07 2021-04-07 Version construction method, version construction device, electronic equipment and readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110375168.0A CN113094083B (en) 2021-04-07 2021-04-07 Version construction method, version construction device, electronic equipment and readable storage medium

Publications (2)

Publication Number Publication Date
CN113094083A true CN113094083A (en) 2021-07-09
CN113094083B CN113094083B (en) 2024-02-06

Family

ID=76674944

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110375168.0A Active CN113094083B (en) 2021-04-07 2021-04-07 Version construction method, version construction device, electronic equipment and readable storage medium

Country Status (1)

Country Link
CN (1) CN113094083B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130174124A1 (en) * 2011-12-29 2013-07-04 Christina Watters Version numbering in single development and test environment
CN109783076A (en) * 2018-12-14 2019-05-21 深圳壹账通智能科技有限公司 Code administration method, apparatus, equipment and storage medium based on git
US20200326936A1 (en) * 2019-04-11 2020-10-15 Mastercard International Incorporated System and method for code synchronization between mainframe environment and distributed environment
CN112416327A (en) * 2020-11-23 2021-02-26 平安普惠企业管理有限公司 Project construction method and device, computer equipment and storage medium
CN112579097A (en) * 2020-12-21 2021-03-30 广州博冠信息科技有限公司 Software project construction method and device, storage medium and electronic equipment

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130174124A1 (en) * 2011-12-29 2013-07-04 Christina Watters Version numbering in single development and test environment
CN109783076A (en) * 2018-12-14 2019-05-21 深圳壹账通智能科技有限公司 Code administration method, apparatus, equipment and storage medium based on git
US20200326936A1 (en) * 2019-04-11 2020-10-15 Mastercard International Incorporated System and method for code synchronization between mainframe environment and distributed environment
CN112416327A (en) * 2020-11-23 2021-02-26 平安普惠企业管理有限公司 Project construction method and device, computer equipment and storage medium
CN112579097A (en) * 2020-12-21 2021-03-30 广州博冠信息科技有限公司 Software project construction method and device, storage medium and electronic equipment

Also Published As

Publication number Publication date
CN113094083B (en) 2024-02-06

Similar Documents

Publication Publication Date Title
CN109117169B (en) Method and device for repairing kernel vulnerability
US11550599B2 (en) Method and apparatus for running applet
CN110851139B (en) Method and device for checking codes and electronic equipment
CN111679990B (en) Test data generation method and device, readable medium and electronic equipment
CN110865889A (en) Method and apparatus for transferring events between components
CN111338944B (en) Remote Procedure Call (RPC) interface testing method, device, medium and equipment
CN111324470B (en) Method and device for generating information
CN113094081A (en) Software distribution method, device, computer system and computer readable storage medium
CN111414152B (en) Method, system, readable medium and electronic device for realizing business logic
CN113094084B (en) Version construction method, version construction device, electronic equipment and readable storage medium
CN110888773B (en) Method, device, medium and electronic equipment for acquiring thread identification
CN112527302B (en) Error detection method and device, terminal and storage medium
CN112650521A (en) Software development kit SDK (software development kit) hot repair method and device and electronic equipment
CN109614230B (en) Resource virtualization method and device and electronic equipment
CN111506904A (en) Method and device for online vulnerability repair
CN113094083A (en) Version construction method, version construction device, electronic equipment and readable storage medium
CN113656050B (en) Method and apparatus for generating version number
CN111625326B (en) Task pipeline execution method and device and electronic equipment
CN112882921B (en) Fault simulation method and device
CN110750424B (en) Resource inspection method and device
CN110727694B (en) Data processing method, device, electronic equipment and storage medium
CN116452208B (en) Method, device, equipment and medium for determining change transaction code
CN110716984B (en) Data processing method, device, electronic equipment and storage medium
CN111026571B (en) Processor down-conversion processing method and device and electronic equipment
CN114201171A (en) Product construction method, device, equipment, readable storage medium and program product

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant