CN116360800A - Deployment method and device of code branching environment and electronic equipment - Google Patents

Deployment method and device of code branching environment and electronic equipment Download PDF

Info

Publication number
CN116360800A
CN116360800A CN202310614830.2A CN202310614830A CN116360800A CN 116360800 A CN116360800 A CN 116360800A CN 202310614830 A CN202310614830 A CN 202310614830A CN 116360800 A CN116360800 A CN 116360800A
Authority
CN
China
Prior art keywords
branch
pipeline
target
database
server
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
CN202310614830.2A
Other languages
Chinese (zh)
Other versions
CN116360800B (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.)
Tianyi Cloud Technology Co Ltd
Original Assignee
Tianyi Cloud Technology Co Ltd
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 Tianyi Cloud Technology Co Ltd filed Critical Tianyi Cloud Technology Co Ltd
Priority to CN202310614830.2A priority Critical patent/CN116360800B/en
Publication of CN116360800A publication Critical patent/CN116360800A/en
Application granted granted Critical
Publication of CN116360800B publication Critical patent/CN116360800B/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/60Software deployment
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/65Updates
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Abstract

The invention discloses a deployment method, a device and electronic equipment of a code branching environment, wherein the method comprises the steps of pulling a target branch based on a onsole when a branching environment deployment instruction is received, and distributing a branch database for the target branch based on the onsole; constructing a pipeline based on the branch database, and binding a target branch with the branch database; acquiring an idle branch server and binding the idle branch server with a target branch; and calling a target branch to initialize a pipeline, and generating deployment completion information. The method and the system realize automation of branch server deployment, can enable developers of a team to be liberated from complicated and repeated server deployment work and concentrate on functional iteration work of the product, thereby improving research and development efficiency of the team and solving the problems of large quantity of branch test environments and complicated deployment.

Description

