CN112363728B - Cross-platform compiling method and system supporting continuous integrated construction - Google Patents

Cross-platform compiling method and system supporting continuous integrated construction Download PDF

Info

Publication number
CN112363728B
CN112363728B CN202011307807.1A CN202011307807A CN112363728B CN 112363728 B CN112363728 B CN 112363728B CN 202011307807 A CN202011307807 A CN 202011307807A CN 112363728 B CN112363728 B CN 112363728B
Authority
CN
China
Prior art keywords
compiling
platform
cross
integrated
construction
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
CN202011307807.1A
Other languages
Chinese (zh)
Other versions
CN112363728A (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 Software Technology Co Ltd
Original Assignee
Inspur Software 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 Inspur Software Technology Co Ltd filed Critical Inspur Software Technology Co Ltd
Priority to CN202011307807.1A priority Critical patent/CN112363728B/en
Publication of CN112363728A publication Critical patent/CN112363728A/en
Application granted granted Critical
Publication of CN112363728B publication Critical patent/CN112363728B/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/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
    • 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)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Security & Cryptography (AREA)
  • Stored Programmes (AREA)

Abstract

The invention discloses a cross-platform compiling method and system supporting continuous integrated construction, and relates to the field of virtualization and construction service calculation; providing a code version management tool based on Git through a Gitlab, customizing a continuous construction flow through the Gitlab-ci.yaml, configuring a commit event triggering callback hook through an external integration mode, integrating and calling an external service middleware, preparing and providing a virtualized integrated compiling environment meeting a corresponding platform through the external service middleware according to configuration requirements or a policy-based mode, and performing cross-platform compiling under the corresponding virtualized integrated compiling environment.

Description

