CN106775760B - Method and system for uploading container mirror image to mirror image warehouse based on source code warehouse - Google Patents

Method and system for uploading container mirror image to mirror image warehouse based on source code warehouse Download PDF

Info

Publication number
CN106775760B
CN106775760B CN201710004104.3A CN201710004104A CN106775760B CN 106775760 B CN106775760 B CN 106775760B CN 201710004104 A CN201710004104 A CN 201710004104A CN 106775760 B CN106775760 B CN 106775760B
Authority
CN
China
Prior art keywords
source code
container
file
warehouse
mirror image
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
CN201710004104.3A
Other languages
Chinese (zh)
Other versions
CN106775760A (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.)
Inspur Cloud Information Technology Co Ltd
Original Assignee
Zhengzhou Yunhai Information 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 Zhengzhou Yunhai Information Technology Co Ltd filed Critical Zhengzhou Yunhai Information Technology Co Ltd
Priority to CN201710004104.3A priority Critical patent/CN106775760B/en
Publication of CN106775760A publication Critical patent/CN106775760A/en
Application granted granted Critical
Publication of CN106775760B publication Critical patent/CN106775760B/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/30Creation or generation of source code
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/40Transformation of program code
    • G06F8/41Compilation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management

Landscapes

  • Engineering & Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Stored Programmes (AREA)

Abstract

The invention discloses a method and a system for uploading container mirror images to a mirror image warehouse based on a source code library, belonging to the technical problems to be solved that the software development, test and operation processes are complex and the efficiency is low; the method comprises the following steps: s1, uploading the code to a source code library by a user; s2, the management component detects the source codes from the source code library and compresses the source codes to generate a source code compressed file; s3, the management component uploads the source code compressed file to the container component; s4, the container component compiles the source code compressed file to generate an image file, and tags the image file, wherein the tags are used for designating the address of an image warehouse for storing the image file; s5, the container component uploads the image file to the image repository specified in the label. The system for uploading the container mirror image to the mirror image warehouse based on the source code library comprises a client, the source code library, a management assembly, a local temporary source code library, a temporary file warehouse, a container assembly and a mirror image warehouse.

Description

