[go: up one dir, main page]
More Web Proxy on the site http://driver.im/

CN110489158A - Method, apparatus, medium and the electronic equipment that code hosted platform is optimized - Google Patents

Method, apparatus, medium and the electronic equipment that code hosted platform is optimized Download PDF

Info

Publication number
CN110489158A
CN110489158A CN201910708233.XA CN201910708233A CN110489158A CN 110489158 A CN110489158 A CN 110489158A CN 201910708233 A CN201910708233 A CN 201910708233A CN 110489158 A CN110489158 A CN 110489158A
Authority
CN
China
Prior art keywords
gogs
code
unit
code hosting
cluster
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
CN201910708233.XA
Other languages
Chinese (zh)
Other versions
CN110489158B (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.)
Beijing ByteDance Network Technology Co Ltd
Original Assignee
Beijing ByteDance Network 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 Beijing ByteDance Network Technology Co Ltd filed Critical Beijing ByteDance Network Technology Co Ltd
Priority to CN201910708233.XA priority Critical patent/CN110489158B/en
Publication of CN110489158A publication Critical patent/CN110489158A/en
Application granted granted Critical
Publication of CN110489158B publication Critical patent/CN110489158B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/71Version control; Configuration management
    • 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

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Devices For Executing Special Programs (AREA)
  • Stored Programmes (AREA)

Abstract

Method, apparatus, medium and the electronic equipment optimized the present invention provides a kind of pair of code hosted platform, the optimization method includes: the first level that Gitlab code trustship unit is code hosted platform to be arranged, and the Gogs code trustship unit of setting cluster is the second level under the first level;The local project of active user is configured by the Gogs code trustship unit of cluster, obtains corresponding configuration information;Configuration information is written in corresponding project directory.The present invention devises completely new code hosted platform, the Gogs code trustship unit by several Gogs code trustship subelement clusters is provided between Gitlab code trustship unit and each project, and it is directly interactive with two or three of projects by each Gogs code trustship subelement, in this way, not only increase the efficiency of code hosted platform business processing, the problem of also improving the stability of code hosted platform, avoiding the occurrence of the paralysis of code hosted platform.

Description