Cross-platform compiling method and system supporting continuous integrated construction
Technical Field
The invention discloses a method and a system, relates to the field of virtualization and construction service computing, and particularly relates to a cross-platform compiling method and system supporting continuous integrated construction.
Background
The edge computing field is oriented to various hardware architectures (X86, ARM, aarch64, etc.), needs to provide a specific environment for application programs compiled and deployed by a specific platform, and currently, no method for realizing automatic continuous integrated construction and deployment in a specific compiling platform environment by developing an edge service application program in a unified platform exists.
Disclosure of Invention
Aiming at the problems in the prior art, the invention provides a cross-platform compiling method and system supporting continuous integrated construction, provides a configurable and policy-based service middleware based on a compiling platform and combined with continuous construction service (Gitlab CI), and realizes the continuous integration with cross-platform compiling capability and the construction of deployment service.
The specific scheme provided by the invention is as follows:
a cross-platform compiling method supporting continuous integrated construction comprises the following steps: providing a code version management tool based on Git through a Gitlab, customizing a continuous construction flow through the Gitlab-ci.yaml, configuring a commit event triggering callback hook through an external integration mode, integrating and calling an external service middleware, preparing and providing a virtualized integrated compiling environment meeting a corresponding platform through the external service middleware according to configuration requirements or a policy-based mode, and performing cross-platform compiling under the corresponding virtualized integrated compiling environment.
Preferably, in the cross-platform compiling method supporting continuous integrated construction, the external service middleware refers to callback information content of a submitting event, analyzes a compiling platform and configuration requirements corresponding to source codes in the submitting event, and prepares a virtualized integrated compiling environment corresponding to the platform according to the configuration requirements.
Preferably, in the cross-platform compiling method supporting continuous integrated construction, a virtualized integrated compiling environment of a corresponding platform is prepared:
preparing a virtualized integrated compiling environment of a corresponding platform according to the specified information by referring to the configuration requirement;
or preparing the virtualized integrated compiling environment according to callback information of the submitted event and combining a default combination mode prefabricated by the corresponding platform based on the strategy.
Preferably, in the cross-platform compiling method supporting continuous integrated construction, the external service middleware is utilized to perform cross-platform compiling under the corresponding virtualized integrated compiling environment:
creating a virtual machine in a dynamic mode, installing a cross compiling tool set of a project source code target architecture, and performing cross compiling;
and/or creating a project source code target architecture virtual machine in a QEMU mode, and compiling in a virtual target environment.
Preferably, in the cross-platform compiling method supporting continuous integrated construction, a corresponding platform is compiled in a mirror image mode by combining QEMU-user-static instances created by QEMU and binfmt_misc through a Docker enhanced construction mode.
Preferably, in the cross-platform compiling method supporting continuous integrated construction, an external service middleware is utilized to provide searching, customizing and maintaining management services in a compiling process.
Preferably, in the cross-platform compiling method supporting continuous integration construction, an external service middleware is utilized to feed back information of a compiling process, and the feedback information is reflected in a log of a Gitlab continuous construction integration process.
A cross-platform compiling system supporting continuous integrated construction comprises a management module and a middleware module,
the management module provides a code version management tool based on Git through a Gitlab, the continuous construction flow is customized through the Gitlab-ci.yaml, a commit event triggering callback hook is configured through an external integration mode, an external service middleware of the middleware module is integrated and called, the middleware module prepares and provides a virtualized integrated compiling environment meeting a corresponding platform through the external service middleware according to configuration requirements or a policy-based mode, and cross-platform compiling is carried out under the corresponding virtualized integrated compiling environment.
A cross-platform compilation device supporting continuous integration construction, comprising: at least one memory and at least one processor;
the at least one memory for storing a machine readable program;
the at least one processor is configured to invoke the machine-readable program and execute the cross-platform compilation method supporting continuous integration construction.
The invention has the advantages that:
the invention provides a cross-platform compiling method supporting continuous integrated construction, which is based on cross-platform compiling service middleware, combines a continuous integrated construction process, realizes that a warehouse source code appoints a platform environment to complete compiling based on a configuration and strategy mode, can meet the requirement of developing an edge service node application program on a unified platform, realizes compiling through a specific platform environment, and completes an automatic continuous integrated construction and deployment process of application delivery. And supplementing the DevOps cross-platform continuous compiling integrated short board, opening up an automatic processing flow of directly deploying the application by the edge side equipment, and realizing complete cloud edge collaborative integration continuous compiling construction service flow business.
Drawings
FIG. 1 is a schematic flow chart of the method of the invention.
Detailed Description
The present invention will be further described with reference to the accompanying drawings and specific examples, which are not intended to be limiting, so that those skilled in the art will better understand the invention and practice it.
The invention provides a cross-platform compiling method supporting continuous integrated construction, which comprises the following steps: providing a code version management tool based on Git through a Gitlab, customizing a continuous construction flow through the Gitlab-ci.yaml, configuring a commit event triggering callback hook through an external integration mode, integrating and calling an external service middleware, preparing and providing a virtualized integrated compiling environment meeting a corresponding platform through the external service middleware according to configuration requirements or a policy-based mode, and performing cross-platform compiling under the corresponding virtualized integrated compiling environment.
Continuous integration construction is an essential feature of DevOps. The method comprises the steps of taking Gitlab as a mainstream code version management tool, combining a code submitting event callback hook, realizing integration of external service middleware, triggering and submitting specific construction information provided by the event callback hook according to a configuration or policy-based cross-platform compiling service middleware from a user submitting code to a Gitlab code warehouse, combining user configuration and policy definition, selecting an optimal combination scheme meeting a current cross-platform construction request to complete compiling, pushing a compiling result to a product warehouse according to a delivery form (binary system, docker mirror image and the like) appointed by a user, and realizing the whole continuous construction flow.
In particular applications, in some embodiments of the present invention, a user may create items in a Gitlab code repository, clone the repository into a local environment, provide source code and configuration information required for compilation, create a Gitlab-ci.yaml in a source code repository root directory, refer to a document writing specification, provide a compilation process script, specify information such as a target compilation environment tag, etc., the target compilation environment satisfies the format and requirements defined by the cross-platform compilation service middleware,
when the method is executed, the external integration item provided by the Gitlab code warehouse is configured with callback hooks according to submitted events, submitted events are selected, meanwhile, the service URL is configured to be an API published by the cross-platform compiling service middleware, the external service middleware provides a processing process for analyzing callback hook information of the code submitted events, and the compiling platform and the configuration requirements corresponding to the submitted source code are analyzed according to the content of the callback information.
The cross-platform compiling service has two forms, namely configuration and strategy based compiling platform environment for preparing specific configuration requirements:
reference is made to user configuration. The target compilation platform environment is prepared in accordance with information explicitly specified by the user.
Or based on policies. And preparing the target compiling platform environment according to the submitted callback information and combining a default combination mode of platform prefabrication.
The external service middleware is provided with a most reasonable cross-platform compiling mode according to configuration, resources and compiling history records:
virtual machines (such as x86 architecture) can be created in a dynamic mode, and cross compiling tool sets of project source code target architecture are installed to realize cross compiling;
and/or creating a project source code target architecture virtual machine in a QEMU mode, and compiling in a virtual target environment. The QEMU is a Linux hardware virtualization program, a binary conversion program is registered in a Linux kernel by using binfmt_misc, a binary file is dynamically translated when the program runs, and a system call is converted from a target architecture to a current system CPU architecture according to requirements.
The target platform compiling can be realized in a mirror image mode by combining QEMU-user-static instances created by QEMU and binfmt_misc through a Docker enhancement construction mode. The compilation environment prepares a particular Docker version and operating system kernel version, implemented by a cross-platform compilation service middleware that provides for creation of a particular virtual machine (e.g., x86 architecture) according to a scheme.
Based on the above embodiment, the external service middleware may further provide basic services such as compiling service policy retrieval, customization, maintenance management, and the like:
a. the supported cross-platform compiled service mapping configuration information data may be retrieved.
b. A specific cross-platform cross-compilation tool set or resource link address may be newly created and uploaded.
c. Configuration file resources may be specified according to a particular compilation environment, and the configuration file may be uploaded to build the particular cross-platform compilation environment.
d. Policies may be customized. And analyzing source code information, and automatically selecting and creating a cross-platform compiling environment.
And the external service middleware can support various finished product packaging and distribution treatment schemes:
a. binary fashion. Pushing the information to a product library and feeding back the resource downloading link information.
Dock mirror mode. Pushing to a mirror Registry repository and providing resource URI information.
c. And (5) a virtual machine packing mode. Pushing the virtual machine platform service to a virtual machine storage product library, and supporting a user to start the virtual machine platform service on another virtual machine management platform.
For better compilation and continuous integration, the service middleware also supports full-flow information feedback. The feedback content can be applied to the Gitlab continuous construction integration process log:
a. feedback of user configuration and policy application procedures.
b. And (3) a virtualized environment construction process, wherein the specific platform tool log output records are redirected uniformly.
c. And in the uploading process of the finished product, the log output records of the tool of the specific platform are redirected uniformly.
In summary, the Gitlab is taken as a basic service for providing continuous integrated construction, based on code versioning management and programmable continuous construction integrated service, a user-defined processing procedure content list required by a continuous construction procedure can be provided through a Gitlab-ci.yaml document managed by a code warehouse, and the list can contain information such as a customized construction procedure script, external resource information, a designated construction environment label and the like, so that a designated construction environment is realized, and the continuous construction procedure of the construction script is executed.
The invention also provides a cross-platform compiling system supporting continuous integrated construction, which comprises a management module and a middleware module,
the management module provides a code version management tool based on Git through a Gitlab, the continuous construction flow is customized through the Gitlab-ci.yaml, a commit event triggering callback hook is configured through an external integration mode, an external service middleware of the middleware module is integrated and called, the middleware module prepares and provides a virtualized integrated compiling environment meeting a corresponding platform through the external service middleware according to configuration requirements or a policy-based mode, and cross-platform compiling is carried out under the corresponding virtualized integrated compiling environment. The content of information interaction and execution process between the modules in the system is based on the same concept as the method embodiment of the present invention, and specific content can be referred to the description in the method embodiment of the present invention, which is not repeated here.
The invention also provides a cross-platform compiling device supporting continuous integrated construction, which comprises: at least one memory and at least one processor;
the at least one memory for storing a machine readable program;
the at least one processor is configured to invoke the machine-readable program and execute the cross-platform compilation method supporting continuous integration construction.
The content of the information interaction and the readable program in the executing process of the processor in the device is based on the same concept as the embodiment of the method of the present invention, and the specific content can be referred to the description in the embodiment of the method of the present invention, which is not repeated here.
It should be noted that, in the above preferred embodiments, not all steps and modules in each flow and each system and device structure are necessary, and some steps or modules may be omitted according to actual needs. The execution sequence of the steps is not fixed and can be adjusted as required. The system structure described in the above embodiments may be a physical structure or a logical structure, that is, some modules may be implemented by the same physical entity, or some modules may be implemented by multiple physical entities, or may be implemented jointly by some components in multiple independent devices.
The above-described embodiments are merely preferred embodiments for fully explaining the present invention, and the scope of the present invention is not limited thereto. Equivalent substitutions and modifications will occur to those skilled in the art based on the present invention, and are intended to be within the scope of the present invention. The protection scope of the invention is subject to the claims.