Deployment method and device of code branching environment and electronic equipment
Technical Field
The application relates to the technical field of electric digital data processing, in particular to a deployment method and device of a code branching environment and electronic equipment.
Background
Git is an open-source distributed version control system that can efficiently handle project version management from very small to very large at high speed. The main stream of the git branch management workflow generally pulls different code function branches or bug repair branches for testing according to the function iteration requirement of the product, and as the team scale is enlarged, the parallel iteration functions are more and more, so that the number of the git branches is more and more huge.
The current functional self-test/joint debugging environments are all team-shared, i.e. the team uses one self-test/joint debugging environment together. Since there is parallelism in functional iterations of the product, this approach tends to have interactions of functional logic and even hide some significant bugs. Independent test environments are independently deployed by research and development personnel when functional iteration is needed each time, so that the overall development efficiency of a team is low, and a plurality of abandoned environments are easy to influence the utilization rate of server resources. Therefore, at present, when large-scale team collaborative development is performed, no method for deploying a branching environment in a relatively efficient and automatic manner exists.
Disclosure of Invention
In order to solve the above problems, the embodiments of the present application provide a deployment method, apparatus, and electronic device for a code branching environment.
In a first aspect, an embodiment of the present application provides a method for deploying a code branching environment, where the method includes:
when a branch environment deployment instruction is received, pulling a target branch based on a condole, and distributing a branch database for the target branch based on the condole;
constructing a pipeline based on the branch database, and binding the target branch with the branch database;
acquiring an idle branch server and binding the idle branch server with a target branch;
and calling the target branch to initialize the pipeline, and generating deployment completion information.
Preferably, after the pipeline is constructed based on the branch database, the method further comprises:
determining a construction result of the pipeline;
when the pipeline is successfully constructed, executing the next step;
and when the pipeline construction fails, ending the deployment task and generating first failure information.
Preferably, said invoking said target branch to initialize said pipeline comprises:
and invoking a branch service of the target branch in the pipeline, initializing and issuing the pipeline based on the branch service.
Preferably, after the calling the target branch to initialize the pipeline, the method further comprises:
determining the release result of the pipeline;
when the pipeline is successfully issued, executing the next step;
and when the release of the pipeline fails, unbinding the target branch with an idle branch server and a branch database respectively, merging the target branch to a main branch, and generating second failure information.
Preferably, the method further comprises:
updating and releasing the pipeline when the code corresponding to the target branch is updated;
and updating the branch database when the corresponding table structure of the branch database has a new field.
Preferably, the method further comprises:
when a development completion instruction corresponding to the target branch is received, closing and destroying the pipeline to stop a service process of branch service in the pipeline;
and respectively unbinding the target branch, the idle branch server and the branch database, and deleting the branch database.
Preferably, the method further comprises:
acquiring a login log of the target branch, and determining the accumulated unregistered days of a user based on the login log;
and when the accumulated unregistered days are greater than a preset number of days, closing and destroying the pipeline, stopping the service process of the branch service in the pipeline, respectively releasing the binding of the target branch, the idle branch server and the branch database, and reserving the branch database.
In a second aspect, an embodiment of the present application provides a deployment apparatus for a code branching environment, where the apparatus includes:
the receiving module is used for pulling a target branch based on a onsole when a branch environment deployment instruction is received, and distributing a branch database for the target branch based on the onsole;
the construction module is used for constructing a pipeline based on the branch database and binding the target branch with the branch database;
the binding module is used for acquiring an idle branch server and binding the idle branch server with a target branch;
and the initialization module is used for calling the target branch to initialize the pipeline and generating deployment completion information.
In a third aspect, an embodiment of the present application provides an electronic device, including a memory, a processor, and a computer program stored on the memory and executable on the processor, the processor implementing the steps of the method as provided in the first aspect or any one of the possible implementations of the first aspect when the computer program is executed.
In a fourth aspect, embodiments of the present application provide a computer readable storage medium having stored thereon a computer program which, when executed by a processor, implements a method as provided by the first aspect or any one of the possible implementations of the first aspect.
The beneficial effects of the invention are as follows: the automation of the deployment of the branch server is realized, developers of a team can be liberated from complicated and repeated server deployment work and focus on the functional iteration work of the product, so that the research and development efficiency of the team is improved, and the problems of large quantity of branch test environments and complicated deployment are solved. The server utilization rate can be higher, the servers which are not used for a long time can be automatically recovered, and the hardware server expense of a team is reduced.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are required to be used in the embodiments will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a flowchart of a deployment method of a code branching environment according to an embodiment of the present application;
FIG. 2 is a schematic structural diagram of a deployment device of a code branching environment according to an embodiment of the present application;
fig. 3 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application.
In the following description, the terms "first," "second," and "first," are used for descriptive purposes only and are not to be construed as indicating or implying relative importance. The following description provides various embodiments of the present application, and various embodiments may be substituted or combined, so that the present application is also intended to encompass all possible combinations of the same and/or different embodiments described. Thus, if one embodiment includes feature A, B, C and another embodiment includes feature B, D, then the present application should also be considered to include embodiments that include one or more of all other possible combinations including A, B, C, D, although such an embodiment may not be explicitly recited in the following.
The following description provides examples and does not limit the scope, applicability, or examples set forth in the claims. Changes may be made in the function and arrangement of elements described without departing from the scope of the application. Various examples may omit, replace, or add various procedures or components as appropriate. For example, the described methods may be performed in a different order than described, and various steps may be added, omitted, or combined. Furthermore, features described with respect to some examples may be combined into other examples.
Referring to fig. 1, fig. 1 is a flowchart of a deployment method of a code branching environment provided in an embodiment of the present application. In an embodiment of the present application, the method includes:
s101, when a branch environment deployment instruction is received, pulling a target branch based on a condole, and distributing a branch database for the target branch based on the condole.
The execution subject of the present application may be a cloud server.
In one embodiment of the present application, if a user, i.e., a developer in a team, needs to construct a new branch environment to perform self-test/joint debugging, a corresponding operation is performed on the terminal, so as to generate a branch environment deployment instruction. After receiving the deployment instruction of the branch environment, the cloud server considers that the deployment of the branch environment is needed, and the cloud server pulls a target branch from a main branch through a con, and distributes a corresponding branch database for the target branch. The target branch is pulled to store the whole flow fork of the modification record, and is not influenced by other branches. Since the target branch is a branch pulled from the main branch for performing iterative independent test, initial data and initial functions and the like under default conditions should be the same as data and functions corresponding to the main branch, so that the data allocated in the branch database can be determined according to the data in the main database corresponding to the main branch.
The control refers to a command line interface provided by a computer operating system, and can be used for debugging a program, interacting with a user, outputting log information, inputting commands, viewing information output by the program and the like. In general, a con can be used in a terminal window of an operating system, and also can be used in a development tool, such as a browser console, an Integrated Development Environment (IDE), etc., which is a commonly used development tool.
S102, constructing a pipeline based on the branch database, and binding the target branch with the branch database.
In one embodiment of the present application, after the branch databases are allocated, the corresponding pipelines are constructed based on the table structure data in the branch databases. After the pipeline is constructed, the target branch is bound with a branch database configured for the target branch, so that the change of the target branch in the subsequent process can be correspondingly embodied in the data of the branch database.
Where pipelining refers to a quasi-parallel processing implementation in which multiple instructions overlap to operate when a program is executing. The simultaneous processing of various components is for different instructions, and they can work for different parts of multiple instructions at the same time, so as to improve the utilization rate of each component and the average execution speed of the instructions. It is a compile-time scheduling technique that overlaps with subsequent loop iterations to reveal operational level parallelism.
In one embodiment, after the pipeline is constructed based on the branch database, the method further includes:
determining a construction result of the pipeline;
when the pipeline is successfully constructed, executing the next step;
and when the pipeline construction fails, ending the deployment task and generating first failure information.
In one embodiment of the present application, after the pipeline is constructed, a determination is also made as to the construction result of the pipeline. The pipeline may fail to be constructed due to problems such as node misreporting, system reasons, etc. If the pipeline construction fails, it is meaningless to continue with subsequent environmental deployment, so the currently ongoing deployment task is ended, and first failure information is generated and sent to the user, so that the user is informed of the failure of the pipeline construction, which results in the failure of the deployment task and the ending of the deployment task through the first failure information. The node reporting error may be caused by different node versions configured under different environments. The system cause may be, for example, that the branch test environment system is Linux and the local environment system is window.
S103, acquiring an idle branch server, and binding the idle branch server with a target branch.
In one embodiment of the application, the construction of the assembly line is completed, after the branch database is bound to the target branch, an idle branch server which is not in a working state at present is obtained from the server, and the idle branch server is bound to the target branch, so that the idle branch server is used as a server used in the current test environment.
S104, calling the target branch to initialize the pipeline, and generating deployment completion information.
In one embodiment of the present application, the foregoing process constructs a pipeline according to the allocated branch database, deploys a branch test environment for actually adapting to the target branch, and loads data into the memory by calling a service process corresponding to the target branch, so as to initialize the pipeline. After the initialization is completed, the deployment completion information is generated and sent to the user terminal to inform the user that the environment is completely deployed, and research and development work can be performed. The whole process is automatically executed and realized, a user does not need to personally deploy a server environment, and the overall processing efficiency of the team is improved.
In one embodiment, the invoking the target branch to initialize the pipeline includes:
and invoking a branch service of the target branch in the pipeline, initializing and issuing the pipeline based on the branch service.
In one embodiment of the application, the branch service is called, and template replacement including information such as environment names, service versions and the like is carried out on the pipeline through the branch service, so that the pipeline is really adapted to the branch service of the target branch, initialization of the pipeline is completed, and further the branch environment deployment of the target branch is realized. The user can conduct development of a new branch function or debugging work of a bug based on the pipeline and the idle branch server.
In one embodiment, after the invoking the target branch to initialize the pipeline, further comprising:
determining the release result of the pipeline;
when the pipeline is successfully issued, executing the next step;
and when the release of the pipeline fails, unbinding the target branch with an idle branch server and a branch database respectively, merging the target branch to a main branch, and generating second failure information.
In one embodiment of the present application, to implement an online delivery process for an application that promotes across multiple environments, an initialized pipeline is issued. Therefore, it is also necessary to determine the issue result of the pipeline, and determine whether the pipeline issues successfully. For example, if the task "linking pictures" in the stable is always acquiring information on the target machine, the target machine has not returned content because of the error of the file mounting system, which may cause the pipeline to issue failure. And under the condition of pipeline release failure, namely, environment deployment failure is considered, the binding of the target branch, the idle branch server and the branch database is released, and the target branch is merged back to the main branch. In addition, second failure information is generated and sent to the user, so that the user is informed of the failure of the pipeline release to cause the failure of the deployment task through the second failure information, and the deployment task is ended.
In one embodiment, the method further comprises:
updating and releasing the pipeline when the code corresponding to the target branch is updated;
and updating the branch database when the corresponding table structure of the branch database has a new field.
In one embodiment of the present application, after the environment is deployed, new code may be generated during the process of developing functional iterations of the target branch in the environment by the user. When the code is detected to be updated, a service version corresponding to the updated code is determined, and then the pipeline is updated and released according to the service version. Similarly, if the table structure corresponding to the database has a new field in the research and development process, the branch database is updated.
In one embodiment, the method further comprises:
when a development completion instruction corresponding to the target branch is received, closing and destroying the pipeline to stop a service process of branch service in the pipeline;
and respectively unbinding the target branch, the idle branch server and the branch database, and deleting the branch database.
In one embodiment of the present application, if the user completes the development of the target branch, the user performs a corresponding operation to generate a development completion instruction. The cloud server receives a development completion instruction, namely considers that the development of the target branch is finished, enters a destruction flow, and unbinding the bound resources. Specifically, the service process of the branch service is stopped, then the binding relation between the target branch and the server and the database is released, and the related resources of the branch database are deleted. The unbound idle branch server will revert to an idle state to allow subsequent new branches to use it.
In one embodiment, the method further comprises:
acquiring a login log of the target branch, and determining the accumulated unregistered days of a user based on the login log;
and when the accumulated unregistered days are greater than a preset number of days, closing and destroying the pipeline, stopping the service process of the branch service in the pipeline, respectively releasing the binding of the target branch, the idle branch server and the branch database, and reserving the branch database.
In one embodiment of the present application, the developer needs to operate the destruction branch in principle after the development is completed in time to release the server resource, but in practical situations, the developer often forgets to destroy. For this reason, in order to reduce the resource, particularly the waste of server resources, at the maximum granularity, an automatic reclamation flow of the branch servers is also provided. Specifically, the decision agent deployed on each branch server can determine how many days each branch test environment has no user logged in by taking log of the branch service. If the user does not log in more than the preset days, the branch server is automatically recovered. In addition, in some cases, the developer does need to use the branch, so the branch database is not deleted in the destruction process of the recovery server. In this way, even if a subsequent developer wants to restore the branch server, it can be quickly restored.
The deployment device of the code branching environment provided in the embodiment of the present application will be described in detail with reference to fig. 2. It should be noted that, the deployment apparatus of the code branching environment shown in fig. 2 is used to execute the method of the embodiment shown in fig. 1 of the present application, for convenience of explanation, only the portion relevant to the embodiment of the present application is shown, and specific technical details are not disclosed, please refer to the embodiment shown in fig. 1 of the present application.
Referring to fig. 2, fig. 2 is a schematic structural diagram of a deployment apparatus of a code branching environment according to an embodiment of the present application. As shown in fig. 2, the apparatus includes:
a receiving module 201, configured to pull a target branch based on a onsole and allocate a branch database for the target branch based on the onsole when receiving a branch environment deployment instruction;
a building module 202, configured to build a pipeline based on the branch database, and bind the target branch to the branch database;
a binding module 203, configured to obtain an idle branch server, and bind the idle branch server with a target branch;
an initialization module 204, configured to invoke the target branch to initialize the pipeline, and generate deployment completion information.
In one embodiment, the build module 202 further includes:
a first determining unit, configured to determine a construction result of the pipeline;
the first judging unit is used for executing the next step when the pipeline is successfully constructed;
and the second judging unit is used for ending the deployment task and generating first failure information when the pipeline construction fails.
In one embodiment, the initialization module 204 includes:
and the initializing unit is used for calling the branch service of the target branch in the pipeline, and initializing and releasing the pipeline based on the branch service.
In one embodiment, the initialization module 204 further comprises:
a second determining unit, configured to determine a release result of the pipeline;
the third judging unit is used for executing the next step when the pipeline is successfully issued;
and the fourth judging unit is used for unbinding the target branch with the idle branch server and the branch database respectively when the release of the pipeline fails, merging the target branch to the main branch and generating second failure information.
In one embodiment, the apparatus further comprises:
the first judging module is used for updating and releasing the pipeline when the code corresponding to the target branch is updated;
and the second judging module is used for updating the branch database when the corresponding table structure of the branch database has a new field.
In one embodiment, the apparatus further comprises:
the first destroying module is used for closing and destroying the pipeline when receiving a development completion instruction corresponding to the target branch, and stopping the service process of the branch service in the pipeline;
and the deleting module is used for respectively unbinding the target branch from the idle branch server and the branch database and deleting the branch database.
In one embodiment, the apparatus further comprises:
the acquisition module is used for acquiring the login log of the target branch and determining the accumulated unregistered days of the user based on the login log;
and the second destroying module is used for closing and destroying the pipeline when the accumulated unregistered days are larger than the preset days, stopping the service process of the branch service in the pipeline, respectively releasing the binding of the target branch, the idle branch server and the branch database, and reserving the branch database.
It will be apparent to those skilled in the art that the embodiments of the present application may be implemented in software and/or hardware. "Unit" and "module" in this specification refer to software and/or hardware capable of performing a specific function, either alone or in combination with other components, such as Field programmable gate arrays (Field-Programmable Gate Array, FPGAs), integrated circuits (Integrated Circuit, ICs), etc.
The processing units and/or modules of the embodiments of the present application may be implemented by an analog circuit that implements the functions described in the embodiments of the present application, or may be implemented by software that executes the functions described in the embodiments of the present application.
Referring to fig. 3, a schematic structural diagram of an electronic device according to an embodiment of the present application is shown, where the electronic device may be used to implement the method in the embodiment shown in fig. 1. As shown in fig. 3, the electronic device 300 may include: at least one central processor 301, at least one network interface 304, a user interface 303, a memory 305, at least one communication bus 302.
Wherein the communication bus 302 is used to enable connected communication between these components.
The user interface 303 may include a Display screen (Display), a Camera (Camera), and the optional user interface 303 may further include a standard wired interface, and a wireless interface.
The network interface 304 may optionally include a standard wired interface, a wireless interface (e.g., WI-FI interface), among others.
Wherein the central processor 301 may comprise one or more processing cores. The central processor 301 connects the various parts within the overall electronic device 300 using various interfaces and lines, performs various functions of the terminal 300 and processes data by executing or executing instructions, programs, code sets, or instruction sets stored in the memory 305, and invoking data stored in the memory 305. Alternatively, the central processor 301 may be implemented in at least one hardware form of digital signal processing (Digital Signal Processing, DSP), field programmable gate array (Field-Programmable Gate Array, FPGA), programmable logic array (Programmable Logic Array, PLA). The central processor 301 may integrate one or a combination of several of a central processor (Central Processing Unit, CPU), an image central processor (Graphics Processing Unit, GPU), and a modem, etc. The CPU mainly processes an operating system, a user interface, an application program and the like; the GPU is used for rendering and drawing the content required to be displayed by the display screen; the modem is used to handle wireless communications. It will be appreciated that the modem may not be integrated into the cpu 301 and may be implemented by a single chip.
The memory 305 may include a random access memory (Random Access Memory, RAM) or a Read-only memory (Read-only memory). Optionally, the memory 305 includes a non-transitory computer readable medium (non-transitory computer-readable storage medium). Memory 305 may be used to store instructions, programs, code, sets of codes, or sets of instructions. The memory 305 may include a stored program area and a stored data area, wherein the stored program area may store instructions for implementing an operating system, instructions for at least one function (such as a touch function, a sound playing function, an image playing function, etc.), instructions for implementing the above-described respective method embodiments, etc.; the storage data area may store data or the like referred to in the above respective method embodiments. The memory 305 may also optionally be at least one storage device located remotely from the aforementioned central processor 301. As shown in fig. 3, an operating system, a network communication module, a user interface module, and program instructions may be included in the memory 305, which is a type of computer storage medium.
In the electronic device 300 shown in fig. 3, the user interface 303 is mainly used for providing an input interface for a user, and acquiring data input by the user; and the central processor 301 may be used to invoke a deployment application of the code branching environment stored in the memory 305, and specifically perform the following operations:
when a branch environment deployment instruction is received, pulling a target branch based on a condole, and distributing a branch database for the target branch based on the condole;
constructing a pipeline based on the branch database, and binding the target branch with the branch database;
acquiring an idle branch server and binding the idle branch server with a target branch;
and calling the target branch to initialize the pipeline, and generating deployment completion information.
The present application also provides a computer readable storage medium having stored thereon a computer program which when executed by a processor performs the steps of the above method. The computer readable storage medium may include, among other things, any type of disk including floppy disks, optical disks, DVDs, CD-ROMs, micro-drives, and magneto-optical disks, ROM, RAM, EPROM, EEPROM, DRAM, VRAM, flash memory devices, magnetic or optical cards, nanosystems (including molecular memory ICs), or any type of media or device suitable for storing instructions and/or data.
It should be noted that, for simplicity of description, the foregoing method embodiments are all expressed as a series of action combinations, but it should be understood by those skilled in the art that the present application is not limited by the order of actions described, as some steps may be performed in other order or simultaneously in accordance with the present application. Further, those skilled in the art will also appreciate that the embodiments described in the specification are all preferred embodiments, and that the acts and modules referred to are not necessarily required in the present application.
In the foregoing embodiments, the descriptions of the embodiments are emphasized, and for parts of one embodiment that are not described in detail, reference may be made to related descriptions of other embodiments.
In the several embodiments provided in this application, it should be understood that the disclosed apparatus may be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative, such as the division of the units, merely a logical function division, and there may be additional manners of dividing the actual implementation, such as multiple units or components may be combined or integrated into another system, or some features may be omitted, or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed with each other may be through some service interface, device or unit indirect coupling or communication connection, electrical or otherwise.
The units described as separate units may or may not be physically separate, and units shown as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
In addition, each functional unit in each embodiment of the present application may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit. The integrated units may be implemented in hardware or in software functional units.
The integrated units, if implemented in the form of software functional units and sold or used as stand-alone products, may be stored in a computer readable memory. Based on such understanding, the technical solution of the present application may be embodied in essence or a part contributing to the prior art or all or part of the technical solution in the form of a software product stored in a memory, including several instructions for causing a computer device (which may be a personal computer, a server or a network device, etc.) to perform all or part of the steps of the method described in the embodiments of the present application. And the aforementioned memory includes: a U-disk, a Read-Only Memory (ROM), a random access Memory (Random Access Memory, RAM), a removable hard disk, a magnetic disk, or an optical disk, or other various media capable of storing program codes.
Those of ordinary skill in the art will appreciate that all or a portion of the steps in the various methods of the above embodiments may be performed by hardware associated with a program that is stored in a computer readable memory, which may include: flash disk, read-Only Memory (ROM), random-access Memory (Random Access Memory, RAM), magnetic or optical disk, and the like.
The foregoing is merely exemplary embodiments of the present disclosure and is not intended to limit the scope of the present disclosure. That is, equivalent changes and modifications are contemplated by the teachings of this disclosure, which fall within the scope of the present disclosure. Embodiments of the present disclosure will be readily apparent to those skilled in the art from consideration of the specification and practice of the disclosure herein. This application is intended to cover any adaptations, uses, or adaptations of the disclosure following, in general, the principles of the disclosure and including such departures from the present disclosure as come within known or customary practice within the art to which the disclosure pertains. It is intended that the specification and examples be considered as exemplary only, with a scope and spirit of the disclosure being indicated by the claims.