Method and system for uploading container mirror image to mirror image warehouse based on source code warehouse
Technical Field
The invention relates to the technical field of computer software application, in particular to a method and a system for uploading a container mirror image to a mirror image warehouse based on a source code library.
Background
People have higher and higher requirements on the quality and efficiency of software products and services, and the traditional method of cutting development and operation apart is not suitable for the requirements of modern product and service development. The three factors of agile development, new operation and maintenance technology and market demand oriented to make people think again how to look at software development, the commonalities of the three trends are that the change speed is increased, and the practice of laying aside software functions needed by users for several months and then developing the software functions cannot be accepted. Only when software is developed quickly and efficiently can market demands be met.
DevOps (a combination of Development and Operations, all english) is a collective term for a set of processes, methods and systems for facilitating communication, collaboration and integration between Development (application/software engineering), technical Operations and Quality Assurance (QA) departments. It appears because the software industry is increasingly aware that: in order to deliver software products and services on time, development and operation must work in close cooperation. If a platform or a tool can support the development and operation delivery work and the subsequent environment management work in a unified way, the platform needs a series of continuous integration, continuous delivery, automatic deployment, automatic test monitoring, automatic expansion and contraction and automatic system recovery to improve the deployment efficiency in the development, test, operation and maintenance process, simplify the management of the development, test, operation and maintenance process, reduce the delivery risk and reduce the communication cost and the operation cost.
In summary, the problems faced at present are: how to integrate the development, management and operation of programs into a whole to solve the problems of complex software development, test and operation process and low efficiency at present.
Disclosure of Invention
The technical task of the invention is to provide a method and a system for uploading container images to an image warehouse based on a source code library to solve the problems of complex software development, test and operation processes and low efficiency.
The technical task of the invention is realized by the following modes:
a method for uploading a container mirror image to a mirror image warehouse based on a source code library integrates codes and program submission, compilation, uploading and publishing into a set of flow, and comprises the following steps:
s1, uploading the code to a source code library by the user through the client;
s2, the management component detects the source codes from the source code library and compresses the source codes to generate a source code compressed file;
s3, the management component uploads the source code compressed file to the container component;
s4, the container component compiles the source code compressed file to generate an image file and generates a label, and the label is used for appointing the address of an image warehouse for storing the image file;
s5, the container component uploads the image file to the image repository specified in the label.
Through the steps, the coding, the source code detection, the uploading and the publishing are integrated, and the efficiency of program development, testing and operation is improved.
Further, in step S1, after the user submits the code to the source code library through the client, the source code library returns the source code library address to the client.
Further, in step S2, the step of the management component retrieving the source codes from the source code library and compressing the source codes to generate the source code compressed file includes:
s201, a user sends a source code uploading request and a source code library address to a management component through a client;
s202, the management component calls a source code library according to the source code address and detects a source code from the source code library;
s203, the management component uploads the source codes to a local temporary source code library for storage, and the local temporary source code library returns the address of the local temporary source code library to the management component;
s204, the management component calls a local temporary source code library according to the local temporary source code library address and extracts a source code;
s205, the management component compresses the source codes to generate source code compressed files, the source code compressed files are uploaded to a temporary file warehouse to be stored, and the temporary file warehouse returns a temporary file warehouse address to the management component.
Further, in step S3, the step of uploading, by the management component, the source code compressed file to the container component includes:
s301, the management component sends a request for uploading the source code compressed file to the container component;
s302, the management component calls a temporary file warehouse according to the address of the temporary file warehouse and extracts a source code compressed file;
and S303, the management component uploads the source code compressed file to the container component.
Further, in step S4, the step of compiling the source code compressed file by the container component to generate an image file and generating a label includes:
s401, the management component sends a compiling request to the container component, and the container component returns a container component address to the management component;
s402, the container component compiles the source code compressed file to generate a mirror image file;
s403, the management component sends a label generation request to the container component;
s404, the container component generates a label, wherein the label comprises a mirror image warehouse address, and the mirror image warehouse address is used for appointing a mirror image warehouse for storing mirror image files.
Further, in step S404, the container component returns the mirror repository address in the tag to the management component.
Further, in step S5, the step of uploading the image file to the image repository specified in the label by the container component includes:
s501, the management component sends a request for uploading the mirror image file to the container component;
s502, the container component uploads the mirror image file to a mirror image warehouse specified in the label.
Further, the management component is a management component configured with an active code library address, a container component address and a mirror repository address.
The system comprises a client, a source code library, a management assembly, a local temporary source code library, a temporary file warehouse, a container assembly and a mirror image warehouse, wherein the management assembly is respectively connected with the client, the source code library, the local temporary source code library, the temporary file warehouse and the container assembly; the client is used for compiling codes by a client, the source code library is used for storing codes of a user, the management component is used for detecting source codes and generating a source code compressed file, the local temporary source code library is used for storing the source codes, the temporary file warehouse is used for storing the source code compressed file, the container component is used for compiling the source codes to generate a mirror image file and marking the mirror image file, and the mirror image library is used for storing the mirror image file.
The method and the system for uploading the container mirror image to the mirror image warehouse based on the source code library have the following advantages that: the invention provides a complete set of project solution from the start of program coding to the submission, compilation, uploading and release of the program, is a method for realizing partial modules in the whole DevOps idea, improves the deployment efficiency in the development, test and operation process, simplifies the management in the development, test, operation and maintenance process, reduces the delivery risk, reduces the communication cost and the operation cost, and effectively improves the working efficiency of developers and managers.
Drawings
The invention is further described below with reference to the accompanying drawings.
Fig. 1 is a schematic block diagram of a method for uploading a container image to a mirror image warehouse based on a source code library in embodiment 1;
fig. 2 is a flow chart of a method for uploading a container image to a mirror image repository based on a source code repository in embodiment 1;
fig. 3 is a flow diagram illustrating a process in which a management component detects source codes from a source code repository and compresses the source codes to generate a source code compressed file in the method for uploading a container image to an image repository based on the source code repository in embodiment 1;
fig. 4 is a block flow diagram illustrating uploading of a source code compressed file to a container component by a management component in a method for uploading a container image to a mirror image repository based on a source code repository in embodiment 1;
fig. 5 is a block flow diagram illustrating a process of compiling a source code compressed file to generate an image file and labeling the image file in the method of uploading a container image to an image repository based on a source code repository in embodiment 1.
Detailed Description
The method and system for uploading container images to an image repository based on a source code repository of the present invention are described in detail below with reference to the drawings and the detailed description.
Example 1:
as shown in fig. 1-5, the method for uploading a container mirror image to a mirror image warehouse based on a source code library integrates code and program submission, compilation, uploading and publishing into a set of processes, and comprises the following steps:
s1, after the user finishes coding, the code is uploaded to a source code library through the client, and after the user submits the code to the source code library through the client, the source code library returns the address of the source code library to the client;
s2, the management component detects the source codes from the source code library and compresses the source codes to generate a source code compressed file;
s3, the management component uploads the source code compressed file to the container component;
s4, the container component compiles the source code compressed file to generate an image file and generates a label, and the label is used for appointing the address of an image warehouse for storing the image file;
s5, the container component uploads the image file to the image repository specified in the label.
The invention integrates the version control system, the container management system and the mirror image warehouse system into a whole, and realizes a whole set of project flow from the start of program coding to program submission, compiling, uploading and releasing.
In step S2, the specific steps of the management component retrieving the source codes from the source code library and compressing the source codes to generate the source code compressed file include:
s201, a user sends a source code uploading request and a source code library address to a management component through a client;
s202, the management component calls a source code library according to the source code address and detects a source code from the source code library;
s203, the management component uploads the source codes to a local temporary source code library for storage, and the local temporary source code library returns the address of the local temporary source code library to the management component;
s204, the management component calls a local temporary source code library according to the local temporary source code library address and extracts a source code;
s205, the management component compresses the source codes to generate source code compressed files, the source code compressed files are uploaded to a temporary file warehouse to be stored, and the temporary file warehouse returns a temporary file warehouse address to the management component.
In step S3, the specific step of uploading the source code compressed file to the container component by the management component is:
s301, the management component sends a request for uploading the source code compressed file to the container component;
s302, the management component calls a temporary file warehouse according to the address of the temporary file warehouse and extracts a source code compressed file;
and S303, the management component uploads the source code compressed file to the container component.
In step S4, the specific steps of the container component compiling the source code compressed file to generate the image file and generating the label are:
s401, the management component sends a compiling request to the container component, and the container component returns a container component address to the management component;
s402, the container component compiles the source code compressed file to generate a mirror image file;
s403, the management component sends a label generation request to the container component;
s404, the container component generates a label, wherein the label comprises an image warehouse address, the image warehouse address is used for appointing an image warehouse for storing the image file, and the container component returns the image warehouse address to the management component.
In step S5, the specific step of uploading the image file to the image repository specified in the label by the container component is:
s501, the management component sends a request for uploading the mirror image file to the container component;
s502, the container component uploads the mirror image file to a mirror image warehouse specified in the label.
The management component is configured with an active code library address, a container component address and a mirror image warehouse address.
The invention integrates the code, the source code detection, the compiling, the uploading and the publishing into a whole, and improves the efficiency of program development, testing and operation.
Example 2:
as shown in fig. 1, the system for uploading a container mirror image to a mirror image warehouse based on a source code library of the present invention includes a client, a source code library, a management component, a local temporary source code library, a temporary file warehouse, a container component and a mirror image warehouse, wherein the management component is respectively connected to the client, the source code library, the local temporary source code library, the temporary file warehouse and the container component, the client is connected to the source code library, and the container component is connected to the mirror image warehouse; the client is used for compiling codes by a client, the source code library is used for storing codes of a user, the management component is used for detecting source codes and generating a source code compressed file, the local temporary source code library is used for storing the source codes, the temporary file warehouse is used for storing the source code compressed file, the container component is used for compiling the source codes to generate a mirror image file and marking the mirror image file, and the mirror image library is used for storing the mirror image file.
The system for uploading the container mirror image to the mirror image warehouse based on the source code library can realize the method for uploading the container mirror image to the mirror image warehouse based on the source code library in the embodiment 1.
The present invention can be easily implemented by those skilled in the art from the above detailed description.
It should be understood, however, that the intention is not to limit the invention to the particular embodiments described. On the basis of the disclosed embodiments, a person skilled in the art can combine different technical features at will, thereby implementing different technical solutions. In addition to the technical features described in the specification, the technology is known to those skilled in the art.

