CN110489158B - Method, device, medium and electronic equipment for optimizing code hosting platform - Google Patents

Method, device, medium and electronic equipment for optimizing code hosting platform Download PDF

Info

Publication number
CN110489158B
CN110489158B CN201910708233.XA CN201910708233A CN110489158B CN 110489158 B CN110489158 B CN 110489158B CN 201910708233 A CN201910708233 A CN 201910708233A CN 110489158 B CN110489158 B CN 110489158B
Authority
CN
China
Prior art keywords
gogs
code
code hosting
unit
item
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.)
Active
Application number
CN201910708233.XA
Other languages
Chinese (zh)
Other versions
CN110489158A (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

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/71Version control; Configuration management
    • 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)
  • Stored Programmes (AREA)
  • Devices For Executing Special Programs (AREA)

Abstract

The invention provides a method, a device, a medium and electronic equipment for optimizing a code hosting platform, wherein the optimizing method comprises the following steps: 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 local items of the current user through the Gogs code hosting unit of the cluster to obtain corresponding configuration information; the configuration information is written into the corresponding item catalogue. The invention designs a brand-new code hosting platform, gogs code hosting units clustered by a plurality of Gogs code hosting sub-units are arranged between the Gitlab code hosting units and each project, and each Gogs code hosting sub-unit is directly interacted with two and three projects, so that the service processing efficiency 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.

Description

