CN105893035A - Distributed code management method and system - Google Patents
Distributed code management method and system Download PDFInfo
- Publication number
- CN105893035A CN105893035A CN201610191488.XA CN201610191488A CN105893035A CN 105893035 A CN105893035 A CN 105893035A CN 201610191488 A CN201610191488 A CN 201610191488A CN 105893035 A CN105893035 A CN 105893035A
- Authority
- CN
- China
- Prior art keywords
- code
- server
- branch
- distributed
- permission
- 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
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/70—Software maintenance or management
Abstract
The invention relates to the field of code compiling and discloses a distributed code management method and system. The method comprises the steps that a permission server which can operate each code server is deployed; multiple code branches are established through the permission server, wherein each code branch corresponds to one code server; the permission server sends the established code branches to the code servers correspondingly to achieve code synchronization. According to the technical scheme, the permission server is deployed to operate each code server, the code branches corresponding to the code servers are established and sent to the code servers through the permission server, code synchronization can be achieved, and flexible code management can be achieved.
Description
Technical field
The present invention relates to code compilation field, in particular it relates to a kind of distributed code management method and be
System.
Background technology
Code inspection can be realized by Gerrit software.Gerrit is a kind of free, open source code
Code inspection software, uses web interface.Utilize web browser, the software programmer of same team,
Can mutually check the most amended program code, decide whether to submit to, return or continue to repair
Change.It uses Git as bottom version control system.Code inspection is also referred to as Code Review, refers to pass through
Reading code checks source code and the accordance of coding standard and the activity of code quality.
The code in usual each application or two side storehouses will include master (leading), develop (exploitation),
Release (issue), hotfix (Hotfix), feature (feature) branch, wherein:
Dou Shi main split of master and develop branch, main split is the core branch of all development activities.
The output that all of development activities produces the most all can reflect in the code of main split.
Deposit in master branch should be the code being available at any time in production environment disposing.Work as exploitation
Activity comes to an end, and creates a new when being available for the code disposed, the code meeting in master branch
It is updated., update each time meanwhile, have version number's label (TAG) of correspondence.
Develop branch is the branch preserving current recent development achievement.The generally code in this branch
Also it is the code (Nightly build) that can carry out issue at night every day.Therefore this branch sometimes can also
It is referred to as " integrated branch (integration branch) ".
When the code in develop branch has been achieved with all of function in software requirements specification, pass through
After all of test, and when code is the most sufficiently stable, it is possible to all of development merged
Go back to master branch.For the new code suggestion submitted in master branch all stamp one new
Version number's label (TAG), for suceeding generation code tracking.
Release branch is for issuing new product version and to design.Code in this branch allows
Do little defect correction, prepare every descriptive information needed for released version (version number, issuing time,
Compilation time etc.).Develop branch can be allowed empty by carrying out these work in release branch
Not busy out to accept the code submission in new feature (feature) branch, enter new software development repeatedly
For the cycle.
Planned to comprise in the code in develop branch has contained all versions that will issue
Software function, and by all test time, it is possible to consider prepare create release branch.
And all business demands outside the version currently will issued must guarantee to mix release
(avoid thus introducing some uncontrollable system defects) within branch.
Successfully derive from release branch, and after being endowed version number, develop branch is the most permissible
Service for " next version ".So-called " next version " is at the version currently will issued
The version issued afterwards.The name of version number can be carried out according to version number's naming rule of project definition.
In addition to establishment outside the plan, hotfix branch is quite similar with release branch: can
Produce a new software version being available in production environment deployment.When the software in production environment encounters
Abnormal conditions or be found that serious to the software defect that must repair immediately when, it is necessary to from
The TAG version specified in master branch derives from hotfix branch to organize the emergency repair of code to work.
In prior art, the code of unexamined is stored on the server fixed, for the operation of code
(such as examining) needs to carry out on specific server.When code being operated, need to log in
Server or by download by the way of obtain code, complex operation, very flexible from server.
For above-mentioned technical problem, prior art there is no good solution.
Summary of the invention
It is an object of the invention to provide a kind of method and system, the method and system are capable of generation flexibly
Code management.
To achieve these goals, the present invention provides a kind of distributed code management method, and the method includes:
Dispose permission server, enable described permission server that each in multiple code servers to be carried out
Operation;Creating multiple code branches by described permission server, each code branch is corresponding to described many
A code server in individual code server;And multiple generations that described permission server will be created
Code division is propped up correspondence and is sent to the plurality of code server, it is achieved code synchronisation.
Further, the method includes: arrange web system on described permission server;And pass through
The interface of described web system is that user distributes authority.
Further, the method includes: create the plurality of code branch by described web system, its
Described in web system provide web operate interface.
Further, the method includes: described permission server will be created by Secure Shell SSH
Multiple code branches correspondence be sent to the plurality of code server.
Further, described code branch includes at least one of person: main split, exploitation branch, send out
Cloth branch, Hotfix branch, feature branch.
Further, described permission server has the generation of default access in being the plurality of code server
Code server.
Another aspect of the present invention, it is provided that a kind of distributed code management system, this system includes:
The permission server communicated and code server, wherein said code server is configured to perform code
Examine;And described permission server is configured to: each code operating in multiple code server
Server;Creating multiple code branch, each code branch is corresponding in the plurality of code server
One code server;And the multiple code branches correspondence created is sent to the plurality of code clothes
Business device, it is achieved code synchronisation.
Further, described permission server is provided with web system;And by described web system
The interface of system is that user distributes authority.
Further, described permission server is configured to: create the plurality of by described web system
Code branch, wherein said web system provides web to operate interface.
Further, described permission server is configured to: will be created by Secure Shell SSH
Multiple code branches correspondence is sent to the plurality of code server.
Further, described code branch includes at least one of person: main split, exploitation branch, send out
Cloth branch, Hotfix branch, feature branch.
Further, described permission server has the generation of default access in being the plurality of code server
Code server.
By technique scheme, by disposing permission server to each in multiple code servers
Operate, created and send the multiple codes corresponding to code server by permission server and be branched off into
Code server, it is possible to achieve code synchronisation is capable of code administration flexibly.
Other features and advantages of the present invention will be described in detail in detailed description of the invention part subsequently.
Accompanying drawing explanation
Accompanying drawing is used to provide a further understanding of the present invention, and constitutes the part of description, with
Detailed description below is used for explaining the present invention together, but is not intended that limitation of the present invention.?
In accompanying drawing:
Fig. 1 is the distributed code management method flow chart that embodiment of the present invention provides;And
Fig. 2 is the distributed code management system structure schematic diagram that embodiment of the present invention provides.
Detailed description of the invention
Below in conjunction with accompanying drawing, the detailed description of the invention of the present invention is described in detail.It should be appreciated that
Detailed description of the invention described herein is merely to illustrate and explains the present invention, is not limited to this
Bright.
Fig. 1 is the distributed code management method flow chart that embodiment of the present invention provides.As it is shown in figure 1,
The distributed code management method that the present invention provides, the method may comprise steps of:
Step 101: dispose permission server, enable described permission server to multiple code servers
In each operate;
In embodiments, the permission server of deployment can the newly-built or server of new clothes, and to service
Device carries out authority configuration, makes this server have the ability being operable to code server, for instance, it is possible to
Code is sent so that code server performs code inspection to code to code server;Or take to code
Business device sends instruction, and the instruction code server code to storing wherein performs code inspection.In difference
Embodiment in, can be separately provided or dispose permission server, it is also possible to by code server
One is set to permission server.In the such embodiment of the latter, there are the code clothes of specified permission
Business device in addition to there is code inspection function, it is also possible to other code servers are operated, with to
Other code servers send unexamined code or send instruction code server to other code servers
The code stored wherein is performed code inspection.
Step 102: create multiple code branches by described permission server, each code branch is corresponding
A code server in the plurality of code server;
In embodiments, can be according to requirements or according to the disposal ability of different code server
Create code branch.In various embodiments, can be according to the code word of storage in code server
Type is that code server creates branch.In embodiments, the code branch that can create includes but does not limits
In code below branch pattern:
Main split, exploitation branch, issue branch, Hotfix branch, feature branch.
Step 103: the multiple code branches correspondence created is sent to described many by described permission server
Individual code server, it is achieved code synchronisation.
After creating code branch, permission server can pass through network (such as, cable network or
Wireless network) the code branch correspondence of establishment is sent to code server.Those skilled in the art are permissible
Understanding, the multiple code servers communicated with permission server are not likely to be that to be positioned at same machine room internal logical
Cross the code server cluster that LAN connects, and be probably the distributed code clothes being scattered in all over the world
Business device.In order to ensure the safety of communication, in alternative embodiments, permission server can pass through,
Such as, authentication based on key sends code branch.In alternative embodiments, described
The multiple code branches correspondence created can be sent to institute by Secure Shell SSH by permission server
State multiple code server.SSH is the abbreviation of Secure Shell (Secure Shell), by the net of IETF
Network work group (Network Working Group) is formulated;SSH is for setting up in application layer and transmission
Security protocol on the basis of Ceng.SSH is the most relatively reliable, aims at telnet session and other networks take
Business provides the agreement of safety.SSH agreement is utilized can effectively to prevent the information in remote management procedures
Leakage problem.In other optional embodiments, between permission server and the code server of distribution
Can have secure tunnel, to realize secure communication each other.
In embodiments, permission server can provide user operation interface by the system preset
And systemic-function (such as, login feature based on username and password).Said method may include that
Described permission server arranges web system;And by the interface of described web system for using
Person distributes authority.Web system can have a following key component: web front end system,
SiteServer LBS, data base cluster system, caching system, distributed memory system, Distributed Services
Device management system, code distribution system etc..
Correspondingly, according to web system, said method be may include that and created by described web system
The plurality of code branch, wherein said web system provides web to operate interface.Web is utilized to operate
Interface, it is possible to achieve the such as operation such as user login.
Fig. 2 is the distributed code management system structure schematic diagram that embodiment of the present invention provides.Such as Fig. 2
Shown in, embodiments of the present invention provide a kind of distributed code management system, and this system includes: phase
The permission server 201 of communication and code server 202, wherein said code server 202 is configured
Become to perform code inspection (such as, being provided with Gerrit software in code server 202);And it is described
Permission server 201 is configured to: operate each code server in multiple code server 202
202;Creating multiple code branch, each code branch is corresponding in the plurality of code server 202
A code server 202;And the multiple code branches correspondence created is sent to the plurality of
Code server 202, it is achieved code synchronisation.
In embodiments, the permission server 201 of deployment can the newly-built or server of new clothes, and right
Server carries out authority configuration, makes this server have an ability being operable to code server, such as,
Code can be sent so that code server 202 performs code inspection to code to code server 202;
Or send instruction to code server 202, indicate the code server 202 code to storing wherein
Perform code inspection.In various embodiments, can be separately provided or dispose permission server 201,
In code server 202 one can also be set to permission server 201.
Permission server 201 can be single computer, it is also possible to be deployed in machine room computer (or
Server) cluster.After creating code branch, permission server 201 can pass through network (example
As, cable network or wireless network) the code branch correspondence of establishment is sent to code server 202.
It will be understood by those skilled in the art that the multiple code servers 202 communicated with permission server 201
It is not likely to be and is positioned at the internal code service connected by the LAN of switch of same machine room as shown in Figure 2
Device 202 cluster, and be probably and be scattered in the distributed code server connected by network all over the world
202.In order to ensure the safety of communication, in alternative embodiments, permission server 201 is permissible
Passing through, such as, authentication based on key sends code branch.
In embodiments, described permission server 201 can be provided with web system;And pass through
The interface of described web system is that user distributes authority.
In embodiments, described permission server 201 may be configured to: by described web system
Creating the plurality of code branch, wherein said web system provides web to operate interface.Preferably
In embodiment, described permission server 201 may be configured to: by Secure Shell SSH by institute
The multiple code branches correspondence created is sent to the plurality of code server 202.
In embodiments, can be according to requirements or according to the process of different code server 202
Ability creates code branch.In various embodiments, can store according in code server 202
Type of code be that code server 202 creates branch.In embodiments, the code that can create divides
Prop up and include but not limited to code below branch pattern:
Main split, exploitation branch, issue branch, Hotfix branch, feature branch.
By technique scheme, by disposing permission server to each in multiple code servers
Operate, created and send the multiple codes corresponding to code server by permission server and be branched off into
Code server, it is possible to achieve code synchronisation is capable of code administration flexibly.
The preferred embodiment of the present invention is described in detail above in association with accompanying drawing, but, the present invention does not limit
Detail in above-mentioned embodiment, in the technology concept of the present invention, can be to the present invention
Technical scheme carry out multiple simple variant, these simple variant belong to protection scope of the present invention.Example
As, code branch can be changed into examination branch.
It is further to note that each the concrete technology described in above-mentioned detailed description of the invention is special
Levy, in the case of reconcilable, can be combined by any suitable means.In order to avoid need not
The repetition wanted, various possible compound modes are illustrated by the present invention the most separately.
Additionally, combination in any can also be carried out between the various different embodiment of the present invention, as long as its
Without prejudice to the thought of the present invention, it should be considered as content disclosed in this invention equally.
Claims (12)
1. a distributed code management method, it is characterised in that the method includes:
Dispose permission server, enable described permission server to each in multiple code servers
Operate;
Creating multiple code branches by described permission server, each code branch is corresponding to the plurality of
A code server in code server;And
The multiple code branches correspondence created is sent to the plurality of code clothes by described permission server
Business device, it is achieved code synchronisation.
Distributed code management method the most according to claim 1, it is characterised in that the method
Including:
Described permission server arranges web system;And
It is that user distributes authority by the interface of described web system.
Distributed code management method the most according to claim 2, it is characterised in that the method
Including:
Creating the plurality of code branch by described web system, wherein said web system provides web
Operation interface.
Distributed code management method the most according to claim 1, it is characterised in that the method
Including:
The multiple code branches correspondence created is sent by described permission server by Secure Shell SSH
To the plurality of code server.
Distributed code management method the most according to claim 1, it is characterised in that described generation
Code division is propped up and is included at least one of person:
Main split, exploitation branch, issue branch, Hotfix branch, feature branch.
Distributed code management method the most according to claim 1, it is characterised in that described power
Limit server is the code server in the plurality of code server with default access.
7. a distributed code management system, it is characterised in that this system includes:
The permission server communicated and code server, wherein
Described code server is configured to perform code inspection;And
Described permission server is configured to:
Operate each code server in multiple code server;
Creating multiple code branch, each code branch is corresponding in the plurality of code server
Code server;And
The multiple code branches correspondence created is sent to the plurality of code server, it is achieved code is same
Step.
Distributed code the most according to claim 7 management system, it is characterised in that:
It is provided with web system on described permission server;And
It is that user distributes authority by the interface of described web system.
Distributed code the most according to claim 8 management system, it is characterised in that described power
Limit server is configured to:
Creating the plurality of code branch by described web system, wherein said web system provides web
Operation interface.
Distributed code management method the most according to claim 7, it is characterised in that described power
Limit server is configured to:
By Secure Shell SSH, the multiple code branches correspondence created is sent to the plurality of code
Server.
11. distributed code according to claim 7 management systems, it is characterised in that described generation
Code division is propped up and is included at least one of person:
Main split, exploitation branch, issue branch, Hotfix branch, feature branch.
12. distributed code according to claim 7 management systems, it is characterised in that described power
Limit server is the code server in the plurality of code server with default access.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610191488.XA CN105893035A (en) | 2016-03-30 | 2016-03-30 | Distributed code management method and system |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610191488.XA CN105893035A (en) | 2016-03-30 | 2016-03-30 | Distributed code management method and system |
Publications (1)
Publication Number | Publication Date |
---|---|
CN105893035A true CN105893035A (en) | 2016-08-24 |
Family
ID=57014004
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201610191488.XA Pending CN105893035A (en) | 2016-03-30 | 2016-03-30 | Distributed code management method and system |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN105893035A (en) |
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107797813A (en) * | 2017-10-13 | 2018-03-13 | 福建天泉教育科技有限公司 | A kind of software agile development method and system |
CN108062232A (en) * | 2017-12-14 | 2018-05-22 | 上海钢联电子商务股份有限公司 | A kind of system and method for automatically creating branch |
CN108319551A (en) * | 2017-12-29 | 2018-07-24 | 五八有限公司 | A kind of test method of software, device, computer equipment and readable storage medium storing program for executing |
CN108415694A (en) * | 2018-02-28 | 2018-08-17 | 山东汇贸电子口岸有限公司 | A kind of Android agile development system and methods based on GitFlow workflows |
CN111125743A (en) * | 2018-10-31 | 2020-05-08 | 上海哔哩哔哩科技有限公司 | Authority management method, system, computer device and computer readable storage medium |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103019772A (en) * | 2012-11-23 | 2013-04-03 | 东方网力科技股份有限公司 | Automatic compilation method and system in software development |
CN103226485A (en) * | 2013-05-21 | 2013-07-31 | 北京奇虎科技有限公司 | Code publishing method, machine and system |
CN104881285A (en) * | 2015-05-25 | 2015-09-02 | 北京理工大学 | Code snippet marking and reusing system based on body |
CN105404519A (en) * | 2015-12-07 | 2016-03-16 | 青岛海信电器股份有限公司 | Version control method, code testing method and system |
-
2016
- 2016-03-30 CN CN201610191488.XA patent/CN105893035A/en active Pending
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103019772A (en) * | 2012-11-23 | 2013-04-03 | 东方网力科技股份有限公司 | Automatic compilation method and system in software development |
CN103226485A (en) * | 2013-05-21 | 2013-07-31 | 北京奇虎科技有限公司 | Code publishing method, machine and system |
CN104881285A (en) * | 2015-05-25 | 2015-09-02 | 北京理工大学 | Code snippet marking and reusing system based on body |
CN105404519A (en) * | 2015-12-07 | 2016-03-16 | 青岛海信电器股份有限公司 | Version control method, code testing method and system |
Cited By (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107797813A (en) * | 2017-10-13 | 2018-03-13 | 福建天泉教育科技有限公司 | A kind of software agile development method and system |
CN108062232A (en) * | 2017-12-14 | 2018-05-22 | 上海钢联电子商务股份有限公司 | A kind of system and method for automatically creating branch |
CN108319551A (en) * | 2017-12-29 | 2018-07-24 | 五八有限公司 | A kind of test method of software, device, computer equipment and readable storage medium storing program for executing |
CN108319551B (en) * | 2017-12-29 | 2021-12-17 | 五八有限公司 | Software testing method and device, computer equipment and readable storage medium |
CN108415694A (en) * | 2018-02-28 | 2018-08-17 | 山东汇贸电子口岸有限公司 | A kind of Android agile development system and methods based on GitFlow workflows |
CN111125743A (en) * | 2018-10-31 | 2020-05-08 | 上海哔哩哔哩科技有限公司 | Authority management method, system, computer device and computer readable storage medium |
CN111125743B (en) * | 2018-10-31 | 2022-02-08 | 上海哔哩哔哩科技有限公司 | Authority management method, system, computer device and computer readable storage medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN105893035A (en) | Distributed code management method and system | |
CN100385855C (en) | System and its method for central remote automatic upgrading software | |
CN101325509B (en) | Method, system and apparatus for installing software component | |
CN106227605B (en) | A kind of the dynamic micro services expansion method and device of multilingual cloud compiling | |
CN109634612A (en) | Continuous integrating method, system, computer equipment and storage medium | |
CN105740019A (en) | Automatic upgrading and releasing system and method for application software in distributed network environment | |
CN108737092A (en) | Mobile terminal administration server, mobile terminal, business cloud platform and application system | |
CN102223736A (en) | Server for communicating with multi-mode devices using multi-mode applications | |
CN105824625A (en) | Business application construction device and method based on cloud environment | |
CN110138876A (en) | Task deployment method, apparatus, equipment and platform | |
CN113938321B (en) | Extensible operation and maintenance management system, method, electronic equipment and readable storage medium | |
CN102622550B (en) | Safe online patch check system facing terminal computers | |
CN112416936B (en) | DCS background multi-node cooperative configuration mark name verification method | |
CN104320442B (en) | Application system presentation layer integrated technology plateform system and method | |
CN101420787B (en) | Device for communicating in multiple modes using multi-mode applications | |
CN111147429B (en) | Project research and development environment deployment system | |
CN101414260B (en) | System and method for creating multi-mode applications | |
CN104636161B (en) | The online patch method and system of a kind of multiple nucleus system | |
CN107203594A (en) | A kind of data processing equipment, method and computer-readable recording medium | |
CN113438287A (en) | Block chain deployment system and method | |
CN101630334A (en) | Data-updating method in distributed system | |
KR101045346B1 (en) | Distributed transaction system having automatic geneation part for interface and method therefor | |
KR102441351B1 (en) | Terminal device and method for management of the same | |
CN116226064B (en) | Method, system, terminal and storage medium for sharing operation and maintenance data of power grid | |
WO2023157204A1 (en) | Configuration inputting device, configuration inputting method and configuration inputting program |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
WD01 | Invention patent application deemed withdrawn after publication | ||
WD01 | Invention patent application deemed withdrawn after publication |
Application publication date: 20160824 |