Method, device, medium and electronic equipment for optimizing code hosting platform
Technical Field
The invention relates to the technical field of computers, in particular to a method, a device, a medium and electronic equipment for optimizing a code hosting platform.
Background
With the rapid development of company business, the code amount of company projects is also expanding at a high speed. With the continuous increase of the code warehouses, the codes of each code warehouse are expanded, and the code hosting platform adopted by the company, namely Gitlab, is overwhelmed, so that the performance is gradually deteriorated.
Due to the performance deterioration of the existing Gitlab hosting platform, the following problems can be caused:
problem 1: the page of the Gitlab code hosting platform is opened slowly, and the efficiency of code auditing and code merging is influenced.
Problem 2: the Gitlab code hosting platform is paralyzed, so that the webpage cannot be opened, and code verification and code combination cannot be normally carried out.
Problem 3: the high-speed development of services depends on the quick realization of requirements, and the efficiency problem and the stability problem caused by the performance deterioration of the Gitlab are unacceptable.
Therefore, in long-term research and development, the inventor has conducted a great deal of research and development on how to optimize the code hosting platform, and proposes a method for optimizing the code hosting platform to solve one of the above technical problems.
Disclosure of Invention
The present invention is directed to a method, an apparatus, a medium, and an electronic device for optimizing a code hosting platform, which can solve at least one of the above-mentioned technical problems. The specific scheme is as follows:
according to a specific implementation manner of the present invention, in a first aspect, the present invention provides a method for optimizing a code hosting platform, including:
setting a Gitlab code hosting unit as a first level of a code hosting platform, and setting a Gogs code hosting unit of a cluster as a second level below the first level;
configuring a local project of a current user through a Gogs code hosting unit of the cluster to obtain corresponding configuration information;
and writing the configuration information into the corresponding item directory.
Optionally, the configuring, by the gos code hosting unit of the cluster, a local item of a current user includes:
distributing the local items of the current user to corresponding Gogs code hosting subunits under the Gogs cluster according to preset classification rules;
according to a preset Git command, the local item and the remote Gogs warehouse address of the Gogs code hosting subunit establish an association relationship;
and acquiring the incidence relation, and configuring the local project through the Gogs code support pipe unit based on the incidence relation.
Optionally, after the configuration information is written into the corresponding item directory, the method further includes:
and acquiring various data in the project catalog, and synchronizing the various data to a database of the Gitlab code hosting unit.
Optionally, the configuration information at least includes:
the method comprises the steps of local project attribute information of a current user, Gogs code hosting pipe unit information under a Gogs cluster corresponding to a local project, remote Gogs warehouse address information of a Gogs code hosting subunit and code warehouse information corresponding to the local project.
Optionally, the method further includes:
and reading the code warehouse information, and downloading the corresponding codes from the code warehouse based on the code warehouse information.
Optionally, the method further includes:
and configuring the items to be added through the Gogs code hosting unit of the cluster to obtain corresponding configuration information.
Optionally, configuring, by the gos code hosting unit of the cluster, the item to be added, and obtaining the corresponding configuration information includes:
determining Gogs services corresponding to the items to be added according to preset mapping rules of the items and the Gogs services;
according to the determined Gogs service, the item to be added is distributed to a specified Gogs code hosting subunit;
and configuring the items to be added through the Gogs code support pipe unit corresponding to the items to be added to obtain configuration information of the items to be added.
Optionally, before determining, according to the preset mapping rule between the project and the gos service, the gos service corresponding to the project to be added, the method further includes:
acquiring associated information associated with the item to be added;
wherein the associated information at least comprises: the attribute information of the item to be added, the service type information corresponding to each Gogs code hosting unit of the cluster, and the preset mapping rule information of the item and the Gogs service.
According to a second aspect, the present invention provides an apparatus for optimizing a code hosting platform, including:
the hierarchical setting unit is used for setting the Gitlab code hosting unit as a first hierarchy of the code hosting platform and setting the Gogs code hosting unit of the cluster as a second hierarchy below the first hierarchy;
the configuration unit is used for configuring the local project of the current user through the Gogs code hosting unit of the cluster set by the hierarchical setting unit to obtain corresponding configuration information;
and the writing unit is used for writing the configuration information configured by the configuration unit into a corresponding item directory.
According to a third aspect, the present invention provides a computer readable storage medium, on which a computer program is stored, which when executed by a processor, implements a method for optimizing a code hosting platform as described in any of the above.
According to a fourth aspect of the present invention, there is provided an electronic apparatus including: one or more processors; storage means for storing one or more programs which, when executed by the one or more processors, cause the one or more processors to implement a method of optimizing a code hosting platform as described in any of the above.
Compared with the prior art, the scheme of the embodiment of the invention at least has the following beneficial effects: the invention provides a method, a device, a medium and electronic equipment for optimizing a code hosting platform, wherein a brand-new code hosting platform is designed, a Gogs code hosting unit of a plurality of Gogs code hosting subunit clusters is arranged between a Gitlab code hosting unit and each project, and each Gogs code hosting subunit directly interacts with two or three projects, so that the efficiency of service processing of the code hosting platform is improved, the stability of the code hosting platform is improved, and the problem of paralysis of the code hosting platform is avoided.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and together with the description, serve to explain the principles of the invention. It is obvious that the drawings in the following description are only some embodiments of the invention, and that for a person skilled in the art, other drawings can be derived from them without inventive effort. In the drawings:
FIG. 1 illustrates a flow diagram of a method of optimizing a code hosting platform according to an embodiment of the invention;
FIG. 2 illustrates a system diagram of an optimized code hosting platform according to an embodiment of the present invention;
FIG. 3 is a schematic diagram of an apparatus for optimizing a code hosting platform according to an embodiment of the present invention;
fig. 4 shows a schematic diagram of an electronic device connection structure according to an embodiment of the invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention clearer, the present invention will be described in further detail with reference to the accompanying drawings, and it is apparent that the described embodiments are only a part of the embodiments of the present invention, 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.
The terminology used in the embodiments of the invention is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention. As used in the examples of the present invention and the appended claims, the singular forms "a", "an", and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise, and "a plurality" typically includes at least two.
It should be understood that the term "and/or" as used herein is merely one type of association that describes an associated object, meaning that three relationships may exist, e.g., a and/or B may mean: a exists alone, A and B exist simultaneously, and B exists alone. In addition, the character "/" herein generally indicates that the former and latter related objects are in an "or" relationship.
It should be understood that although the terms first, second, third, etc. may be used to describe … … in embodiments of the present invention, these … … should not be limited to these terms. These terms are used only to distinguish … …. For example, the first … … can also be referred to as the second … … and similarly the second … … can also be referred to as the first … … without departing from the scope of embodiments of the present invention.
The words "if", as used herein, may be interpreted as "at … …" or "at … …" or "in response to a determination" or "in response to a detection", depending on the context. Similarly, the phrases "if determined" or "if detected (a stated condition or event)" may be interpreted as "when determined" or "in response to a determination" or "when detected (a stated condition or event)" or "in response to a detection (a stated condition or event)", depending on the context.
It is also noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that an article or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such article or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in the article or device in which the element is included.
Alternative embodiments of the present invention are described in detail below with reference to the accompanying drawings.
Example 1
As shown in fig. 1, according to a specific embodiment of the present disclosure, in a first aspect, the present disclosure provides a method for optimizing a code hosting platform, including:
s102: setting a Gitlab code hosting unit as a first level of a code hosting platform, and setting a Gogs code hosting unit of a cluster as a second level below the first level; wherein the second level is a self-level below the first level; thus, the Gitlab code hosting unit is set to the first level, namely: a master control hierarchy; and the Gogs code hosting unit of the cluster arranged under the Gitlab code hosting unit is a second level, and the Gogs code hosting units under the Gogs code hosting unit of the cluster are directly interacted with the items respectively, so that the service processing efficiency of the code hosting platform is improved, the stability of the code hosting platform is also improved, and the problem of paralysis of the code hosting platform is avoided.
The terms used in the above steps are explained as follows:
code hosting platform web services for managing code.
Mature code hosts the open source project. Web services built on the basis of Git serving as a code management tool belong to one code hosting platform; wherein, Git is a free and open-source distributed version control system, and is used for code management.
Gogs-New generation lightweight code hosting open source projects. Web services built on the basis of Git serving as a code management tool belong to one code hosting platform.
Cluster-a group of multiple web services (Gogs) that provide uniform Git service capabilities.
As shown in fig. 2, a system structural diagram of an optimized code hosting platform according to an embodiment of the present invention is shown.
As shown in fig. 2, a system structure of the optimized code hosting platform provided by the embodiment of the present invention is:
by introducing the Gogs code hosting unit of the cluster, the Gogs code hosting unit of the cluster is responsible for MergeRequest operation based on page operation and code auditing.
The optimization method provided by the embodiment of the disclosure selects the Gogs code hosting unit introduced into the cluster based on the following reasons:
gogs is very friendly to MergeRequest operations based on page operations and code audits, and has no inferior operability to Gitlab.
The Gogs occupies few hardware resources; a Gogs small cluster can be established by deploying hardware resources of a Gitlab service, and the performance advantage is obvious.
3. By introducing the Gogs cluster, each Gogs service manages a part of projects, and performance problems caused by too many projects managed by the same service are avoided.
As shown in fig. 2, the optimized code hosting platform according to the embodiment of the present invention has a structure that: the "Gitlab-Gogs-item" structure.
As shown in fig. 2, through task splitting, the gods performs a strong MergeRequest operation and code auditing, so as to reduce access pressure for the Gitlab, and the gods + Gitlab together form a code hosting platform; not only is the performance of the Gitlab improved, the opening speed of the code hosting platform page is accelerated, and the problem of paralysis of the code hosting platform is avoided; meanwhile, the efficiency of code auditing and code merging is improved, and the rapid realization of the demand is supported more powerfully.
In the optimized code hosting platform, the functions of the Gitlab code hosting unit and the functions of the gos code hosting unit of the cluster are specifically as follows:
the function of the Gitlab code hosting unit is as follows:
function 1: is responsible for receiving and processing the Git operations of Gogs.
Function 2: as a base component, into the company's systems.
The Gogs code hosting unit of the cluster has the functions of:
function 1: the Git operation for each item is received and processed.
Function 2: the MergeRequest operation is performed as well as code audits.
Function 3: and sending the incorporation operation to Gitlab for processing after the codes are incorporated.
As shown in fig. 2, in the optimized code hosting platform provided in the embodiment of the present invention, the gos code hosting unit of the cluster is responsible for the MergeRequest operation and the code audit, and the Gitlab code hosting unit is responsible for mature and stable code hosting, so that the gos code hosting unit of the cluster and the Gitlab code hosting unit together form a high-performance and high-stability code hosting platform.
Furthermore, since the project communicates directly with each designated gos code hosting subunit under the clusters' gos code hosting units, the project needs to know explicitly which gos service to interact with; therefore, the optimized code hosting platform provided by the embodiment of the disclosure is used for determining the corresponding Gogs service for the project by adding a 'project and Gogs mapping service', and the mapping strategy can be flexibly configured.
It should be noted that, in the code hosting platform provided in the embodiment of the present disclosure, the mapping policy is very flexible, and can be configured according to the requirements of different users.
For example, in a specific example, each item with an item beginning with a is preset and is assigned to a Gogs code hosting subunit of a class a under the Gogs code hosting unit of the corresponding cluster.
For another example, in another specific example, each item of the financial class is preset and is assigned to the gos code hosting subunit of the F class under the gos code hosting unit of the corresponding cluster. The above is only an example, and there are other mapping policies, which are not described in detail herein, and the mapping policies may be flexibly adjusted according to the requirements of different users, so that different items are respectively assigned to the gots code hosting subunits of the corresponding categories under the gots code hosting units of the cluster.
The above-mentioned terms of art are explained as follows:
MergeRequest is an audit application for merging codes.
Code auditing, namely auditing the codes to be merged in the MergeRequest.
And (4) code merging, namely finishing auditing codes to be merged in the MergeRequest and merging the codes.
S104: and configuring the local project of the current user through the Gogs code hosting unit of the cluster to obtain corresponding configuration information.
In this step, the configuration is performed on the local item of the current user through the gos code hosting unit of the cluster, and the obtaining of the corresponding configuration information at least includes:
the method comprises the steps of obtaining local project attribute information of a current user, Gogs code hosting pipe unit information under a Gogs cluster corresponding to a local project, remote Gogs warehouse address information of a Gogs code hosting subunit and code warehouse information corresponding to the local project.
Besides the above common configuration information, other configuration information may be introduced, which is not described in detail herein.
In this step, by reading the code repository information, the corresponding code repository can be known, wherein the code repository is used for a virtual repository for code management, and the code repository can be understood as a database of codes.
S106: the configuration information is written into the corresponding item directory.
In this step, the local item of the current user is configured through the gos code hosting unit of the cluster, and corresponding configuration information is obtained, for example, the local item attribute information of the current user, the information of the gos code hosting pipe unit under the gos cluster corresponding to the local item, the information of the remote gos warehouse address of the gos code hosting subunit, and the information of the code warehouse corresponding to the local item are written into the corresponding item directory.
In order to enable a user to more intuitively see each configuration information in each different item catalog; the optimization method provided by the embodiment of the disclosure further provides that the configuration information is intuitively displayed on the display interface of the optimized code hosting platform, so that a user can intuitively see the configuration information under each item.
Optionally, configuring, by the gos code hosting unit of the cluster, a local item of the current user includes:
distributing the local items of the current user to corresponding Gogs code hosting subunits under the Gogs cluster according to preset classification rules;
in this step, in a specific example, the preset classification rule may be: each item with an item beginning with a is assigned to the gods code hosting subunit of class a under the gods code hosting unit of the corresponding cluster.
For another example, in another specific example, each item of the finance class is assigned to a Gogs code hosting subunit of the F class under the Gogs code hosting unit of the corresponding cluster.
The foregoing is merely an example, showing some preset classification rules, and other classification rules, which are not described herein any more, and the classification policy may be flexibly adjusted according to the requirements of different users, so that different items are respectively allocated to the gos code hosting subunits of corresponding categories under the gos code hosting units of the cluster.
According to a preset Git command, establishing an association relationship between a local item and a remote Gogs warehouse address of a Gogs code hosting subunit;
in this step, the common Git command may involve the following:
workspace: a working area; Index/Stage: a temporary storage area; reproducibility: a warehouse area (or local warehouse); remote: a remote warehouse.
And acquiring the incidence relation, and configuring the local project through the Gogs code hosting subunit based on the incidence relation.
Optionally, after the configuration information is written into the corresponding item directory, the method further includes:
and acquiring various data in the project catalog, and synchronizing the various data to a database in the Gitlab code hosting unit.
Optionally, the configuration information at least includes:
the method comprises the steps of obtaining local project attribute information of a current user, Gogs code hosting pipe unit information under a Gogs cluster corresponding to a local project, remote Gogs warehouse address information of a Gogs code hosting subunit and code warehouse information corresponding to the local project.
Optionally, the method further includes:
the code repository information is read and the corresponding code is downloaded from the code repository based on the code repository information.
Optionally, the method further includes:
and configuring the items to be added through a Gogs code hosting unit of the cluster to obtain corresponding configuration information.
Optionally, the configuring, by the gos code hosting unit of the cluster, the item to be added, and obtaining the corresponding configuration information includes:
determining Gogs services corresponding to the items to be added according to preset mapping rules of the items and the Gogs services;
according to the determined Gogs service, distributing the items to be added to the designated Gogs code hosting subunit;
and configuring the items to be added through the Gogs code support pipe units corresponding to the items to be added to obtain configuration information of the items to be added.
In a specific example, after obtaining the configuration information of the item to be added, the configuration information of the item to be added is written into the corresponding item directory.
Optionally, before determining, according to a preset mapping rule of the project and the goss service, the goss service corresponding to the project to be added, the method further includes:
acquiring associated information associated with the items to be added;
wherein the associated information at least comprises: attribute information of the items to be added, service type information corresponding to each Gogs code hosted pipe unit under the Gogs code hosting unit of the cluster, and preset mapping rule information of the items and the Gogs services.
The invention provides a method, a device, a medium and electronic equipment for optimizing a code hosting platform, wherein a brand-new code hosting platform is designed, a Gogs code hosting unit of a plurality of Gogs code hosting subunit clusters is arranged between a Gitlab code hosting unit and each project, and each Gogs code hosting subunit directly interacts with two or three projects, so that the efficiency of service processing of the code hosting platform is improved, the stability of the code hosting platform is improved, and the problem of paralysis of the code hosting platform is avoided.
Example 2
As shown in fig. 3, according to a specific embodiment of the present disclosure, in a second aspect, the present disclosure provides an apparatus for optimizing a code hosting platform, where the apparatus includes a hierarchical setting unit 302, a configuration unit 304, a writing unit 306, and the like, as follows:
the hierarchical setting unit 302 is used for setting the Gitlab code hosting unit as a first hierarchy of the code hosting platform and setting the Gogs code hosting unit of the cluster as a second hierarchy below the first hierarchy;
a configuration unit 304, configured to configure the local item of the current user through the Gogs code hosting unit of the cluster set by the hierarchical setting unit 302, so as to obtain corresponding configuration information;
a writing unit 306, configured to write the configuration information configured by the configuration unit 304 into the corresponding entry directory.
Optionally, the configuration unit 304 is specifically configured to:
distributing the local items of the current user to corresponding Gogs code hosting subunits under the Gogs cluster according to preset classification rules;
according to a preset Git command, establishing an association relationship between a local item and a remote Gogs warehouse address of a Gogs code hosting subunit;
and acquiring the incidence relation, and configuring the local project through the Gogs code hosting subunit based on the incidence relation.
Optionally, the apparatus further comprises:
an acquisition unit (not shown in fig. 3) for: after the configuration information is written into the corresponding item directory, acquiring various data in the item directory;
a data synchronization unit (not shown in figure 3),
the data synchronization unit is used for: after the configuration information is written into the corresponding item directory, the synchronous acquisition unit acquires various items of data to a database of the Gitlab code hosting unit.
Optionally, the configuration information at least includes:
the method comprises the steps of obtaining local project attribute information of a current user, Gogs code hosting pipe unit information under a Gogs cluster corresponding to a local project, remote Gogs warehouse address information of a Gogs code hosting subunit and code warehouse information corresponding to the local project.
Optionally, the apparatus further comprises:
a reading unit (not shown in fig. 3) configured to read the code warehouse information acquired by the acquisition unit;
a downloading unit (not shown in fig. 3) for downloading the corresponding code from the code repository based on the code repository information read by the reading unit.
Optionally, the configuration unit 304 is further configured to:
and configuring the items to be added through a Gogs code hosting unit of the cluster to obtain corresponding configuration information.
Optionally, the configuration unit 304 is further specifically configured to:
determining Gogs services corresponding to the items to be added according to preset mapping rules of the items and the Gogs services;
according to the determined Gogs service, distributing the items to be added to the designated Gogs code hosting subunit;
and configuring the items to be added through the Gogs code support pipe units corresponding to the items to be added to obtain configuration information of the items to be added.
In a specific example, after the configuration unit 304 configures the configuration information of the item to be added, the writing unit 306 is further configured to:
the configuration information of the to-be-added item configured by the configuration unit 304 is written into the corresponding item directory.
Optionally, the obtaining unit is further configured to: acquiring association information associated with the item to be added before the configuration unit 304 determines the Gogs service corresponding to the item to be added according to the preset mapping rule of the item and the Gogs service;
the association information acquired by the acquisition unit at least includes: attribute information of the items to be added, service type information corresponding to each Gogs code hosted pipe unit under the Gogs code hosting unit of the cluster, and preset mapping rule information of the items and the Gogs services.
The invention provides a method, a device, a medium and electronic equipment for optimizing a code hosting platform, wherein a brand-new code hosting platform is designed, a Gogs code hosting unit of a plurality of Gogs code hosting subunit clusters is arranged between a Gitlab code hosting unit and each project, and each Gogs code hosting subunit directly interacts with two or three projects, so that the efficiency of service processing of the code hosting platform is improved, the stability of the code hosting platform is improved, and the problem of paralysis of the code hosting platform is avoided.
Example 3
As shown in fig. 4, this embodiment provides an electronic device, where the electronic device is used for a method for optimizing a code hosting platform, and the electronic device includes: at least one processor; and a memory communicatively coupled to the at least one processor; wherein,
the memory stores instructions executable by the one processor to cause the at least one processor to: by designing a brand-new code hosting platform, the Gogs code hosting units of a plurality of Gogs code hosting subunit clusters are arranged between the Gitlab code hosting unit and each project, and each Gogs code hosting subunit directly interacts with two or three projects, so that the service processing efficiency of the code hosting platform is improved, the stability of the code hosting platform is also improved, and the problem of paralysis of the code hosting platform is avoided.
Example 4
The embodiment of the present disclosure provides a non-volatile computer storage medium, where computer-executable instructions are stored, and the computer-executable instructions may execute the method for optimizing a code hosting platform in any of the above method embodiments.
Example 5
Referring now to FIG. 4, a block diagram of an electronic device 400 suitable for use in implementing embodiments of the present disclosure is shown. The terminal device in the embodiments of the present disclosure may include, but is not limited to, a mobile terminal such as a mobile phone, a notebook computer, a digital broadcast receiver, a PDA (personal digital assistant), a PAD (tablet computer), a PMP (portable multimedia player), a vehicle terminal (e.g., a car navigation terminal), and the like, and a stationary terminal such as a digital TV, a desktop computer, and the like. The electronic device shown in fig. 4 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present disclosure.
As shown in fig. 4, electronic device 400 may include a processing device (e.g., central processing unit, graphics processor, etc.) 401 that may perform various appropriate actions and processes in accordance with a program stored in a Read Only Memory (ROM)402 or a program loaded from a storage device 408 into a Random Access Memory (RAM) 403. In the RAM 403, various programs and data necessary for the operation of the electronic apparatus 400 are also stored. The processing device 401, the ROM 402, and the RAM 403 are connected to each other via a bus 404. An input/output (I/O) interface 405 is also connected to bus 404.
Generally, the following devices may be connected to the I/O interface 405: input devices 406 including, for example, a touch screen, touch pad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, etc.; an output device 407 including, for example, a Liquid Crystal Display (LCD), a speaker, a vibrator, and the like; storage 408 including, for example, tape, hard disk, etc.; and a communication device 409. The communication means 409 may allow the electronic device 400 to communicate wirelessly or by wire with other devices to exchange data. While fig. 4 illustrates an electronic device 400 having various means, it is to be understood that not all illustrated means are required to be implemented or provided. More or fewer devices may alternatively be implemented or provided.
In particular, according to an embodiment of the present disclosure, the processes described above with reference to the flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising program code for performing the method illustrated in the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network via the communication device 409, or from the storage device 408, or from the ROM 402. The computer program performs the above-described functions defined in the methods of the embodiments of the present disclosure when executed by the processing device 401.
It should be noted that the computer readable medium in the present disclosure can be a computer readable signal medium or a computer readable storage medium or any combination of the two. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having 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 portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present disclosure, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In contrast, in the present disclosure, a computer readable signal medium may comprise a propagated data signal with computer readable program code embodied therein, either in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: electrical wires, optical cables, RF (radio frequency), etc., or any suitable combination of the foregoing.
The computer readable medium may be embodied in the electronic device; or may exist separately without being assembled into the electronic device.
The computer readable medium carries one or more programs which, when executed by the electronic device, cause the electronic device to: by designing a brand-new code hosting platform, the Gogs code hosting units of a plurality of Gogs code hosting subunit clusters are arranged between the Gitlab code hosting unit and each project, and each Gogs code hosting subunit directly interacts with two or three projects, so that the service processing efficiency of the code hosting platform is improved, the stability of the code hosting platform is also improved, and the problem of paralysis of the code hosting platform is avoided.
Alternatively, the computer readable medium carries one or more programs which, when executed by the electronic device, cause the electronic device to: by designing a brand-new code hosting platform, the Gogs code hosting units of a plurality of Gogs code hosting subunit clusters are arranged between the Gitlab code hosting unit and each project, and each Gogs code hosting subunit directly interacts with two or three projects, so that the service processing efficiency of the code hosting platform is improved, the stability of the code hosting platform is also improved, and the problem of paralysis of the code hosting platform is avoided.
Computer program code for carrying out operations for aspects of the present disclosure may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, Smalltalk, C + +, and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider).
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units described in the embodiments of the present disclosure may be implemented by software or hardware. Where the name of a unit does not in some cases constitute a limitation of the unit itself, for example, the first retrieving unit may also be described as a "unit for retrieving at least two internet protocol addresses".