Method, device, medium and electronic equipment for optimizing code hosting platform
Technical Field
The present invention relates to the field of computer technologies, and in particular, to a method, an apparatus, a medium, and an electronic device 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 increasing number of code warehouses, the code of each code warehouse is expanded, and the code hosting platform adopted by companies, namely Gitlab, is overwhelmed, and the performance is gradually deteriorated.
Due to the performance degradation of existing Gitlab hosting platforms, the following problems can result:
problem 1: the Gitlab code hosting platform page is slow to open, affecting the efficiency of code auditing and code merging.
Problem 2: the Gitlab code hosting platform is paralyzed, so that the webpage cannot be opened, and the code auditing and the code merging cannot be normally performed.
Problem 3: the rapid evolution of services depends on the rapid implementation of the requirements, and efficiency and stability problems caused by the deterioration of the performance of the Gitlab are unacceptable.
Therefore, in long-term research and development, the inventor has conducted a great deal of research on how to optimize the code hosting platform, and has proposed a method for optimizing the code hosting platform to solve one of the above technical problems.
Disclosure of Invention
The invention aims to provide a method, a device, a medium and electronic equipment for optimizing a code hosting platform, which can solve at least one technical problem. The specific scheme is as follows:
according to a first aspect of the present invention, there is provided 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 a corresponding item catalog.
Optionally, the configuring, by the gos code hosting unit of the cluster, the local item of the current user includes:
according to a preset classification rule, distributing local items of the current user to corresponding Gogs code hosting subunits under the Gogs cluster;
according to a preset Git command, establishing an association relationship between the local item and a remote Gogs warehouse address of the Gogs code hosting subunit;
and acquiring the association relation, and configuring the local project through the Gogs code support pipe unit based on the association relation.
Optionally, after the configuration information is written into the corresponding item catalog, the method further includes:
and acquiring various data in the item catalog, and synchronizing the various data to a database of the Gitleab 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 support sub-unit information under a Gogs cluster corresponding to the local project, remote Gogs warehouse address information of the Gogs code support sub-unit and code warehouse information corresponding to the local project.
Optionally, the method further comprises:
and reading the code warehouse information, and downloading corresponding codes from a code warehouse based on the code warehouse information.
Optionally, the method further comprises:
and configuring items to be added through the Gogs code hosting unit of the cluster to obtain corresponding configuration information.
Optionally, the configuring, by the trigs code hosting unit of the cluster, the item to be added to obtain corresponding configuration information includes:
determining the Gogs service corresponding to the item to be added according to a preset mapping rule of the item and the Gogs service;
according to the determined Gogs service, the items to be added are distributed to a designated Gogs code hosting subunit;
and configuring the item to be added through the Gogs code hosting subunit corresponding to the item to be added, so as to obtain configuration information of the item to be added.
Optionally, before determining the gags service corresponding to the item to be added according to the preset mapping rule of the item and the gags service, the method further includes:
acquiring association information associated with the item to be added;
wherein, the association information at least comprises: the method comprises the steps of adding attribute information of items to be added, service type information corresponding to each Gogs code hosting subunit under the Gogs code hosting units of the clusters, and preset mapping rule information of the items and the Gogs services.
According to a second aspect of the present invention, there is provided an apparatus for optimizing a code hosting platform, comprising:
the hierarchical setting unit is used for setting the Gitleb code hosting unit as a first level of the code hosting platform and setting the Gogs code hosting unit of the cluster as a second level below the first level;
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 layering setting unit to obtain corresponding configuration information;
and the writing unit is used for writing the configuration information configured by the configuration unit into the corresponding item catalogue.
According to a third aspect of the present invention, there is provided a computer readable storage medium having stored thereon a computer program which when executed by a processor implements a method of optimizing a code hosting platform as defined in any of the above.
According to a fourth aspect of the present invention, there is provided an electronic device comprising: one or more processors; storage means for storing one or more programs that, 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 claimed in any of the preceding claims.
Compared with the prior art, the scheme provided by the embodiment of the invention has at least the following beneficial effects: according to the method, the device, the medium and the electronic equipment for optimizing the code hosting platform, through designing a brand-new code hosting platform, the Gogs code hosting units clustered by the plurality of Gogs code hosting sub-units are arranged between the Gitleb code hosting units and each project, and each Gogs code hosting sub-unit is directly interacted 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 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 evident that the drawings in the following description are only some embodiments of the present invention and that other drawings may be obtained from these drawings without inventive effort for a person of ordinary skill in the art. In the drawings:
FIG. 1 illustrates a flow chart of a method of optimizing a code hosting platform according to an embodiment of the present invention;
FIG. 2 illustrates a system architecture diagram of an optimized code hosting platform according to an embodiment of the present invention;
FIG. 3 illustrates an apparatus architecture diagram 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 present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention will be described in further detail below with reference to the accompanying drawings, and it is apparent that the described embodiments are only some embodiments of the present invention, not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the 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 this application 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, the "plurality" generally includes at least two.
It should be understood that the term "and/or" as used herein is merely one relationship describing the association of the associated objects, meaning that there may be three relationships, e.g., a and/or B, may represent: a exists alone, A and B exist together, and B exists alone. In addition, the character "/" herein generally indicates that the front and rear associated objects are 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 only used to distinguish … …. For example, the first … … may also be referred to as the second … …, and similarly the second … … may 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 phrase "if determined" or "if detected (stated condition or event)" may be interpreted as "when determined" or "in response to determination" or "when detected (stated condition or event)" or "in response to detection (stated condition or event), depending on the context.
It should also be noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a product 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 product or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a commodity or device comprising such element.
Alternative embodiments of the present invention will be 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 under the first level; thus, the Gitlab code hosting unit is set to the first level, namely: a master control hierarchy; the Gogs code hosting units of the clusters under the Gitlab code hosting units are in a second level, and each Gogs code hosting subunit under the Gogs code hosting units of the clusters is used for directly interacting with each item respectively, so that the service processing efficiency 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.
The technical terms in the above steps are explained as follows:
code hosting platform, web service for managing code.
Gitlab, mature code hosts open source items. The web service built on the basis of using Git as a code management tool belongs to one of code hosting platforms; wherein, git is a free and open-source distributed version control system, and Git is used for code management.
Go, new generation lightweight code hosts open source items. The web service which uses Git as a code management tool and is built on the basis belongs to one of code hosting platforms.
Clusters-groups of multiple web services (gags) that provide uniform Git service capabilities.
FIG. 2 is a system architecture diagram of an optimized code hosting platform according to an embodiment of the present invention.
As shown in fig. 2, the 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 gos code hosting unit introduced into the cluster based on the following reasons:
the Gogs is very friendly to MergeRequest operation and code audit based on page operation, and the operability is not inferior to Gitlab.
The Gogs occupies very little hardware resources; the hardware resource for deploying a Gitlab service can establish a Gogs small cluster, and the performance advantage is obvious.
3. By introducing the Gogs clusters, each Gogs service manages a portion of the items, avoiding performance problems caused by too many items managed by the same service.
As shown in fig. 2, the optimized code hosting platform according to the embodiment of the present invention has the following structure: "Gitlab-Gogs-item" structure.
As shown in fig. 2, through task splitting, performing a good mergerrequest operation and code auditing by the gags, reducing access pressure for the Gitlab, and forming a code hosting platform by the gags+the Gitlab together; not only improves the performance of the Gitlab, accelerates the opening speed of the page of the code hosting platform, and avoids the problem of paralysis of the code hosting platform; meanwhile, the efficiency of code auditing and code merging is improved, and the rapid realization of the requirement for supporting is more powerful.
In the optimized code hosting platform, the functions of the Gitlab code hosting unit and the functions of the trigs code hosting unit of the cluster are specifically as follows:
the function of the Gitlab code hosting unit is:
function 1: is responsible for receiving and processing the Git operations of the gags.
Function 2: integrated into the company's systems as a base component.
The functions of the Gogs code hosting unit of the cluster are:
function 1: git operations for each item are received and processed.
Function 2: mergeRequest operations and code audits are performed.
Function 3: after the codes are combined, the combined operation is sent to the Gitlab for processing.
As shown in FIG. 2, the optimized code hosting platform provided by the embodiment of the invention has the advantages that the Gogs code hosting unit of the cluster is responsible for MergeRequest operation and code auditing, and the Gitleb code hosting unit is responsible for mature and stable code hosting, so that the Gogs code hosting unit of the cluster and the Gitleb code hosting unit together form the code hosting platform with high performance and high stability.
Furthermore, since the item communicates directly with each designated Gogs code hosting subunit under the Gogs code hosting units of the cluster, the item needs to know explicitly which Gogs service to interact with; thus, the optimized code hosting platform provided by the embodiments of the present disclosure can flexibly configure mapping policies by adding a "project and gags mapping service" to determine corresponding gags services for a project.
It should be noted that, in the code hosting platform provided by the embodiment of the present disclosure, the mapping policy is very flexible, and may be configured according to the needs of different users.
For example, in a specific example, each item with item beginning at a is preset, and specified to a type a gos code hosting subunit under a corresponding cluster of gos code hosting units.
For another specific example, each item of the financial class is preset, and specified to the gos code hosting subunit of the F class under the gos code hosting unit of the corresponding cluster. The foregoing is merely an example, and other mapping policies are not described in detail herein, and the mapping policies may be flexibly adjusted according to requirements of different users, so that different items are respectively assigned to the corresponding category of the gos code hosting sub-units under the gos code hosting units of the cluster.
The following explanation is made on the above-mentioned technical terms:
MergeRequest, audit application of the merged code.
Code auditing, namely auditing the codes to be combined in the MergeRequest.
And merging codes, namely finishing auditing the 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, configuring, by the trigs code hosting unit of the cluster, the local item of the current user, and obtaining the corresponding configuration information at least includes:
the method comprises the steps of local project attribute information of a current user, gogs code support sub-unit information under a Gogs cluster corresponding to a local project, remote Gogs warehouse address information of a Gogs code support sub-unit and code warehouse information corresponding to the local project.
In addition to the above common configuration information, other configuration information may be introduced, which is not described herein.
In this step, by reading the code repository information, the corresponding code repository can be known, wherein the code repository is used for the virtual repository of the code management, and the code repository can be understood as a database of codes.
S106: the configuration information is written into the corresponding item catalogue.
In this step, the local project of the current user is configured through the gos code hosting unit of the cluster, so as to obtain corresponding configuration information, for example, attribute information of the local project of the current user, information of a gos code hosting sub-unit under the gos cluster corresponding to the local project, remote gos warehouse address information of the gos code hosting sub-unit, and code warehouse information corresponding to the local project are written into a corresponding project catalog.
In order to enable a user to more intuitively see each piece of 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 all the configuration information under all items.
Optionally, configuring the local item of the current user through the gos code hosting unit of the cluster includes:
according to a preset classification rule, distributing local items of the current user to corresponding Gogs code hosting subunits under the Gogs cluster;
in this step, in a specific example, the preset classification rule may be: each item, item beginning at a, is assigned to a trigs code hosting subunit of class a under the trigs code hosting unit of the corresponding cluster.
For another specific example, each item of the financial 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, and some preset classification rules, and other classification rules are not described in detail herein, and the classification policy may be flexibly adjusted according to requirements of different users, so that different items are respectively allocated to the corresponding types of the gags code hosting sub-units under the gags code hosting units of the cluster.
Establishing an association relationship between a local item and a remote Gogs warehouse address of a Gogs code hosting subunit according to a preset Git command;
in this step, the common Git command involves the following:
workspace: a working area; index/Stage: a temporary storage area; repositive: warehouse areas (or local warehouses); remote: and a remote warehouse.
And acquiring the association relationship, and configuring the local project through the Gogs code hosting subunit based on the association relationship.
Optionally, after the configuration information is written into the corresponding item catalog, the method further includes:
and acquiring various data in the project catalog, and synchronizing the various data to a database in the Gitleab 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 support sub-unit information under a Gogs cluster corresponding to a local project, remote Gogs warehouse address information of a Gogs code support sub-unit and code warehouse information corresponding to the local project.
Optionally, the method further comprises:
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 comprises:
and configuring the items to be added through the Gogs code hosting units of the clusters to obtain corresponding configuration information.
Optionally, the configuring the item to be added by the trigs code hosting unit of the cluster to obtain corresponding configuration information includes:
determining the Gogs service corresponding to the item to be added according to a preset mapping rule of the item and the Gogs service;
according to the determined Gogs service, distributing the items to be added to a designated Gogs code hosting subunit;
and configuring the item to be added through the Gogs code hosting subunit corresponding to the item to be added, so as to obtain configuration information of the item to be added.
In a specific example, after the configuration information of the item to be added is obtained, the configuration information of the item to be added is written into the corresponding item catalog.
Optionally, before determining the gags service corresponding to the item to be added according to the preset mapping rule of the item and the gags service, the method further includes:
acquiring association information associated with an item to be added;
wherein, the association information at least comprises: the method comprises the steps of adding attribute information of items, service type information corresponding to each Gogs code hosting subunit under the Gogs code hosting units of a cluster, and preset mapping rule information of the items and the Gogs service.
According to the method, the device, the medium and the electronic equipment for optimizing the code hosting platform, through designing a brand-new code hosting platform, the Gogs code hosting units clustered by the plurality of Gogs code hosting sub-units are arranged between the Gitleb code hosting units and each project, and each Gogs code hosting sub-unit is directly interacted 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 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, specifically as follows:
a hierarchy setting unit 302, configured to set the Gitlab code hosting unit as a first hierarchy of the code hosting platform, and set the trigs code hosting unit of the cluster as a second hierarchy below the first hierarchy;
a configuration unit 304, configured to configure a local item of a current user through the gags code hosting unit of the cluster set by the hierarchical setting unit 302, so as to obtain corresponding configuration information;
and a writing unit 306, configured to write the configuration information configured by the configuration unit 304 into the corresponding item directory.
Optionally, the configuration unit 304 is specifically configured to:
according to a preset classification rule, distributing local items of the current user to corresponding Gogs code hosting subunits under the Gogs cluster;
establishing an association relationship between a local item and a remote Gogs warehouse address of a Gogs code hosting subunit according to a preset Git command;
and acquiring the association relationship, and configuring the local project through the Gogs code hosting subunit based on the association relationship.
Optionally, the apparatus further includes:
an acquisition unit (not shown in fig. 3) for: after the configuration information is written into the corresponding project catalogue, acquiring various data in the project catalogue;
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 catalogue, the various items of data acquired by the synchronous acquisition unit are sent to the 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 support sub-unit information under a Gogs cluster corresponding to a local project, remote Gogs warehouse address information of a Gogs code support sub-unit and code warehouse information corresponding to the local project.
Optionally, the apparatus further includes:
a reading unit (not shown in fig. 3) for reading the code warehouse information acquired by the acquisition unit;
a download unit (not shown in fig. 3) for downloading the corresponding code from the code repository based on the code repository information read by the read unit.
Optionally, the configuration unit 304 is further configured to:
and configuring the items to be added through the Gogs code hosting units of the clusters to obtain corresponding configuration information.
Optionally, the configuration unit 304 is specifically further configured to:
determining the Gogs service corresponding to the item to be added according to a preset mapping rule of the item and the Gogs service;
according to the determined Gogs service, distributing the items to be added to a designated Gogs code hosting subunit;
and configuring the item to be added through the Gogs code hosting subunit corresponding to the item to be added, so as to obtain configuration information of the item 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 items to be added configured by the configuration unit 304 is written into the corresponding item catalog.
Optionally, the obtaining unit is further configured to: 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, acquiring association information associated with the item to be added;
the association information acquired by the acquisition unit at least comprises: the method comprises the steps of adding attribute information of items, service type information corresponding to each Gogs code hosting subunit under the Gogs code hosting units of a cluster, and preset mapping rule information of the items and the Gogs service.
According to the method, the device, the medium and the electronic equipment for optimizing the code hosting platform, through designing a brand-new code hosting platform, the Gogs code hosting units clustered by the plurality of Gogs code hosting sub-units are arranged between the Gitleb code hosting units and each project, and each Gogs code hosting sub-unit is directly interacted 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 improved, and the problem of paralysis of the code hosting platform is avoided.
Example 3
As shown in fig. 4, the present embodiment provides an electronic device, which is used for a method for optimizing a code hosting platform, and includes: at least one processor; and a memory communicatively coupled to the at least one processor; wherein, the liquid crystal display device comprises a liquid crystal display device,
the memory stores instructions executable by the one processor, the instructions being executable by the at least one processor to enable the at least one processor to: through designing a brand-new code hosting platform, gogs code hosting units clustered by a plurality of Gogs code hosting sub-units are arranged between the Gitlab code hosting units and each project, and each Gogs code hosting sub-unit is directly interacted with two and three projects, so that the service processing efficiency 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 4
The disclosed embodiments provide a non-transitory computer storage medium storing computer executable instructions that are operable to perform the method of optimizing a code hosting platform in any of the method embodiments described above.
Example 5
Referring now to fig. 4, a schematic diagram of an electronic device 400 suitable for use in implementing embodiments of the present disclosure is shown. The terminal devices in the embodiments of the present disclosure may include, but are not limited to, mobile terminals such as mobile phones, notebook computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), in-vehicle terminals (e.g., in-vehicle navigation terminals), and the like, and stationary terminals such as digital TVs, desktop computers, and the like. The electronic device shown in fig. 4 is merely an example and should not be construed to limit the functionality and scope of use of the disclosed embodiments.
As shown in fig. 4, the electronic device 400 may include a processing means (e.g., a central processing unit, a graphics processor, etc.) 401, which may perform various suitable actions and processes according to a program stored in a Read Only Memory (ROM) 402 or a program loaded from a storage means 408 into a Random Access Memory (RAM) 403. In the RAM 403, various programs and data necessary for the operation of the electronic device 400 are also stored. The processing device 401, the ROM 402, and the RAM 403 are connected to each other by a bus 404. An input/output (I/O) interface 405 is also connected to bus 404.
In general, the following devices may be connected to the I/O interface 405: input devices 406 including, for example, a touch screen, touchpad, 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, magnetic tape, hard disk, etc.; and a communication device 409. The communication means 409 may allow the electronic device 400 to communicate with other devices wirelessly or by wire to exchange data. While fig. 4 shows an electronic device 400 having various means, it is to be understood that not all of the illustrated means are required to be implemented or provided. More or fewer devices may be implemented or provided instead.
In particular, according to embodiments of the present disclosure, the processes described above with reference to 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 shown in the flowcharts. In such an embodiment, the computer program may be downloaded and installed from a network via communications device 409, or from storage 408, or from ROM 402. The above-described functions defined in the methods of the embodiments of the present disclosure are performed when the computer program is executed by the processing device 401.
It should be noted that the computer readable medium described in the present disclosure may be a computer readable signal medium or a computer readable storage medium, or any combination of the two. The computer readable storage medium can be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or a combination of any 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 context of this 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 the present disclosure, however, the computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, with the computer-readable program code embodied therein. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination of the foregoing. 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, fiber optic cables, RF (radio frequency), and the like, or any suitable combination of the foregoing.
The computer readable medium may be contained in the electronic device; or may exist alone without being incorporated 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: through designing a brand-new code hosting platform, gogs code hosting units clustered by a plurality of Gogs code hosting sub-units are arranged between the Gitlab code hosting units and each project, and each Gogs code hosting sub-unit is directly interacted with two and three projects, so that the service processing efficiency 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.
Alternatively, the computer-readable medium carries one or more programs that, when executed by the electronic device, cause the electronic device to: through designing a brand-new code hosting platform, gogs code hosting units clustered by a plurality of Gogs code hosting sub-units are arranged between the Gitlab code hosting units and each project, and each Gogs code hosting sub-unit is directly interacted with two and three projects, so that the service processing efficiency 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.
Computer program code for carrying out operations of the present disclosure may be written in 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 kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computer (for example, through the Internet using an Internet service provider).
The flowcharts 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 involved in the embodiments of the present disclosure may be implemented by means of software, or may be implemented by means of hardware. The name of the unit does not in any way constitute a limitation of the unit itself, for example the first acquisition unit may also be described as "unit acquiring at least two internet protocol addresses".