Claims (7)

1. A method for uploading a container mirror image to a mirror image warehouse based on a source code library is characterized in that codes and program submission, compiling, uploading and publishing are integrated into a set of flow, and the method comprises the following steps:
s1, uploading the code to a source code library by the user through the client;
s2, the management component detects the source codes from the source code library and compresses the source codes to generate a source code compressed file;
s3, the management component uploads the source code compressed file to the container component;
s4, the container component compiles the source code compressed file to generate an image file and generates a label, and the label is used for appointing the address of an image warehouse for storing the image file;
s5, the container component uploads the mirror image file to a mirror image warehouse specified in the label;
in step S1, after the user submits the code to the source code library through the client, the source code library returns the source code library address to the client;
in step S2, the step of the management component retrieving the source code from the source code repository and compressing the source code to generate the source code compressed file includes:
s201, a user sends a source code uploading request and a source code library address to a management component through a client;
s202, the management component calls a source code library according to the source code address and detects a source code from the source code library;
s203, the management component uploads the source codes to a local temporary source code library for storage, and the local temporary source code library returns the address of the local temporary source code library to the management component;
s204, the management component calls a local temporary source code library according to the local temporary source code library address and extracts a source code;
s205, the management component compresses the source codes to generate source code compressed files, the source code compressed files are uploaded to a temporary file warehouse to be stored, and the temporary file warehouse returns a temporary file warehouse address to the management component.
2. The method for uploading a container image to an image repository based on a source code repository according to claim 1, wherein in step S3, the step of uploading the source code compressed file to the container component by the management component comprises:
s301, the management component sends a request for uploading the source code compressed file to the container component;
s302, the management component calls a temporary file warehouse according to the address of the temporary file warehouse and extracts a source code compressed file;
and S303, the management component uploads the source code compressed file to the container component.
3. The method for uploading the container image to the image repository based on the source code repository of claim 2, wherein in step S4, the step of compiling the source code compressed file by the container component to generate the image file and generating the label includes:
s401, the management component sends a compiling request to the container component, and the container component returns a container component address to the management component;
s402, the container component compiles the source code compressed file to generate a mirror image file;
s403, the management component sends a label generation request to the container component;
s404, the container component generates a label, wherein the label comprises a mirror image warehouse address, and the mirror image warehouse address is used for appointing a mirror image warehouse for storing mirror image files.
4. The method for uploading the container image to the mirror repository based on the source code repository of claim 3, wherein in step S404, the container component returns the mirror repository address in the tag to the management component.
5. The method for uploading the container image to the mirror repository based on the source code repository according to claim 3 or 4, wherein in step S5, the step of uploading the image file to the mirror repository specified in the label by the container component comprises:
s501, the management component sends a request for uploading the mirror image file to the container component;
s502, the container component uploads the mirror image file to a mirror image warehouse specified in the label.
6. The method of claim 5, wherein the management component is a management component configured with an address of the source code repository, an address of the container component, and an address of the mirror repository.
7. The system for uploading container mirror images to a mirror image warehouse based on a source code library is characterized by being used for realizing the method for uploading the container mirror images to the mirror image warehouse based on the source code library, which comprises a client, the source code library, a management component, a local temporary source code library, a temporary file warehouse, a container component and a mirror image warehouse, wherein the management component is respectively connected with the client, the source code library, the local temporary source code library, the temporary file warehouse and the container component;
the client is used for compiling codes by a client, the source code library is used for storing codes of a user, the management component is used for detecting source codes and generating a source code compressed file, the local temporary source code library is used for storing the source codes, the temporary file warehouse is used for storing the source code compressed file, the container component is used for compiling the source codes to generate a mirror image file and marking the mirror image file, and the mirror image library is used for storing the mirror image file.
CN201710004104.3A 2017-01-04 2017-01-04 Method and system for uploading container mirror image to mirror image warehouse based on source code warehouse Active CN106775760B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710004104.3A CN106775760B (en) 2017-01-04 2017-01-04 Method and system for uploading container mirror image to mirror image warehouse based on source code warehouse

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710004104.3A CN106775760B (en) 2017-01-04 2017-01-04 Method and system for uploading container mirror image to mirror image warehouse based on source code warehouse