Claims (8)

1. A cross-platform compiling method supporting continuous integrated construction is characterized in that a code version management tool based on Git is provided through a Gitlab, a continuous construction flow is customized through the Gitlab-ci.yaml, a commit event triggers a callback hook is configured through an external integration mode, an external service middleware is integrated and called, a virtualized integrated compiling environment meeting a corresponding platform is prepared and provided through the external service middleware according to configuration requirements or a policy-based mode, cross-platform compiling is carried out under the corresponding virtualized integrated compiling environment, and the method comprises the steps of:
preparing a virtualized integrated compiling environment of a corresponding platform according to information explicitly specified by a user by referring to configuration requirements;
or based on a policy form, preparing the virtualized integrated compiling environment according to callback information of the submitted event and combining a default combination mode prefabricated by the corresponding platform.
2. The cross-platform compiling method supporting continuous integrated construction according to claim 1, wherein the external service middleware is used for analyzing compiling platforms and configuration requirements corresponding to source codes in submitting events by referring to callback information content of the submitting events, and preparing virtualized integrated compiling environments of the corresponding platforms according to the configuration requirements.
3. The cross-platform compiling method supporting continuous integrated construction according to claim 1, wherein the cross-platform compiling is performed by using an external service middleware under a corresponding virtualized integrated compiling environment:
creating a virtual machine in a dynamic mode, installing a cross compiling tool set of a project source code target architecture, and performing cross compiling;
and/or creating a project source code target architecture virtual machine in a QEMU mode, and compiling in a virtual target environment.
4. The cross-platform compiling method supporting continuous integrated construction according to claim 3, wherein the compiling of the corresponding platform is carried out in a mirror image mode by combining QEMU-user-static instances created by QEMU and binfmt_misc through a Docker enhanced construction mode.
5. A cross-platform compilation method supporting continuous integration construction according to any of claims 1-4, wherein the external service middleware is utilized to provide retrieval, customization and maintenance management services during compilation.
6. The cross-platform compiling method supporting continuous integration construction according to claim 5, wherein the compiling process information feedback is performed by using an external service middleware, and the feedback information is reflected in a log of the continuous integration construction integration process of the Gitlab.
7. A cross-platform compiling system supporting continuous integrated construction is characterized by comprising a management module and a middleware module,
the management module provides a code version management tool based on Git through a Gitlab, a continuous construction flow is customized through the Gitlab-ci.yaml, a commit event triggering callback hook is configured through an external integration mode, an external service middleware of the middleware module is integrated and called, the middleware module prepares and provides a virtualized integrated compiling environment meeting a corresponding platform through the external service middleware according to configuration requirements or a policy-based mode, cross-platform compiling is carried out under the corresponding virtualized integrated compiling environment, and the middleware module prepares the virtualized integrated compiling environment of the corresponding platform and comprises the following steps:
preparing a virtualized integrated compiling environment of a corresponding platform according to information explicitly specified by a user by referring to configuration requirements;
or based on a policy form, preparing the virtualized integrated compiling environment according to callback information of the submitted event and combining a default combination mode prefabricated by the corresponding platform.
8. A cross-platform compiling device supporting continuous integrated construction is characterized by comprising: at least one memory and at least one processor;
the at least one memory for storing a machine readable program;
the at least one processor configured to invoke the machine readable program to perform a cross-platform compilation method supporting continuous integration construction of any of claims 1-6.
CN202011307807.1A 2020-11-20 2020-11-20 Cross-platform compiling method and system supporting continuous integrated construction Active CN112363728B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011307807.1A CN112363728B (en) 2020-11-20 2020-11-20 Cross-platform compiling method and system supporting continuous integrated construction

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011307807.1A CN112363728B (en) 2020-11-20 2020-11-20 Cross-platform compiling method and system supporting continuous integrated construction