Claims (10)

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;
the configuration information is written into a corresponding item catalog;
the configuring, by the gos code hosting unit of the cluster, the local item of the current user includes:
according to a preset classification rule, distributing local items of the current user to corresponding Gogs code hosting subunits under the Gogs cluster;
establishing an association relationship between the local item and a remote Gogs warehouse address of the Gogs code hosting subunit according to a preset Gi t command;
and acquiring the association relation, and configuring the local project through the Gogs code support pipe unit based on the association relation.
2. The method of claim 1, wherein after the configuration information is written into the corresponding item catalog, the method further comprises:
and acquiring various data in the item catalog, and synchronizing the various data to a database of the Gitleab code hosting unit.
3. The method according to any of claims 1-2, wherein the configuration information comprises at least:
the method comprises the steps of local project attribute information of a current user, gogs code support sub-unit information under a Gogs cluster corresponding to the local project, remote Gogs warehouse address information of the Gogs code support sub-unit and code warehouse information corresponding to the local project.
4. A method according to claim 3, characterized in that the method further comprises:
and reading the code warehouse information, and downloading corresponding codes from a code warehouse based on the code warehouse information.
5. The method according to claim 1, wherein the method further comprises:
and configuring items to be added through the Gogs code hosting unit of the cluster to obtain corresponding configuration information.
6. The method according to claim 5, wherein the configuring, by the trigs code hosting unit of the cluster, the item to be added to obtain corresponding configuration information includes:
determining the Gogs service corresponding to the item to be added according to a preset mapping rule of the item and the Gogs service;
according to the determined Gogs service, the items to be added are distributed to a designated Gogs code hosting subunit;
and configuring the item to be added through the Gogs code hosting subunit corresponding to the item to be added, so as to obtain configuration information of the item to be added.
7. The method according to claim 6, wherein before determining the gos service corresponding to the item to be added according to the preset mapping rule of the item and the gos service, the method further comprises:
acquiring association information associated with the item to be added;
wherein, the association information at least comprises: the method comprises the steps of adding attribute information of items to be added, service type information corresponding to each Gogs code hosting subunit under the Gogs code hosting units of the clusters, and preset mapping rule information of the items and the Gogs services.
8. An apparatus for optimizing a code hosting platform, comprising:
the hierarchical setting unit is used for setting the Gitleb code hosting unit as a first level of the code hosting platform and setting the Gogs code hosting unit of the cluster as a second level below the first level;
the configuration unit is used for distributing local items of a current user to corresponding Gogs code hosting subunits under the Gogs cluster according to a preset classification rule, establishing an association relationship between the local items and remote Gogs warehouse addresses of the Gogs code hosting subunits according to a preset Git command, acquiring the association relationship, and configuring the local items through the Gogs code hosting subunits based on the association relationship to obtain corresponding configuration information;
and the writing unit is used for writing the configuration information configured by the configuration unit into the corresponding item catalogue.
9. A computer readable storage medium, on which a computer program is stored, characterized in that the program, when being executed by a processor, implements the method according to any one of claims 1 to 7.
10. 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 implement the method of any of claims 1 to 7.
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 CN110489158A (en) 2019-11-22
CN110489158B true 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)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
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
CN115543432B (en) * 2022-11-28 2023-03-10 北京创新乐知网络技术有限公司 Universal type Git code hosting platform system and implementation method

