CN115878168A - Software development method and device, electronic equipment and storage medium - Google Patents

Software development method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN115878168A
CN115878168A CN202211215194.8A CN202211215194A CN115878168A CN 115878168 A CN115878168 A CN 115878168A CN 202211215194 A CN202211215194 A CN 202211215194A CN 115878168 A CN115878168 A CN 115878168A
Authority
CN
China
Prior art keywords
branch
target
merging
development
temporary
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.)
Pending
Application number
CN202211215194.8A
Other languages
Chinese (zh)
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.)
Shanghai Pudong Development Bank Co Ltd
Original Assignee
Shanghai Pudong Development Bank 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 Shanghai Pudong Development Bank Co Ltd filed Critical Shanghai Pudong Development Bank Co Ltd
Priority to CN202211215194.8A priority Critical patent/CN115878168A/en
Publication of CN115878168A publication Critical patent/CN115878168A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Stored Programmes (AREA)

Abstract

The embodiment of the invention discloses a software development method, a software development device, electronic equipment and a storage medium, wherein the method comprises the following steps: responding to a pulling request of a target branch, and generating a temporary development branch according to the target branch; merging the codes of the source branches into the temporary development branch to obtain a temporary merged development branch; running a target pipeline according to the temporary merging development branch to automatically scan and deploy an online for the temporary merging development branch; and merging the code of the source branch to the target branch under the condition that the target pipeline is determined to run successfully. The technical scheme of the embodiment of the invention can automatically deploy the codes to be online so as to meet the idea proposed by DevOps.

Description