Publications (2)

Publication Number Publication Date
CN112363728A CN112363728A (en) 2021-02-12
CN112363728B true CN112363728B (en) 2023-07-18

Family

ID=74532679

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011307807.1A Active CN112363728B (en) 2020-11-20 2020-11-20 Cross-platform compiling method and system supporting continuous integrated construction

Country Status (1)

Country Link
CN (1) CN112363728B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114168153B (en) * 2022-02-10 2022-05-20 统信软件技术有限公司 Compiling method, computing device and storage medium
CN115756514A (en) * 2022-11-14 2023-03-07 中国电子科技集团公司第十五研究所 Software automation compiling method and system

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109582316A (en) * 2018-11-15 2019-04-05 北京深思数盾科技股份有限公司 A kind of cross-platform Compilation Method, device, system, server and storage medium
CN111143029A (en) * 2019-12-19 2020-05-12 浪潮软件股份有限公司 Method for realizing consistent and automatic telescopic continuous construction environment of virtual machine based on Gitlab-CI callback integration
CN111610974A (en) * 2019-02-26 2020-09-01 中国科学院沈阳自动化研究所 Cross-system platform compiling method facing edge calculation

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11281763B2 (en) * 2018-11-13 2022-03-22 Microsoft Technology Licensing, Llc Integrated development environment information sharing for authentication provisioning

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109582316A (en) * 2018-11-15 2019-04-05 北京深思数盾科技股份有限公司 A kind of cross-platform Compilation Method, device, system, server and storage medium
CN111610974A (en) * 2019-02-26 2020-09-01 中国科学院沈阳自动化研究所 Cross-system platform compiling method facing edge calculation
CN111143029A (en) * 2019-12-19 2020-05-12 浪潮软件股份有限公司 Method for realizing consistent and automatic telescopic continuous construction environment of virtual machine based on Gitlab-CI callback integration

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
基于容器技术的智慧校园大数据平台持续集成研究;贺宗平;张晓东;曹萍;;智能计算机与应用(第05期);41-43 *