Claims (10)

1. A method for deploying a code branching environment, the method comprising:
when a branch environment deployment instruction is received, pulling a target branch based on a condole, and distributing a branch database for the target branch based on the condole;
constructing a pipeline based on the branch database, and binding the target branch with the branch database;
acquiring an idle branch server and binding the idle branch server with a target branch;
and calling the target branch to initialize the pipeline, and generating deployment completion information.
2. The method of claim 1, wherein after said building a pipeline based on said branch database, further comprising:
determining a construction result of the pipeline;
when the pipeline is successfully constructed, executing the next step;
and when the pipeline construction fails, ending the deployment task and generating first failure information.
3. The method of claim 1, wherein the invoking the target branch to initialize the pipeline comprises:
and invoking a branch service of the target branch in the pipeline, initializing and issuing the pipeline based on the branch service.
4. The method of claim 3, wherein after the invoking the target branch to initialize the pipeline, further comprising:
determining the release result of the pipeline;
when the pipeline is successfully issued, executing the next step;
and when the release of the pipeline fails, unbinding the target branch with an idle branch server and a branch database respectively, merging the target branch to a main branch, and generating second failure information.
5. The method according to claim 1, wherein the method further comprises:
updating and releasing the pipeline when the code corresponding to the target branch is updated;
and updating the branch database when the corresponding table structure of the branch database has a new field.
6. The method according to claim 1, wherein the method further comprises:
when a development completion instruction corresponding to the target branch is received, closing and destroying the pipeline to stop a service process of branch service in the pipeline;
and respectively unbinding the target branch, the idle branch server and the branch database, and deleting the branch database.
7. The method according to claim 1, wherein the method further comprises:
acquiring a login log of the target branch, and determining the accumulated unregistered days of a user based on the login log;
and when the accumulated unregistered days are greater than a preset number of days, closing and destroying the pipeline, stopping the service process of the branch service in the pipeline, respectively releasing the binding of the target branch, the idle branch server and the branch database, and reserving the branch database.
8. A deployment apparatus of a code branching environment, the apparatus comprising:
the receiving module is used for pulling a target branch based on a onsole when a branch environment deployment instruction is received, and distributing a branch database for the target branch based on the onsole;
the construction module is used for constructing a pipeline based on the branch database and binding the target branch with the branch database;
the binding module is used for acquiring an idle branch server and binding the idle branch server with a target branch;
and the initialization module is used for calling the target branch to initialize the pipeline and generating deployment completion information.
9. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the processor implements the steps of the method according to any of claims 1-7 when the computer program is executed.
10. A computer readable storage medium, on which a computer program is stored, characterized in that the computer program, when being executed by a processor, implements the steps of the method according to any of claims 1-7.
CN202310614830.2A 2023-05-29 2023-05-29 Deployment method and device of code branching environment and electronic equipment Active CN116360800B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310614830.2A CN116360800B (en) 2023-05-29 2023-05-29 Deployment method and device of code branching environment and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310614830.2A CN116360800B (en) 2023-05-29 2023-05-29 Deployment method and device of code branching environment and electronic equipment