Claims (11)

1. A method of optimizing a code hosting platform, comprising:
setting a Gitlab code hosting unit as a first level of a code hosting platform, and setting a Gogs code hosting unit of a cluster as a second level below the first level;
configuring a local project of a current user through a Gogs code hosting unit of the cluster to obtain corresponding configuration information;
and writing the configuration information into the corresponding item directory.
2. The method of claim 1, wherein the configuring, by the Gogs code hosting unit of the cluster, the local item of the current user comprises:
distributing the local items of the current user to corresponding Gogs code hosting subunits under the Gogs cluster according to preset classification rules;
according to a preset Git command, the local item and the remote Gogs warehouse address of the Gogs code hosting subunit establish an association relationship;
and acquiring the incidence relation, and configuring the local project through the Gogs code support pipe unit based on the incidence relation.
3. The method of claim 1, wherein after the configuration information is written into the corresponding entry directory, the method further comprises:
and acquiring various data in the project catalog, and synchronizing the various data to a database of the Gitlab code hosting unit.
4. A method according to any of claims 1-3, characterized in that said configuration information comprises at least:
the method comprises the steps of local project attribute information of a current user, Gogs code hosting pipe unit information under a Gogs cluster corresponding to a local project, remote Gogs warehouse address information of a Gogs code hosting subunit and code warehouse information corresponding to the local project.
5. The method of claim 4, further comprising:
and reading the code warehouse information, and downloading the corresponding codes from the code warehouse based on the code warehouse information.
6. The method of claim 1, further comprising:
and configuring the items to be added through the Gogs code hosting unit of the cluster to obtain corresponding configuration information.
7. The method of claim 6, wherein configuring the items to be added through the Gogs code hosting unit of the cluster to obtain corresponding configuration information comprises:
determining Gogs services corresponding to the items to be added according to preset mapping rules of the items and the Gogs services;
according to the determined Gogs service, the item to be added is distributed to a specified Gogs code hosting subunit;
and configuring the items to be added through the Gogs code support pipe unit corresponding to the items to be added to obtain configuration information of the items to be added.
8. The method of claim 7, wherein before determining the Gogs service corresponding to the item to be added according to the preset mapping rule between the item and the Gogs service, the method further comprises:
acquiring associated information associated with the item to be added;
wherein the associated information at least comprises: the attribute information of the item to be added, the service type information corresponding to each Gogs code hosting unit of the cluster, and the preset mapping rule information of the item and the Gogs service.
9. An apparatus for optimizing a code hosting platform, comprising:
the hierarchical setting unit is used for setting the Gitlab code hosting unit as a first hierarchy of the code hosting platform and setting the Gogs code hosting unit of the cluster as a second hierarchy below the first hierarchy;
the configuration unit is used for configuring the local project of the current user through the Gogs code hosting unit of the cluster set by the hierarchical setting unit to obtain corresponding configuration information;
and the writing unit is used for writing the configuration information configured by the configuration unit into a corresponding item directory.
10. A computer-readable storage medium, on which a computer program is stored, which program, when being executed by a processor, carries out the method according to any one of claims 1 to 8.
11. An electronic device, comprising:
one or more processors;
storage means for storing one or more programs which, when executed by the one or more processors, cause the one or more processors to carry out the method of any one of claims 1 to 8.
CN201910708233.XA 2019-08-01 2019-08-01 Method, device, medium and electronic equipment for optimizing code hosting platform Active CN110489158B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910708233.XA CN110489158B (en) 2019-08-01 2019-08-01 Method, device, medium and electronic equipment for optimizing code hosting platform

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910708233.XA CN110489158B (en) 2019-08-01 2019-08-01 Method, device, medium and electronic equipment for optimizing code hosting platform