Also Published As

Publication number Publication date
CN112363728A (en) 2021-02-12

Similar Documents

Publication Publication Date Title
KR102370568B1 (en) Containerized deployment of microservices based on monolithic legacy applications
US9996323B2 (en) Methods and systems for utilizing bytecode in an on-demand service environment including providing multi-tenant runtime environments and systems
EP2098955B1 (en) Dynamic resolution of dependent components
US8495622B2 (en) Micro installation process for software packaging and distribution
US6003095A (en) Apparatus and method for demand loading a dynamic link library
US8738589B2 (en) Classloading technique for an application server that provides dependency enforcement
CN112363728B (en) Cross-platform compiling method and system supporting continuous integrated construction
US10838745B2 (en) Loading dependency library files from a shared library repository in an application runtime environment
US11748073B2 (en) Robotic process automation system with a command action logic independent execution environment
CN104750528A (en) Management method and device for components in Android program
US20230092214A1 (en) Container-oriented linux kernel virtualizing system and method thereof
CN107133055B (en) Method for realizing customized development based on ClassLoader
CN104699503A (en) Method and device for replacing function execution logic in Android system
CN108376074B (en) RancherOS ros core module transplanting method based on embedded system
US20180341475A1 (en) Just In Time Deployment with Package Managers
KR101083090B1 (en) Mobile terminal with mobile platform comprising structure of functional modularization, method for driving the mobile platform and managing idle application
US11720374B1 (en) Dynamically overriding a function based on a capability set
US11900091B2 (en) Extensible upgrade and modification as a service
US20230385075A1 (en) Networked Universal Code Package Provider
US10853040B2 (en) Address space splitting for legacy application compatibility
CN113986207A (en) Software architecture generating and calling method and device
WO2023154092A1 (en) Dynamically overriding a function based on a capability set during load time
CN116107688A (en) Method, device, equipment and medium for deploying application
CN116028067A (en) Application deployment method and device, electronic equipment and readable storage medium
CN116893844A (en) Data sharing system, device for constructing release version of operating system and method thereof

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