Publications (2)

Publication Number Publication Date
CN106775760A CN106775760A (en) 2017-05-31
CN106775760B true CN106775760B (en) 2020-02-14

Family

ID=58950176

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710004104.3A Active CN106775760B (en) 2017-01-04 2017-01-04 Method and system for uploading container mirror image to mirror image warehouse based on source code warehouse

Country Status (1)

Country Link
CN (1) CN106775760B (en)

Families Citing this family (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107704593B (en) * 2017-10-12 2020-11-27 成都知道创宇信息技术有限公司 Method for detecting and solving conflict between Docker local mirror image and remote warehouse mirror image
CN108769087B (en) * 2018-02-23 2020-12-22 福建天晴数码有限公司 Development method of interactive system and server
CN108509253A (en) * 2018-04-03 2018-09-07 南京中兴软创软件技术有限公司 A kind of method of a large amount of container mirror images of release quickly
CN109067890B (en) * 2018-08-20 2021-06-29 广东电网有限责任公司 CDN node edge computing system based on docker container
CN111273940B (en) * 2018-12-05 2024-04-05 三六零科技集团有限公司 Method and device for uploading program file to code warehouse
CN109783191B (en) * 2018-12-18 2020-09-08 全球能源互联网研究院有限公司 Management, use and construction method and device of container mirror image
CN110716737A (en) * 2019-08-29 2020-01-21 北斗航天卫星应用科技集团有限公司 System application version management system and system application version management method
CN112887352B (en) * 2019-11-29 2023-04-18 北京神州泰岳软件股份有限公司 Image file uploading method and device for Docker container
CN111459509A (en) * 2020-03-27 2020-07-28 北京金山云网络技术有限公司 Container mirror image construction method and device and server
CN111722866B (en) * 2020-06-19 2022-06-17 浪潮电子信息产业股份有限公司 OpenStack code repairing method, device, equipment and storage medium
CN111930361A (en) * 2020-07-16 2020-11-13 东云睿连(武汉)计算技术有限公司 Artificial intelligence operation mirror image templating construction method and device

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104793946A (en) * 2015-04-27 2015-07-22 广州杰赛科技股份有限公司 Application deployment method and system based on cloud computing platform
CN105760167A (en) * 2016-02-23 2016-07-13 浪潮软件集团有限公司 Docker-based continuous integration method

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9015664B2 (en) * 2012-05-16 2015-04-21 International Business Machines Corporation Automated tagging and tracking of defect codes based on customer problem management record

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104793946A (en) * 2015-04-27 2015-07-22 广州杰赛科技股份有限公司 Application deployment method and system based on cloud computing platform
CN105760167A (en) * 2016-02-23 2016-07-13 浪潮软件集团有限公司 Docker-based continuous integration method

Also Published As

Publication number Publication date
CN106775760A (en) 2017-05-31

Similar Documents

Publication Publication Date Title
CN106775760B (en) Method and system for uploading container mirror image to mirror image warehouse based on source code warehouse
US20220179682A1 (en) Task processing method, apparatus, and system based on distributed system
US9311064B1 (en) Systems and methods for automated centralized build/merge management
CN111831420A (en) Method and device for task scheduling, electronic equipment and computer-readable storage medium
US20140181145A1 (en) Modular Software System for Use in an Integration Software Technology and Method of Use
CN110222119B (en) Data conversion synchronization method, equipment and storage medium for heterogeneous database
US9519537B2 (en) Apparatus, system and method for application log data processing
CN111651471A (en) Target data query method and device, electronic equipment and storage medium
KR102553440B1 (en) Serverless development support platform
CN108052336A (en) A kind of distributed software upgrade-system and its implementation
CN108268308A (en) A kind of continuous integrating method, system and device based on container platform
CN113515297A (en) Version updating method and device, electronic equipment and storage medium
CN102467520A (en) Data storage method and device
CN110245059B (en) Data processing method, device and storage medium
US20180189039A1 (en) Automatic generation of manual coding suggestions for conversion of application programs to off-line environment
CN112540837B (en) Service processing component calling method, system, electronic equipment and storage medium
US20180189038A1 (en) Automatic conversion of application program code listing segments for off-line environment
CN113760491A (en) Task scheduling system, method, equipment and storage medium
CN116298340A (en) Product defect detection method and system based on task scheduling
CN115826980A (en) Data processing method, data processing device, storage medium and electronic equipment
CN111866137B (en) Data acquisition dynamic control method and device, electronic equipment and medium
CN114237982A (en) System disaster recovery switching method, device, equipment and storage medium
CN113672507A (en) Software source code detection method and device, computer equipment and storage medium
CN111381833A (en) Containerized openstack data initialization method
US11953995B1 (en) Centralized data backup platform supporting multiple data environments

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
TR01 Transfer of patent right

Effective date of registration: 20200519

Address after: 250100 No. 1036 Tidal Road, Jinan High-tech Zone, Shandong Province, S01 Building, Tidal Science Park

Patentee after: Tidal Cloud Information Technology Co.,Ltd.

Address before: 450000 Henan province Zheng Dong New District of Zhengzhou City Xinyi Road No. 278 16 floor room 1601

Patentee before: ZHENGZHOU YUNHAI INFORMATION TECHNOLOGY Co.,Ltd.

TR01 Transfer of patent right
CP01 Change in the name or title of a patent holder

Address after: 250100 No. 1036 Tidal Road, Jinan High-tech Zone, Shandong Province, S01 Building, Tidal Science Park

Patentee after: Inspur cloud Information Technology Co., Ltd

Address before: 250100 No. 1036 Tidal Road, Jinan High-tech Zone, Shandong Province, S01 Building, Tidal Science Park

Patentee before: Tidal Cloud Information Technology Co.,Ltd.

CP01 Change in the name or title of a patent holder