Publications (2)

Publication Number Publication Date
CN116360800A true CN116360800A (en) 2023-06-30
CN116360800B CN116360800B (en) 2023-10-13

Family

ID=86922457

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310614830.2A Active CN116360800B (en) 2023-05-29 2023-05-29 Deployment method and device of code branching environment and electronic equipment

Country Status (1)

Country Link
CN (1) CN116360800B (en)

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20190294528A1 (en) * 2018-03-26 2019-09-26 Ca, Inc. Automated software deployment and testing
CN112162931A (en) * 2020-10-29 2021-01-01 京东数字科技控股股份有限公司 Extraction and detection method, system, electronic equipment and storage medium
CN114090189A (en) * 2021-11-29 2022-02-25 浪潮云信息技术股份公司 Construction deployment management method and system based on assembly line
CN114237698A (en) * 2021-12-23 2022-03-25 上海太翼数字健康管理有限公司 Automatic deployment method based on GitLab and Harbor
CN114385212A (en) * 2022-01-13 2022-04-22 中国电子科技集团公司第三十研究所 Micro-service software publishing, upgrading and horizontal expanding method based on construction assembly line
CN114968287A (en) * 2022-06-25 2022-08-30 在线途游(北京)科技有限公司 Method and system for automatically deploying project
CN115098069A (en) * 2022-06-22 2022-09-23 重庆长安汽车股份有限公司 Integrated pipeline establishing method and system, electronic equipment and readable storage medium
CN115344300A (en) * 2022-08-15 2022-11-15 中国电信股份有限公司 Branch pipeline construction method, device, equipment and storage medium
CN115904952A (en) * 2022-11-07 2023-04-04 卫宁健康科技集团股份有限公司 Test environment automatic configuration method, device, equipment and storage medium

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20190294528A1 (en) * 2018-03-26 2019-09-26 Ca, Inc. Automated software deployment and testing
CN112162931A (en) * 2020-10-29 2021-01-01 京东数字科技控股股份有限公司 Extraction and detection method, system, electronic equipment and storage medium
CN114090189A (en) * 2021-11-29 2022-02-25 浪潮云信息技术股份公司 Construction deployment management method and system based on assembly line
CN114237698A (en) * 2021-12-23 2022-03-25 上海太翼数字健康管理有限公司 Automatic deployment method based on GitLab and Harbor
CN114385212A (en) * 2022-01-13 2022-04-22 中国电子科技集团公司第三十研究所 Micro-service software publishing, upgrading and horizontal expanding method based on construction assembly line
CN115098069A (en) * 2022-06-22 2022-09-23 重庆长安汽车股份有限公司 Integrated pipeline establishing method and system, electronic equipment and readable storage medium
CN114968287A (en) * 2022-06-25 2022-08-30 在线途游(北京)科技有限公司 Method and system for automatically deploying project
CN115344300A (en) * 2022-08-15 2022-11-15 中国电信股份有限公司 Branch pipeline construction method, device, equipment and storage medium
CN115904952A (en) * 2022-11-07 2023-04-04 卫宁健康科技集团股份有限公司 Test environment automatic configuration method, device, equipment and storage medium

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
蔡永健;路云菲;邬远祥;唐海涛;: "基于Jenkins和Docker容器技术在数字化电站项目自动化部署的研究及应用", 计算机时代, no. 02, pages 83 - 86 *