Publications (2)

Publication Number Publication Date
CN110489158A true CN110489158A (en) 2019-11-22
CN110489158B CN110489158B (en) 2023-05-05

Family

ID=68549021

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910708233.XA Active CN110489158B (en) 2019-08-01 2019-08-01 Method, device, medium and electronic equipment for optimizing code hosting platform

Country Status (1)

Country Link
CN (1) CN110489158B (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111475197A (en) * 2020-04-13 2020-07-31 中国科学院计算机网络信息中心 Code hosting and cooperating system
CN111475259A (en) * 2020-04-02 2020-07-31 北京百度网讯科技有限公司 Applet loading method and device and electronic equipment
CN115543432A (en) * 2022-11-28 2022-12-30 北京创新乐知网络技术有限公司 Universal type Git code hosting platform system and implementation method

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106997297A (en) * 2017-03-31 2017-08-01 广东亿迅科技有限公司 A kind of software development management platform and method based on DevOps
CN108196915A (en) * 2018-02-06 2018-06-22 杭州朗和科技有限公司 Code process method, equipment and storage medium based on application container engine
CN109005085A (en) * 2018-08-24 2018-12-14 北京奇艺世纪科技有限公司 A kind of service availability monitoring system, method, device and equipment
US20190026106A1 (en) * 2017-07-20 2019-01-24 Ca, Inc. Associating software issue reports with changes to code
CN109522025A (en) * 2018-10-30 2019-03-26 深圳市小赢信息技术有限责任公司 A kind of code delivery system based on git
CN109814879A (en) * 2019-01-16 2019-05-28 福建省天奕网络科技有限公司 Automate CI/CD project dispositions method, storage medium

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106997297A (en) * 2017-03-31 2017-08-01 广东亿迅科技有限公司 A kind of software development management platform and method based on DevOps
US20190026106A1 (en) * 2017-07-20 2019-01-24 Ca, Inc. Associating software issue reports with changes to code
CN108196915A (en) * 2018-02-06 2018-06-22 杭州朗和科技有限公司 Code process method, equipment and storage medium based on application container engine
CN109005085A (en) * 2018-08-24 2018-12-14 北京奇艺世纪科技有限公司 A kind of service availability monitoring system, method, device and equipment
CN109522025A (en) * 2018-10-30 2019-03-26 深圳市小赢信息技术有限责任公司 A kind of code delivery system based on git
CN109814879A (en) * 2019-01-16 2019-05-28 福建省天奕网络科技有限公司 Automate CI/CD project dispositions method, storage medium

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
赵春燕等: "云及高性能计算集群环境中配置管理系统设计", 《计算技术与自动化》 *

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111475259A (en) * 2020-04-02 2020-07-31 北京百度网讯科技有限公司 Applet loading method and device and electronic equipment
CN111475259B (en) * 2020-04-02 2023-06-09 北京百度网讯科技有限公司 Applet loading method and device and electronic equipment
CN111475197A (en) * 2020-04-13 2020-07-31 中国科学院计算机网络信息中心 Code hosting and cooperating system
CN115543432A (en) * 2022-11-28 2022-12-30 北京创新乐知网络技术有限公司 Universal type Git code hosting platform system and implementation method
CN115543432B (en) * 2022-11-28 2023-03-10 北京创新乐知网络技术有限公司 Universal type Git code hosting platform system and implementation method

Also Published As

Publication number Publication date
CN110489158B (en) 2023-05-05

Similar Documents

Publication Publication Date Title
US11385930B2 (en) Automatic workflow-based device switching
CN106687923B (en) Presentation of computing environments on multiple devices
US10409634B2 (en) Surfacing task-related applications in a heterogeneous tab environment
JP6266588B2 (en) Synchronizing local and remote data
US11392395B2 (en) Generating and presenting contextual user interfaces on devices with foldable displays
CN110489158B (en) Method, device, medium and electronic equipment for optimizing code hosting platform
CN110389796A (en) Edit operation processing method, device and electronic equipment
US20150331857A1 (en) Database migration
CN114244595A (en) Method and device for acquiring authority information, computer equipment and storage medium
CN113302585B (en) Acceleration application and sub-package installation
US10489013B2 (en) Intelligent taskbar shortcut menu for webpage control
CN111311188A (en) Task processing method, device, medium and electronic equipment
US20210255888A1 (en) Executing commands in a virtual environment
CN115344688A (en) Business data display method and device, electronic equipment and computer readable medium
CN109756525B (en) Information subscription method and device
CN112131181B (en) Display method and device of storage path and electronic equipment
US9430530B1 (en) Reusing database statistics for user aggregate queries
CN109614089B (en) Automatic generation method, device, equipment and storage medium of data access code
US20140164446A1 (en) Sharing electronic file metadata in a networked computing environment
CN110568976B (en) Method, device, equipment and storage medium for controlling application display
US11455318B2 (en) Data replication using probabilistic replication filters
US20170277789A1 (en) Node controllers for hierarchical data structures
CN111831179A (en) Signing method, device and computer readable medium
CN111787043A (en) Data request method and device
CN113641966B (en) Application integration method, system, equipment and 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
GR01 Patent grant
GR01 Patent grant