Software development method and device, electronic equipment and storage medium
Technical Field
The embodiment of the invention relates to the technical field of computer software, in particular to a software development method, a software development device, electronic equipment and a storage medium.
Background
In recent years, as the frequency of software release iteration is higher and higher, the traditional waterfall type (Development-survey-release) mode can not meet the requirement of rapid delivery, and DevOps (a collective term of Development and Operations, processes, methods and systems) is produced. Simply speaking, the DevOps is a better process for optimizing development, testing and operation and maintenance, integrates development, operation and maintenance, and enables software to be constructed, tested and released more quickly, frequently and reliably through a highly automated tool and the process.
In modern software development, handling independent branches has become a ubiquitous development process. By having its own branches, a developer can make any changes that are needed without having to worry about how those changes will affect other developers handling their branches. While processing branches is helpful to the work efficiency of a single developer, it also presents new challenges. In some cases, each developer's source branch needs to be merged into one target branch. A "Pull Request" (PR) is used as a mechanism to indicate that changes to one branch are ready to be merged into another branch. Currently, the traditional pull request method is to set rules for allowing merging and pushing on the target branch, and then determine whether merging is allowed when the source branch merges into the target branch.
In the process of implementing the invention, the inventor finds that the prior art has the following defects: although the existing pulling request can meet the development requirements of developers to a certain extent, the automatic code deployment on-line cannot be realized, and the idea proposed by DevOps is difficult to achieve.
Disclosure of Invention
The embodiment of the invention provides a software development method, a software development device, electronic equipment and a storage medium, which can automatically deploy codes on line so as to meet the idea proposed by DevOps.
According to an aspect of the present invention, there is provided a software development method including:
responding to a pulling request of a target branch, and generating a temporary development branch according to the target branch;
merging the codes of the source branches into the temporary development branches to obtain temporary merged development branches;
running a target pipeline according to the temporary merging development branch to automatically scan and deploy an online for the temporary merging development branch;
merging the code of the source branch to the target branch if the target pipeline is determined to run successfully.
According to another aspect of the present invention, there is provided a software development apparatus including:
the temporary development branch generation module is used for responding to a pull request of a target branch and generating a temporary development branch according to the target branch;
the temporary merging development branch generation module is used for merging the codes of the source branches into the temporary development branches to obtain temporary merging development branches;
the target pipeline running module is used for running a target pipeline according to the temporary merging development branch so as to automatically scan and deploy an online for the temporary merging development branch;
and the source branch merging module is used for merging the code of the source branch to the target branch under the condition that the target pipeline is determined to run successfully.
According to another aspect of the present invention, there is provided an electronic apparatus including:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein,
the memory stores a computer program executable by the at least one processor, the computer program being executable by the at least one processor to enable the at least one processor to perform the software development method of any embodiment of the invention.
According to another aspect of the present invention, there is provided a computer-readable storage medium storing computer instructions for causing a processor to implement the software development method according to any one of the embodiments of the present invention when the computer instructions are executed.
The embodiment of the invention responds to the pull request of the target branch, generates the temporary development branch according to the target branch, merges the code of the source branch to the temporary development branch to obtain the temporary merged development branch, further operates the target production line according to the temporary merged development branch to automatically scan and deploy the temporary merged development branch, merges the code of the source branch to the target branch under the condition of determining that the target production line is successfully operated, solves the problem that the code cannot be automatically deployed on the line by the existing pull request, and can automatically deploy the code on the line to meet the idea provided by the DevOps.
It should be understood that the statements in this section do not necessarily identify key or critical features of the embodiments of the present invention, nor do they necessarily limit the scope of the invention. Other features of the present invention will become apparent from the following description.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings required to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the description below are only some embodiments of the present invention, and it is obvious for those skilled in the art that other drawings can be obtained according to the drawings without creative efforts.
Fig. 1 is a flowchart of a software development method according to an embodiment of the present invention;
fig. 2 is a schematic flowchart of a software development method according to an embodiment of the present invention;
fig. 3 is a schematic diagram of a software development apparatus according to a second embodiment of the present invention;
fig. 4 is a schematic structural diagram of an electronic device according to a third embodiment of the present invention.
Detailed Description
In order to make the technical solutions of the present invention better understood, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
It should be noted that the terms "first," "second," and the like in the description and claims of the present invention and in the drawings described above are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the invention described herein are capable of operation in other sequences than those illustrated or described herein. Moreover, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
Example one
Fig. 1 is a flowchart of a software development method according to an embodiment of the present invention, where this embodiment is applicable to a case where codes of a temporary development branch merging source branch created according to a target branch are used to run a target pipeline to implement automatic scanning and deployment of an online pipeline, and the method may be executed by a software development apparatus, where the apparatus may be implemented by software and/or hardware, and may be generally integrated in an electronic device, where the electronic device may be a terminal device or a server device. Accordingly, as shown in fig. 1, the method comprises the following operations:
and S110, responding to the pulling request of the target branch, and generating a temporary development branch according to the target branch.
The target branch may be a branch to be subjected to code change, or may be understood as a branch into which the code change is pulled. The temporary development branch may be generated based on the target branch for merging code of the source branch to automatically run a branch of the pipeline.
In the embodiment of the present invention, after a user creates a pull request for a target branch based on a DevOps system platform (hereinafter referred to as a platform), the platform may generate a temporary development branch according to the target branch. For example, the target branch may be directly copied, resulting in a temporary development branch.
In an optional embodiment of the present invention, the software development method may further include: under the condition that the target branch is determined to be provided with a manual auditing strategy, determining a first target auditor according to the manual auditing strategy; the first target auditor comprises a necessary auditor and an optional auditor; sending the pulling request to the first target auditor for code inspection and audit; determining that the pull request passes the manual review under the condition that the number of reviewers passing the review of the pull request is greater than or equal to the preset number of reviewers; wherein the preset number of reviewers is greater than or equal to the number of required reviewers and less than or equal to the total number of the first target reviewers.
The manual review policy may be a policy for manually reviewing the pull request. The first target auditor can be related personnel for auditing the pull request, the necessary auditor can be related personnel for auditing the pull request, and the optional auditor can be related personnel for optionally auditing the pull request. The preset number of reviewers may be a preset number of people that need to be reviewed by the pull request.
In the related art, pull requests established for target branches typically lack quality governance as well as manual code review audits. In order to solve the problem, in the embodiment of the present invention, when a target branch needs to create a pull request, if the platform detects that the target branch is provided with a manual audit policy, a first target auditor including a necessary auditor and an optional auditor can be determined according to the set manual audit policy, and the pull request is sent to the first target auditor for code inspection and audit, so that the quality of the pull request is controlled in a manual audit manner. If the platform determines that the number of reviewers of which the pull request is audited is greater than or equal to the preset number of reviewers, the pull request can be determined to pass the manual audit. Optionally, the preset number of reviewers may be limited according to the number of the first target reviewers, and specifically may be greater than or equal to the number of necessary reviewers, and less than or equal to the total number of the first target reviewers.
And S120, merging the codes of the source branches into the temporary development branches to obtain temporary merged development branches.
The source branch may be a branch including code change, and a developer may perform code development on the source branch according to development requirements. The temporary merge development branch may be a branch resulting from merging the code of the source branch into the temporary development branch.
And S130, running a target pipeline according to the temporary merging development branch to automatically scan and deploy the temporary merging development branch to be online.
The target pipeline may be a certain type of pipeline, for example, a pipeline type that implements series of operations such as Maven (expert) construction, quality scanning, and deployment online, and may be constructed according to actual development requirements, and the embodiment of the present invention does not limit specific pipeline contents of the target pipeline.
It can be understood that, in the software development process, if the codes of the source branches are directly merged to the target branches and the merged target branches are used to directly perform the construction scan, once the scan fails, the target branches will be contaminated, and at this time, the code needs to be backed off, which results in a complicated software development process and low efficiency. Therefore, before merging the code of the source branch into the target branch, the embodiment of the invention firstly merges the code of the source branch into the temporary development branch, and runs the target pipeline through the temporary merging development branch after obtaining the temporary merging development branch, so as to automatically scan and deploy the online temporary merging development branch. Therefore, the construction scanning can be performed in a preposed manner, and the codes of the source branches are merged to the target branches after the codes of the source branches are confirmed to be correct, so that the target branches are prevented from being polluted by the codes of the source branches.
In an optional embodiment of the present invention, the developing a branch operation target pipeline according to the temporary merging may include: performing regular matching on the target branch through a second regular expression; and under the condition that the target branch is determined to pass through regular matching, running a target pipeline according to the temporary merging development branch.
The second regular expression may be an expression for performing regular matching on the target branch, and may specifically be used to screen out a type of the target branch that needs to operate the target pipeline.
It will be appreciated that some target branch types do not require the target pipeline to be run, and therefore, the target branch may first be regularly matched by a second regular expression before the target pipeline is run from the temporary merge development branch. If the target branch is determined to pass the regular matching, the target branch is indicated to need to run the target pipeline, and the branch running target pipeline can be developed according to the temporary merging. Thus, by adding regular matching screening target branches, a protection strategy can be set for a certain type of branches, and pushing and merging of the branches are allowed.
In an optional embodiment of the present invention, the developing a branch operation target pipeline according to the temporary merging may include: screening out a target branch file from the temporary merging development branch through a first regular matching expression; and operating the target pipeline according to the target branch file.
The first regular matching expression may be an expression for performing regular matching on the temporary merging development branches, and specifically may be used to screen out the types of branch files that need to run the target pipeline from the temporary merging development branches. The target branch file may be a branch file that needs to run the target pipeline in the temporary merge development branch.
It will be appreciated that the temporary merged development branch synthesized from the code of the source branch and the temporary development branch may include a variety of branch files, and that in all branch files, some of the files may require a target pipeline to be run and some of the files may not require a pipeline to be run. Therefore, when the target pipeline is operated according to the temporary merging development branch, the first regular matching expression can be used for performing regular matching on the temporary merging development branch to screen out the target branch file, and the target pipeline is operated only according to the screened target branch file, so that the problem that the development efficiency is reduced due to file misoperation or redundant operation of the pipeline is avoided.
S140, under the condition that the operation of the target pipeline is determined to be successful, merging the code of the source branch into the target branch.
Correspondingly, if the platform determines that the target pipeline runs successfully, it indicates that the code of the source branch has no problem, and at this time, the code of the source branch can be merged into the target branch, and the target branch cannot be polluted by the problem code in the source branch. After the codes of the source branches are merged to the target branches, the temporarily created temporarily developed branches are deleted, and the target pipelines do not need to be operated on the target branches of the merged source branches.
In an optional embodiment of the present invention, before the merging the code of the source branch into the target branch, the method may further include: counting the request merging times of the source branch request merging to the target branch through a third regular expression; under the condition that the request merging times are determined to exceed the set merging times, acquiring a request merging reason file input by a user; and sending the request merging reason file to a second target auditor for auditing.
The third regular expression may be an expression used for performing regular matching on the source branch, and specifically may be used for screening and counting the number of times that the source branch makes the merge request when the source branch makes the merge request, so as to reduce a rule for repeatedly setting and counting the number of times of the merge request. The set merging time may be set according to actual requirements, such as 2, 3, or 5, and the embodiment of the present invention does not limit the specific value of the set merging time. The second target reviewer may be a reviewer for reviewing the request merge reason file for the source branch.
It will be appreciated that for the same named source branch, a developer may submit requests to merge to the target branch multiple times for various reasons. For this situation, in the embodiment of the present invention, the number of times of merging requests from the source branch request to the target branch may be counted through the third regular expression. And if the platform determines that the counted request merging times exceed the set merging times, the platform can require the user to input a request merging reason, generate a request merging reason file, and send the generated request merging reason file to a second target auditor for auditing. The second target auditor can check the request merging reason file in a checking interface of the platform pull request, and the code of the execution source branch can be allowed to be merged to the operation of the target branch only after the checking is passed, so that the developer can utilize the platform to re-execute the software development process.
Optionally, the request merging cause file may be a type such as a mail generated by the platform according to the user input request merging cause, and the embodiment of the present invention does not limit a specific file type of the request merging cause file.
Fig. 2 is a schematic flow chart of a software development method according to an embodiment of the present invention, and in a specific example, an access control pipeline is specifically described as a target pipeline, as shown in fig. 2, the software development method according to the embodiment of the present invention may specifically include the following operations:
when a user creates a pull request on a platform, the user first judges whether a conflict exists in a source branch combined by the pull request, for example, a conflict caused by different developers executing different development operations on the same object of the source branch. If it is determined that no conflict exists, indicating that the source branches can be merged; otherwise, the related item group is notified to resolve the existing conflict.
After the conflict detection passes, the platform may continue to detect the protection rule of the target branch. If it is determined that the target branch sets the manual audit policy, then the required reviewers and the optional reviewers may be sent an email notifying the reviewers of the code review and audit of this pull request. In a manual review, the number of people that pass the review must be the minimum number of reviewers set for the minimum number of reviewers, which is greater than or equal to the number of required reviewers and less than or equal to the total number of reviewers.
Meanwhile, if the platform determines that the target branch is provided with the pipeline access control construction strategy, a temporary branch can be newly built based on the target branch when the pull request is created, and the code of the source branch is merged into the temporary branch. And then, operating an access control assembly line based on the temporary branch, and performing automatic scanning and line-loading deployment operations such as Maven construction, quality scanning and line-loading deployment through the assembly line.
Correspondingly, after the manual auditing strategy and the entrance guard assembly line strategy both pass, the codes of the source branches can be merged into the target branches, and the constructed temporary branches are deleted.
It should be noted that, in the software development process, a multiple-merge approval policy may also be set. If a subsequent developer initiates a merging request for the same source branch for multiple times, the platform can require a user to fill in the reason of multiple merging when detecting the request of merging the source branch of the regular matching to the target branch for multiple times through the regular matching of the source branch of the multiple merging approval strategies, and send the result to a related approver by an email. The approver can audit on the pull request audit interface, and the merged flow can be allowed to be executed only after the audit is passed, namely a temporary branch is newly built based on the target branch, codes of the source branch are merged to the temporary branch, then an access control assembly line is operated based on the temporary branch, and automatic scanning and online operation are executed and deployed through the assembly line. And when both the manual auditing strategy and the access control pipeline strategy pass, merging the codes of the source branches into the target branches, and deleting the constructed temporary branches.
According to the technical scheme, under the background of DevOps full-flow research and development, a protection strategy is set for target branches of pull request combination, and the protection strategy mainly comprises three parts, namely a manual auditing strategy, a pipeline access control construction strategy and a multi-time combination approval strategy. A branch protection rule can be established for each target branch, regular matching can be set for the target branches on the basis of the existing protection strategy, and a certain type of target branch setting protection strategy can be screened through the regular matching to allow pushing and merging of the target branches. The need to set up required reviewers, optional reviewers, and a minimum of reviewers in a manual review policy; the method comprises the steps that pipeline configuration needs to be included in an entrance guard construction pipeline; when the examination and approval strategies are combined for multiple times, an approver needs to be set, and meanwhile, the regular matching can be set for the source branch, so that the protection rule of the branch is formed. That is, the problem of code quality caused by lack of manual code inspection and review based on the DevOps system platform can be solved, and the access control pipeline is triggered to perform automatic quality scanning and deployment online through the pull request.
Therefore, a branch protection strategy is set based on the pulling request operation in the DevOps research and development system, and the pulling request is constructed by combining an integrated production line, so that the function of the pulling request is more perfect, codes can be manually inspected and approved, and the quality is ensured. And automatic deployment and online can be realized, the trouble of manual deployment is saved, and the DevOps research and development system can interact with users more conveniently.
The embodiment of the invention responds to the pull request of the target branch, generates the temporary development branch according to the target branch, merges the code of the source branch to the temporary development branch to obtain the temporary merged development branch, further operates the target production line according to the temporary merged development branch to automatically scan and deploy the temporary merged development branch, merges the code of the source branch to the target branch under the condition of determining that the target production line is successfully operated, solves the problem that the code cannot be automatically deployed on the line by the existing pull request, and can automatically deploy the code on the line to meet the idea provided by the DevOps.
Example two
Fig. 3 is a schematic diagram of a software development apparatus according to a second embodiment of the present invention, and as shown in fig. 3, the apparatus includes: a temporary development branch generation module 210, a temporary merged development branch generation module 220, a target pipeline execution module 230, and a source branch merging module 240, wherein:
a temporary development branch generation module block 210, configured to respond to a pull request of a target branch, and generate a temporary development branch according to the target branch;
a temporary merging development branch generation module block 220, configured to merge a code of a source branch to the temporary development branch to obtain a temporary merging development branch;
a target pipeline running module block 230, configured to run a target pipeline according to the temporary merged development branch, so as to perform automatic scanning and deployment online on the temporary merged development branch;
and a source branch merging module block 240, configured to merge the code of the source branch into the target branch if it is determined that the target pipeline runs successfully.
The embodiment of the invention responds to the pull request of the target branch, generates the temporary development branch according to the target branch, merges the code of the source branch to the temporary development branch to obtain the temporary merged development branch, further operates the target production line according to the temporary merged development branch to automatically scan and deploy the temporary merged development branch, merges the code of the source branch to the target branch under the condition of determining that the target production line is successfully operated, solves the problem that the code cannot be automatically deployed on the line by the existing pull request, and can automatically deploy the code on the line to meet the idea provided by the DevOps.
Optionally, the target pipeline running module 230 is specifically configured to: screening out a target branch file from the temporary merging development branch through a first regular matching expression; and operating the target pipeline according to the target branch file.
Optionally, the software development apparatus further includes a first manual review module, configured to: under the condition that the target branch is determined to be provided with a manual auditing strategy, determining a first target auditor according to the manual auditing strategy; the first target auditor comprises a necessary auditor and an optional auditor; sending the pull request to the first target auditor for code inspection and audit; determining that the pull request passes the manual review under the condition that the number of reviewers passing the review of the pull request is greater than or equal to the preset number of reviewers; wherein the preset number of reviewers is greater than or equal to the number of required reviewers and less than or equal to the total number of the first target reviewers.
Optionally, the target pipeline running module 230 is specifically configured to: performing regular matching on the target branch through a second regular expression; and under the condition that the target branch is determined to pass through regular matching, running a target pipeline according to the temporary merging development branch.
Optionally, the software development apparatus further includes a second manual review module, configured to: counting the request merging times of the source branch request merging to the target branch through a third regular expression; under the condition that the request merging times are determined to exceed the set merging times, acquiring a request merging reason file input by a user; and sending the request combination reason file to a second target auditor for auditing.
The software development device can execute the software development method provided by any embodiment of the invention, and has corresponding functional modules and beneficial effects of the execution method. For technical details that are not described in detail in this embodiment, reference may be made to a software development method provided in any embodiment of the present invention.
Since the software development apparatus described above is an apparatus capable of executing the software development method in the embodiment of the present invention, based on the software development method described in the embodiment of the present invention, a person skilled in the art can understand the specific implementation manner of the software development apparatus in the embodiment and various variations thereof, and therefore, how the software development apparatus implements the software development method in the embodiment of the present invention is not described in detail herein. The device used by those skilled in the art to implement the software development method in the embodiments of the present invention is within the scope of the present application.
EXAMPLE III
FIG. 4 illustrates a block diagram of an electronic device 10 that may be used to implement an embodiment of the invention. Electronic devices are intended to represent various forms of digital computers, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. The electronic device may also represent various forms of mobile devices, such as personal digital assistants, cellular phones, smart phones, wearable devices (e.g., helmets, glasses, watches, etc.), and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are meant to be exemplary only, and are not meant to limit implementations of the inventions described and/or claimed herein.
As shown in fig. 4, the electronic device 10 includes at least one processor 11, and a memory communicatively connected to the at least one processor 11, such as a Read Only Memory (ROM) 12, a Random Access Memory (RAM) 13, and the like, wherein the memory stores a computer program executable by the at least one processor, and the processor 11 can perform various suitable actions and processes according to the computer program stored in the Read Only Memory (ROM) 12 or the computer program loaded from a storage unit 18 into the Random Access Memory (RAM) 13. In the RAM 13, various programs and data necessary for the operation of the electronic apparatus 10 may also be stored. The processor 11, the ROM 12, and the RAM 13 are connected to each other via a bus 14. An input/output (I/O) interface 15 is also connected to bus 14.
A number of components in the electronic device 10 are connected to the I/O interface 15, including: an input unit 16 such as a keyboard, a mouse, or the like; an output unit 17 such as various types of displays, speakers, and the like; a storage unit 18 such as a magnetic disk, an optical disk, or the like; and a communication unit 19 such as a network card, modem, wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information/data with other devices via a computer network such as the internet and/or various telecommunication networks.
The processor 11 may be a variety of general and/or special purpose processing components having processing and computing capabilities. Some examples of processor 11 include, but are not limited to, a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), various dedicated Artificial Intelligence (AI) computing chips, various processors running machine learning model algorithms, a Digital Signal Processor (DSP), and any suitable processor, controller, microcontroller, and so forth. The processor 11 performs the various methods and processes described above, such as a software development method.
In some embodiments, the software development method may be implemented as a computer program tangibly embodied in a computer-readable storage medium, such as storage unit 18. In some embodiments, part or all of the computer program may be loaded and/or installed onto the electronic device 10 via the ROM 12 and/or the communication unit 19. When the computer program is loaded into RAM 13 and executed by processor 11, one or more steps of the software development method described above may be performed. Alternatively, in other embodiments, the processor 11 may be configured to perform the software development method by any other suitable means (e.g., by means of firmware).
Various implementations of the systems and techniques described here above may be implemented in digital electronic circuitry, integrated circuitry, field Programmable Gate Arrays (FPGAs), application Specific Integrated Circuits (ASICs), application Specific Standard Products (ASSPs), system on a chip (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may include: implemented in one or more computer programs that are executable and/or interpretable on a programmable system including at least one programmable processor, which may be special or general purpose, receiving data and instructions from, and transmitting data and instructions to, a storage system, at least one input device, and at least one output device.
A computer program for implementing the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general purpose computer, special purpose computer, or other programmable data processing apparatus, such that the computer programs, when executed by the processor, cause the functions/acts specified in the flowchart and/or block diagram block or blocks to be performed. A computer program can execute entirely on a machine, partly on a machine, as a stand-alone software package partly on a machine and partly on a remote machine or entirely on a remote machine or server.
In the context of the present invention, a computer-readable storage medium may be a tangible medium that can contain, or store a computer program for use by or in connection with an instruction execution system, apparatus, or device. A computer readable storage medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. Alternatively, the computer readable storage medium may be a machine readable signal medium. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, 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), an optical fiber, a compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
To provide for interaction with a user, the systems and techniques described here can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to a user; and a keyboard and a pointing device (e.g., a mouse or a trackball) by which a user can provide input to the electronic device. Other kinds of devices may also be used to provide for interaction with a user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form, including acoustic, speech, or tactile input.
The systems and techniques described here can be implemented in a computing system that includes a back-end component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front-end component (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such back-end, middleware, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: local Area Networks (LANs), wide Area Networks (WANs), blockchain networks, and the internet.
The computing system may include clients and servers. A client and server are generally remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other. The server can be a cloud server, also called a cloud computing server or a cloud host, and is a host product in a cloud computing service system, so that the defects of high management difficulty and weak service expansibility in the traditional physical host and VPS service are overcome.

Claims (10)

1. A software development method, comprising:
responding to a pulling request of a target branch, and generating a temporary development branch according to the target branch;
merging the codes of the source branches into the temporary development branches to obtain temporary merged development branches;
running a target pipeline according to the temporary merging development branch to automatically scan and deploy an online for the temporary merging development branch;
merging the code of the source branch to the target branch if the target pipeline is determined to run successfully.
2. The method of claim 1, wherein the running the target pipeline according to the temporary merge development branch comprises:
screening out a target branch file from the temporary merging development branch through a first regular matching expression;
and operating the target pipeline according to the target branch file.
3. The method of claim 1, further comprising:
under the condition that the target branch is determined to be provided with a manual auditing strategy, determining a first target auditor according to the manual auditing strategy; the first target auditor comprises a necessary auditor and an optional auditor;
sending the pulling request to the first target auditor for code inspection and audit;
determining that the pull request passes the manual review under the condition that the number of reviewers passing the review of the pull request is greater than or equal to the preset number of reviewers;
wherein the preset number of reviewers is greater than or equal to the number of required reviewers and less than or equal to the total number of the first target reviewers.
4. The method of claim 1, wherein the running the target pipeline according to the temporary merge development branch comprises:
carrying out regular matching on the target branch through a second regular expression;
and under the condition that the target branch is determined to pass through regular matching, running a target pipeline according to the temporary merging development branch.
5. The method of claim 1, further comprising, prior to said merging the code of the source branch into the target branch:
counting the request merging times of the source branch request merging to the target branch through a third regular expression;
under the condition that the request merging times are determined to exceed the set merging times, acquiring a request merging reason file input by a user;
and sending the request combination reason file to a second target auditor for auditing.
6. A software development apparatus, comprising:
the temporary development branch generation module is used for responding to a pull request of a target branch and generating a temporary development branch according to the target branch;
the temporary merging development branch generation module is used for merging the codes of the source branches into the temporary development branches to obtain temporary merging development branches;
the target pipeline running module is used for running a target pipeline according to the temporary merging development branch so as to automatically scan and deploy an online for the temporary merging development branch;
and the source branch merging module is used for merging the code of the source branch to the target branch under the condition that the target pipeline is determined to run successfully.
7. The apparatus of claim 6, wherein the target pipeline execution module is specifically configured to:
screening out a target branch file from the temporary merging development branch through a first regular matching expression;
and operating the target pipeline according to the target branch file.
8. The apparatus of claim 6, further comprising a first manual review module configured to:
under the condition that the target branch is determined to be provided with a manual auditing strategy, determining a first target auditor according to the manual auditing strategy; the first target auditor comprises a necessary auditor and an optional auditor;
sending the pull request to the first target auditor for code inspection and audit;
determining that the pull request passes the manual review under the condition that the number of reviewers passing the review of the pull request is greater than or equal to the preset number of reviewers;
wherein the preset number of reviewers is greater than or equal to the number of required reviewers and less than or equal to the total number of the first target reviewers.
9. An electronic device, characterized in that the electronic device comprises:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein,
the memory stores a computer program executable by the at least one processor to enable the at least one processor to perform the software development method of any one of claims 1-5.
10. A computer storage medium having stored thereon computer instructions for causing a processor to perform the software development method of any one of claims 1-5 when executed.
CN202211215194.8A 2022-09-30 2022-09-30 Software development method and device, electronic equipment and storage medium Pending CN115878168A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211215194.8A CN115878168A (en) 2022-09-30 2022-09-30 Software development method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211215194.8A CN115878168A (en) 2022-09-30 2022-09-30 Software development method and device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN115878168A true CN115878168A (en) 2023-03-31

Family

ID=85770258

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211215194.8A Pending CN115878168A (en) 2022-09-30 2022-09-30 Software development method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN115878168A (en)

Similar Documents

Publication Publication Date Title
KR20210040861A (en) Fault prediction method, apparatus, electronic device and storage medium
CN114911492A (en) Inference service deployment method, device, equipment and storage medium
CN114116288A (en) Fault processing method, device and computer program product
CN115878168A (en) Software development method and device, electronic equipment and storage medium
CN116301978A (en) System upgrading method, device, equipment and storage medium
CN114693116A (en) Method and device for detecting code review validity and electronic equipment
CN115080382A (en) Code testing method, device, equipment and medium
CN115826955A (en) Application publishing method, system, electronic device and storage medium
CN116384960A (en) Operation ticket generation method, device, equipment and storage medium
CN115310096A (en) Security vulnerability processing method, device, equipment and medium
CN115757097A (en) Test case generation method and device, electronic equipment and storage medium
CN114327577A (en) Code change determining method and device, electronic equipment and storage medium
CN116414703A (en) Code quality control method and device, electronic equipment and storage medium
CN115374010A (en) Function testing method, device, equipment and storage medium
CN117667192A (en) Sustained delivery method, device, equipment and storage medium based on Devops
CN114416569A (en) Code change information generation method and device, electronic equipment and storage medium
CN115599682A (en) Environment availability detection method, device, equipment and storage medium
CN115827295A (en) Cloud desktop component fault processing method and device
CN114693115A (en) Method and device for detecting code review validity and electronic equipment
CN115794623A (en) Batch task processing method and device, electronic equipment and storage medium
CN115794459A (en) Flash-back processing method, device, equipment and storage medium of native application program
CN114416164A (en) Software release method and device, electronic equipment and storage medium
CN116820727A (en) Task processing method and device, electronic equipment and storage medium
CN115495382A (en) Automatic test system, automatic test method, automatic test equipment and storage medium
CN118674546A (en) Data processing method, device, electronic equipment and storage medium

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