Also Published As

Publication number Publication date
CN116360800B (en) 2023-10-13

Similar Documents

Publication Publication Date Title
JP7209034B2 (en) Edge computing test method, apparatus, equipment and readable storage medium
Sampaio et al. Supporting microservice evolution
US9454351B2 (en) Continuous deployment system for software development
US20180101371A1 (en) Deployment manager
US8918783B2 (en) Managing virtual computers simultaneously with static and dynamic dependencies
US9569204B2 (en) End-to-end continuous integration and verification of software
US10656971B2 (en) Agile framework for vertical application development and delivery
US20150100829A1 (en) Method and system for selecting and executing test scripts
US20120159420A1 (en) Quality on Submit Process
US20150100832A1 (en) Method and system for selecting and executing test scripts
CN110096424B (en) Test processing method and device, electronic equipment and storage medium
CN105765534A (en) Virtual computing systems and methods
US20150100830A1 (en) Method and system for selecting and executing test scripts
US10146674B2 (en) Plugin-based software verification system
CN109901985B (en) Distributed test apparatus and method, storage medium, and electronic device
US20150100831A1 (en) Method and system for selecting and executing test scripts
US20100281241A1 (en) Method and system for synchronizing inclusive decision branches
CN115422063A (en) Low-code interface automation system, electronic equipment and storage medium
US9626251B2 (en) Undo configuration transactional compensation
CN114115838A (en) Data interaction method and system based on distributed components and cloud platform
CN110727575B (en) Information processing method, system, device and storage medium
Chen et al. MORE: A model-driven operation service for cloud-based IT systems
US10120744B1 (en) Graph execution system and method for a computing environment
US7836449B2 (en) Extensible infrastructure for task display and launch
WO2011016798A1 (en) Linking model instances to packages

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