Citations (5)

* 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
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

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20190026106A1 (en) * 2017-07-20 2019-01-24 Ca, Inc. Associating software issue reports with changes to code

Patent Citations (5)

* 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
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
云及高性能计算集群环境中配置管理系统设计;赵春燕等;《计算技术与自动化》;20160315(第01期);全文 *

Also Published As

Publication number Publication date
CN110489158A (en) 2019-11-22

Similar Documents

Publication Publication Date Title
US10467025B2 (en) Managing delivery of code and dependent data using application containers
WO2020119485A1 (en) Page display method and device, apparatus, and storage medium
US20160378436A1 (en) Multi-tenant, tenant-specific applications
CN110489158B (en) Method, device, medium and electronic equipment for optimizing code hosting platform
US9848064B2 (en) Generation and distribution of named, definable, serialized tokens
JP6266588B2 (en) Synchronizing local and remote data
JP2017531844A (en) Dynamic update stream for real-time provisioning
CN112965761B (en) Data processing method, system, electronic equipment and storage medium
CN111857720B (en) User interface state information generation method and device, electronic equipment and medium
CN114385164A (en) Page generation and rendering method and device, electronic equipment and storage medium
CN111309304B (en) Method, device, medium and electronic equipment for generating IDL file
CN114625536A (en) Video memory allocation method, device, medium 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
CN113391882B (en) Virtual machine memory management method and device, storage medium and electronic equipment
CN111831179B (en) Signing method, device and computer readable medium
US10176000B2 (en) Dynamic assistant for applications based on pattern analysis
CN111737218A (en) File sharing method and device
CN113127430A (en) Mirror image information processing method and device, computer readable medium and electronic equipment
US20190069121A1 (en) Direct update of mobile applications based on features used
CN116360710B (en) Data storage method applied to server cluster, electronic device and readable medium
US11962280B2 (en) Synchronized controller
CN112084003B (en) Method, device, medium and electronic equipment for isolating data
CN112148935B (en) Method and apparatus for NBMP function execution for multiple instances
CN116820354B (en) Data storage method, data storage device and data storage system

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