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

CN116149728A - CI/CD assembly conversion method and device - Google Patents

CI/CD assembly conversion method and device Download PDF

Info

Publication number
CN116149728A
CN116149728A CN202310163698.8A CN202310163698A CN116149728A CN 116149728 A CN116149728 A CN 116149728A CN 202310163698 A CN202310163698 A CN 202310163698A CN 116149728 A CN116149728 A CN 116149728A
Authority
CN
China
Prior art keywords
components
unified model
field
tool
development operation
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202310163698.8A
Other languages
Chinese (zh)
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.)
Jingdong Technology Information Technology Co Ltd
Original Assignee
Jingdong Technology 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 Jingdong Technology Information Technology Co Ltd filed Critical Jingdong Technology Information Technology Co Ltd
Priority to CN202310163698.8A priority Critical patent/CN116149728A/en
Publication of CN116149728A publication Critical patent/CN116149728A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/76Adapting program code to run in a different environment; Porting
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/901Indexing; Data structures therefor; Storage structures
    • G06F16/9017Indexing; Data structures therefor; Storage structures using directory or table look-up
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/903Querying
    • G06F16/90335Query processing
    • 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)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • Computational Linguistics (AREA)
  • Stored Programmes (AREA)

Abstract

The embodiment of the disclosure discloses a CI/CD assembly conversion method and a CI/CD assembly conversion device. The specific implementation mode of the method comprises the following steps: acquiring a first field mapping table of an original development operation and maintenance tool and a unified model and a second field mapping table of a target development operation and maintenance tool and the unified model; calling an API interface of the original development operation and maintenance tool to migrate the component data of the original development operation and maintenance tool to a database; converting the field names of the components in the component data of the original development operation tool into field names of the components of the unified model according to the first field mapping table; receiving CI/CD operation of a user through an API interface of a unified model; and reading the component data of the unified model from the database, converting the field names of the components of the unified model in the component data of the unified model into the field names of the components of the target development and operation tool according to the second field mapping table, and calling an API (application program interface) of the target development and operation tool to perform CI/CD (compact disc) operation. This embodiment enables conversion between a variety of CI/CD components.

Description

CI/CD assembly conversion method and device
Technical Field
The embodiment of the disclosure relates to the field of computer technology, in particular to a CI/CD assembly conversion method and device.
Background
The CICD DevOps has the characteristics of the most core, mainly solves the problems of compiling, publishing, deploying and the like in the software development process, is realized through a technical means, and improves the efficiency of software development. There are many solutions for CICD at present, such as: jenkins, tekton, gitLab CI/CD, etc.
The existing technical schemes aiming at CICD are quite many, but when the problems of compiling, publishing, deploying and the like are solved, the terms used by various technical schemes are different, and each technical scheme has a set of definition, for example:
definition of Jenkins:
(https://www.jenkins.io/zh/doc/book/pipeline/#stage)
pipeline: the pipeline is a user-defined model of a CD pipeline. The code of the pipeline defines the entire build process, which typically includes stages for building, testing, and delivering applications.
Node: a machine that is part of the Jenkins environment and is capable of executing a pipeline.
Stage: conceptually different subsets (e.g., the "Build" phase) of execution tasks throughout the pipeline are defined
Step: a single task, a step, tells Jenkins what to do at a particular point in time
Trigger: trigger condition
Definition of Tekton: (https:// juejin. Cn/post/6971329329472995336)
Step: a step to be executed in the task
Task: a series of steps are defined that will initiate a particular build or delivery tool. These tools receive specific inputs and generate specific outputs.
Pipeline: a series of tasks is defined to accomplish a particular build or delivery objective.
PipelineRun: a Pipeline is instantiated and executed according to the specified input and output and execution parameters.
PipelineResource: the locations in each step Task at which the input is extracted and the output is generated are defined.
Trigger: trigger condition
Definitions of Github Actions:
(https://docs.github.com/cn/actions/learn-github-actions/understand ing-github-actions)
step: task execution, e.g. executing a shell script
Job: defining a task consisting of one or more steps
Workflow: the workflow is composed of one or more jobs, which can be triggered by an event
Workflow run: configuration event triggered workflow instance running
Event: trigger condition
Runner: a machine that is running.
From the above examples the following problems can be found:
1. there is no unified business model formed between the various technologies
2. The individuation among various technologies is strong, the replacement is troublesome, and the replacement cost is high. Such as:
the initial use is that jenkins perform CICD, later want to change to Github Actions, want to change to trouble and cost.
Disclosure of Invention
The embodiment of the disclosure provides a CI/CD assembly conversion method and device.
In a first aspect, embodiments of the present disclosure provide a method for continuously integrating CI/continuously deploying CD component conversion, including: responding to a received request of converting the original development operation tool into the target development operation tool, and acquiring a first field mapping table of the original development operation tool and the unified model and a second field mapping table of the target development operation tool and the unified model; calling an API interface of the original development operation and maintenance tool to migrate the component data of the original development operation and maintenance tool to a database; converting the field names of the components in the component data of the original development operation tool into the field names of the components of the unified model according to the first field mapping table; receiving CI/CD operation of a user through an API interface of a unified model; and reading the component data of the unified model from the database, converting the field names of the components of the unified model in the component data of the unified model into the field names of the components of the target development operation and maintenance tool according to the second field mapping table, and calling an API (application program interface) of the target development operation and maintenance tool to perform CI/CD (compact disc) operation.
In some embodiments, the first field mapping table is generated by: analyzing a manual of the original development operation and maintenance tool to determine functions of components of the original development operation and maintenance tool; acquiring the function of a component of a predefined unified model; and mapping field names of components of the original development operation tool with the same function and field names of components of the unified model to obtain a first field mapping table.
In some embodiments, the second field mapping table is generated by: analyzing a manual of the target development operation and maintenance tool, and determining functions of components of the target development operation and maintenance tool; acquiring the function of a component of a predefined unified model; and mapping field names of components of the target development operation tool and the field names of components of the unified model of the same function to obtain a second field mapping table.
In some embodiments, the method further comprises: in response to detecting a version change of the development maintenance tool, analyzing a manual of the development maintenance tool to determine if the function is changed; if the function is newly added, defining a field name of the component for the newly added function in the unified model; and mapping field names of components of the development operation tool of the newly added function and field names of components of the unified model, and updating field mapping tables of the development operation tool and the unified model.
In some embodiments, the method further comprises: if the functions are reduced, the field names of the components corresponding to the reduced functions are deleted in a field mapping table of the development operation and maintenance tool and the unified model.
In some embodiments, the method further comprises: if the function is modified, the field names of the components of the unified model and the field names of the components of the development tool that modified the function are remapped.
In some embodiments, the method further comprises: in response to receiving the field mapping table query request, a field mapping table of the launch operation and maintenance tool and the unified model is output.
In a second aspect, embodiments of the present disclosure provide a continuously integrated CI/continuously deployed CD-component conversion apparatus comprising: the configuration storage module is configured to respond to the received request of converting the original development operation tool into the target development operation tool, and acquire a first field mapping table of the original development operation tool and the unified model and a second field mapping table of the target development operation tool and the unified model; the data importing module is configured to call an API (application program interface) of the original development and maintenance tool to migrate the component data of the original development and maintenance tool into the database; a field configuration conversion module configured to convert field names of components in the component data of the original development operation and maintenance tool into field names of components of a unified model according to the first field mapping table; the external API module is configured to receive CI/CD operation of a user through an API interface of the unified model; and the business processing module is configured to read the component data of the unified model from the database, convert the field names of the components of the unified model in the component data of the unified model into the field names of the components of the target development operation and maintenance tool according to the second field mapping table, and call the API interface of the target development operation and maintenance tool to perform CI/CD operation.
In some embodiments, the apparatus further comprises a unified model module configured to: analyzing a manual of the original development operation and maintenance tool to determine functions of components of the original development operation and maintenance tool; acquiring the function of a component of a predefined unified model; and mapping field names of components of the original development operation tool with the same function and field names of components of the unified model to obtain a first field mapping table.
In some embodiments, the apparatus further comprises a unified model module configured to: analyzing a manual of the target development operation and maintenance tool, and determining functions of components of the target development operation and maintenance tool; acquiring the function of a component of a predefined unified model; and mapping field names of components of the target development operation tool and the field names of components of the unified model of the same function to obtain a second field mapping table.
In some embodiments, the apparatus further comprises a data storage module configured to: in response to detecting a version change of the development maintenance tool, analyzing a manual of the development maintenance tool to determine if the function is changed; if the function is newly added, defining a field name of the component for the newly added function in the unified model; and mapping field names of components of the development operation tool of the newly added function and field names of components of the unified model, and updating field mapping tables of the development operation tool and the unified model.
In some embodiments, the data storage module is further configured to: if the functions are reduced, the field names of the components corresponding to the reduced functions are deleted in a field mapping table of the development operation and maintenance tool and the unified model.
In some embodiments, the data storage module is further configured to: if the function is modified, the field names of the components of the unified model and the field names of the components of the development tool that modified the function are remapped.
In some embodiments, the data storage module is further configured to: in response to receiving the field mapping table query request, a field mapping table of the launch operation and maintenance tool and the unified model is output.
In a third aspect, embodiments of the present disclosure provide an electronic device for continuous integrated CI/continuous deployment of CD component conversion, comprising: one or more processors; a storage device having one or more computer programs stored thereon, which when executed by the one or more processors, cause the one or more processors to implement the method of the first aspect.
In a fourth aspect, embodiments of the present disclosure provide a computer readable medium having a computer program stored thereon, wherein the computer program when executed by a processor implements the method of the first aspect.
The method and the device for continuously integrating CI/continuously deploying CD components provided by the embodiment of the disclosure unify business models related in CI/CD in a field mapping mode, realize low-cost replacement between CI/CD components and mainly support the following functions:
1. a unified CI/CD model is provided.
2. The field mapping conversion configuration function supports different components to be converted to a unified model in a configuration mode.
3. And the migration function is used for migrating and converting the data of the existing component to a unified model through the field conversion function.
Drawings
Other features, objects and advantages of the present disclosure will become more apparent upon reading of the detailed description of non-limiting embodiments, made with reference to the following drawings:
FIG. 1 is an exemplary system architecture diagram in which an embodiment of the present disclosure may be applied;
FIG. 2 is a flow chart of one embodiment of a CI/CD assembly conversion method according to the present disclosure;
FIG. 3 is a schematic diagram of one application scenario of the CI/CD assembly transition method according to the present disclosure;
FIG. 4 is a flow chart of yet another embodiment of a CI/CD assembly conversion method according to the present disclosure;
FIG. 5 is a schematic structural view of one embodiment of a CI/CD assembly conversion device according to the present disclosure;
fig. 6 is a schematic diagram of a computer system suitable for use in implementing embodiments of the present disclosure.
Detailed Description
The present disclosure is described in further detail below with reference to the drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the invention and are not limiting of the invention. It should be noted that, for convenience of description, only the portions related to the present invention are shown in the drawings.
It should be noted that, without conflict, the embodiments of the present disclosure and features of the embodiments may be combined with each other. The present disclosure will be described in detail below with reference to the accompanying drawings in conjunction with embodiments.
FIG. 1 illustrates an exemplary system architecture to which embodiments of the present disclosure of the continuously integrated CI/continuously deployed CD component conversion method and apparatus may be applied.
As shown in fig. 1, the system architecture may include a server, a database, and a component layer, where the server includes an external API module, a unified model module, a data importing module, a data storage module, a field configuration conversion module, a configuration saving module, and a service processing module, where the functions of the modules are as follows:
external API module: providing unified API interface to the outside and providing service capability
And a unified model module: abstract the related functions of CICD into unified data model
And a data importing module: for data migration, migrating data of an already existing component to our database
And a data storage module: data augmentation, deletion, and investigation operations
A field configuration conversion module: converting data of each component into a unified data model according to configuration
Configuration saving module: saving the field mapping relation of the component and our unified model
And a service processing module: and a business module for processing CICD functions.
The database may be a Mogodb, mysql, or the like database.
The component layer may include: components such as Tektons, jenkins, gitHub Actions, etc.
It should be noted that, the CI/CD module conversion method provided by the embodiments of the present disclosure is generally executed by a server, and accordingly, the CI/CD module conversion device is generally disposed in the server.
It should be understood that the number of servers, databases, components in FIG. 1 are merely illustrative. There may be any number of servers, databases, components, as desired for implementation.
With continued reference to FIG. 2, a flow 200 of one embodiment of a CI/CD assembly conversion method according to the present disclosure is shown. The CI/CD assembly conversion method comprises the following steps:
in step 201, in response to receiving a request from the original development tool to convert to the target development tool, a first field mapping table of the original development tool and the unified model and a second field mapping table of the target development tool and the unified model are obtained.
In this embodiment, the executing body of the CI/CD component conversion method (e.g., the server shown in fig. 1) may receive a request for converting an original development tool (e.g., tektons) into a target development tool (e.g., jenkins) from a terminal with which the user performs CI/CD component conversion through a wired connection or a wireless connection. The server may provide a web interface for the user to enter the name of the original development tool and the name of the target development tool. The application provides a unified model, and each component of the unified model can correspond to various development operation tools, and only components with the same function are named uniformly. A field mapping table between the components of the unified model and the components of each development and maintenance tool is pre-generated. In order to distinguish the mapping tables of different development tools and unified models, the mapping table of the original development tools and the unified models is named as a first field mapping table, and the mapping table of the target development tools and the unified models is named as a second field mapping table.
Field mapping relationship example:
Figure BDA0004096327520000071
Figure BDA0004096327520000081
definition description:
the steps are as follows: minimum units to perform tasks, such as: executing a shell script
Tasks: multiple steps constitute a task such as: compiling a Java package
And (3) pipeline: consists of a number of tasks such as: in a designated k8s cluster, a container is deployed
A trigger: mechanism for triggering pipeline operation
An execution machine: running machine, machine for executing each pipeline
Step 202, calling an API interface of the original development operation and maintenance tool to migrate the component data of the original development operation and maintenance tool to a database.
In this embodiment, the component data may be history data or newly received unprocessed data. The component data is imported into a server-managed database.
Step 203, converting the field names of the components in the component data of the original development operation tool into the field names of the components of the unified model according to the first field mapping table.
In this embodiment, the field names of the components in the component data of the original development and maintenance tool are renamed according to the first field mapping table, and the field names of the components in the component data of all the development and maintenance tools are corresponding to the field names of the components of the unified model.
Step 204, the receiving user performs CI/CD operation through the API interface of the unified model.
In this embodiment, the unified model of the present application provides an external API interface that a user can call to perform CI/CD operations. In fact, the application only encapsulates the component name, and the calling component is still the component of the development and operation tool in the prior art.
And 205, reading the component data of the unified model from the database, converting the field names of the components of the unified model in the component data of the unified model into the field names of the components of the target development and maintenance tool according to the second field mapping table, and calling an API interface of the target development and maintenance tool to perform CI/CD operation.
In this embodiment, since the user wants to use the target development tool, the field names of the unified model need to be converted into the field names of the components of the target development tool, and then the API interface of the target development tool is called for CI/CD operation.
The method provided by the embodiment of the present disclosure unifies the business models involved in the CI/CD by means of field mapping, realizes low-cost replacement between CI/CD components, and mainly supports the following functions:
1. a unified CI/CD model is provided.
2. The field mapping conversion configuration function supports different components to be converted to a unified model in a configuration mode.
3. And the migration function is used for migrating and converting the data of the existing component to a unified model through the field conversion function.
In some optional implementations of this embodiment, the first field mapping table is generated by: analyzing a manual of the original development operation and maintenance tool to determine functions of components of the original development operation and maintenance tool; acquiring the function of a component of a predefined unified model; and mapping field names of components of the original development operation tool with the same function and field names of components of the unified model to obtain a first field mapping table. Semantic analysis can be performed through a neural network model, and the names and corresponding functions of the components are extracted from the instruction manual. Some application manual can be used as a sample to train a model in advance, the trained model is used for carrying out semantic analysis on the application manual of the original operation and maintenance tool, which fields are names of components are determined first, then the functions of the components are analyzed from the specification, the model can be a reading and understanding model, and the functions of the components can be obtained through reading and understanding the whole text description of the components. The unified model also has component names with the same functions. The field names of the components of the unified model of the same function and the field names of the components of the original development operation and maintenance tool are corresponding. The correspondence of each function can generate a field mapping table. To distinguish between different development tools, a mapping table of field names of components of the original development tool and field names of components of the unified model is named a first field mapping table.
In some optional implementations of this embodiment, the second field mapping table is generated by: analyzing a manual of the target development operation and maintenance tool, and determining functions of components of the target development operation and maintenance tool; acquiring the function of a component of a predefined unified model; and mapping field names of components of the target development operation tool and the field names of components of the unified model of the same function to obtain a second field mapping table. Semantic analysis can be performed through a neural network model, and the names and corresponding functions of the components are extracted from the instruction manual. Some application manual can be used as a sample to train a model in advance, the trained model is used for carrying out semantic analysis on the application manual of the target development operation and maintenance tool, which fields are names of components are determined first, then the functions of the components are analyzed from the specification, and the model can be a reading and understanding model, and can be used for obtaining the functions through the whole text description. The unified model also has component names with the same functions. The field names of the components of the unified model of the same function and the field names of the components of the target development operation and maintenance tool are corresponding. The correspondence of each function can generate a field mapping table. To distinguish between different development tools, a mapping table of field names of components of the target development tool and field names of components of the unified model is named a second field mapping table.
With continued reference to fig. 3, fig. 3 is a schematic diagram of an application scenario of the persistent integrated CI/persistent deployment CD component conversion method according to the present embodiment. In the application scenario of fig. 3, the function of CICD is now being performed using jenkins, and the procedure is as follows, with the need to replace it with tekton:
1. the configuration storage module initializes field mapping relation in the database
2. The data importing module triggers the task of migrating data, calls the api interface of jenkins, and extracts the jenkins data from our system
3. The field configuration conversion module uses the database to initialize the field mapping relation, converts the jenkins data into a unified model and stores the unified model into the database
4. External API module, user uses interface provided by our API to perform CICD operation
5. The business processing module reads data from the database through the business processing module, and converts the data structure into a data format of tekton by using the conversion function of the field configuration conversion module
6. Calling tekton interface to complete CICD function
With further reference to FIG. 4, a flow 400 of yet another embodiment of a CI/CD assembly conversion method is shown. The CI/CD assembly conversion method flow 400 includes the steps of:
in step 401, in response to receiving a request from the original development tool to convert to the target development tool, a first field mapping table of the original development tool and the unified model and a second field mapping table of the target development tool and the unified model are obtained.
Step 402, calling an API interface of the original development operation and maintenance tool to migrate the component data of the original development operation and maintenance tool into a database.
Step 403, converting the field names of the components in the component data of the original development operation tool into the field names of the components of the unified model according to the first field mapping table.
Step 404, receiving CI/CD operation by user through API interface of unified model.
And step 405, reading the component data of the unified model from the database, converting the field names of the components of the unified model in the component data of the unified model into the field names of the components of the target development and maintenance tool according to the second field mapping table, and calling the API interface of the target development and maintenance tool to perform CI/CD operation.
Steps 401-405 are substantially the same as steps 201-205 and are therefore not described in detail.
In response to detecting a version change of the development tool, the development tool's instruction manual is analyzed to determine whether the functionality has changed, step 406.
In this embodiment, whether the version is changed may be determined according to the version number of the development operation tool, the release date, and other information. After the version is changed, the instruction manual for developing the operation and maintenance tool is also changed. The content of the instruction manual of the two development operation tools can be compared to find the change of the function. If the content of the original manual of the development and operation tool is not saved in advance, the semantic analysis can be carried out on the new version of the manual of the development and operation tool again, and the functions supported by the version can be identified.
Step 407, if the function is changed, mapping the field names of the components of the development operation tool and the field names of the components of the unified model, and updating the field mapping tables of the development operation tool and the unified model.
In this embodiment, the function change may be a new function, a reduced function, a modified function, or the like.
If the function is newly added, defining a field name of the component for the newly added function in the unified model; and mapping field names of components of the development operation tool of the newly added function and field names of components of the unified model, and updating field mapping tables of the development operation tool and the unified model. And adding a new field mapping for the newly added function on the basis of the original field mapping table. Thus, the functions of the unified model can be dynamically adjusted.
If the functions are reduced, the field names of the components corresponding to the reduced functions are deleted in a field mapping table of the development operation and maintenance tool and the unified model. The fields corresponding to the reduced functions can be deleted directly in the field mapping table, the fields can be set to be invalid, when the functions are restored again, the states of the fields can be directly modified to be valid, the field remapping is not required to be added again, and the speed of generating the field mapping table can be improved.
If the function is modified, the field names of the components of the unified model and the field names of the components of the development tool that modified the function are remapped. The field content in the original mapping relation is modified, the mapping relation does not need to be re-established, and the speed of generating the field mapping table can be improved.
As can be seen from fig. 4, compared with the corresponding embodiment of fig. 2, the flowchart 400 of the continuous integrated CI/continuous deployment CD component conversion method in this embodiment embodies the steps of the add-delete-modify operation on the component data. Thus, the solution described in this embodiment may introduce more component field related data,
with further reference to fig. 5, as an implementation of the method shown in the foregoing figures, the present disclosure provides an embodiment of a CI/CD module conversion apparatus, which corresponds to the method embodiment shown in fig. 2, and which is particularly applicable to various electronic devices.
As shown in fig. 5, the CI/CD module converting apparatus 500 of the present embodiment includes: a configuration saving module 501, a data importing module 502, a field configuration converting module 503, an external API module 504 and a service processing module 505. Wherein, the configuration saving module 501 is configured to obtain a first field mapping table of the original development operation and maintenance tool and the unified model and a second field mapping table of the target development operation and maintenance tool and the unified model in response to receiving a request of converting the original development operation and maintenance tool into the target development operation and maintenance tool; a data import module 502 configured to invoke an API interface of the original development and maintenance tool to migrate component data of the original development and maintenance tool into a database; a field configuration conversion module 503 configured to convert field names of components in the component data of the original development operation tool into field names of components of a unified model according to the first field mapping table; an external API module 504 configured to receive CI/CD operations performed by the user through the API interface of the unified model; the service processing module 505 is configured to read the component data of the unified model from the database, convert the field names of the components of the unified model in the component data of the unified model into the field names of the components of the target development and maintenance tool according to the second field mapping table, and call the API interface of the target development and maintenance tool to perform CI/CD operation.
In this embodiment, the specific processes of the configuration storage module 501, the data import module 502, the field configuration conversion module 503, the external API module 504, and the service processing module 505 of the CI/CD component converting apparatus 500 may refer to steps 201, 202, 203, 204, and 205 in the corresponding embodiment of fig. 2.
In some optional implementations of the present embodiment, the apparatus 500 further includes a unified model module (not shown in the drawings) configured to: analyzing a manual of the original development operation and maintenance tool to determine functions of components of the original development operation and maintenance tool; acquiring the function of a component of a predefined unified model; and mapping field names of components of the original development operation tool with the same function and field names of components of the unified model to obtain a first field mapping table.
In some optional implementations of the present embodiment, the apparatus 500 further includes a unified model module configured to: analyzing a manual of the target development operation and maintenance tool, and determining functions of components of the target development operation and maintenance tool; acquiring the function of a component of a predefined unified model; and mapping field names of components of the target development operation tool and the field names of components of the unified model of the same function to obtain a second field mapping table.
In some optional implementations of the present embodiment, the apparatus 500 further includes a data storage module (not shown in the drawings) configured to: in response to detecting a version change of the development maintenance tool, analyzing a manual of the development maintenance tool to determine if the function is changed; if the function is newly added, defining a field name of the component for the newly added function in the unified model; and mapping field names of components of the development operation tool of the newly added function and field names of components of the unified model, and updating field mapping tables of the development operation tool and the unified model.
In some alternative implementations of the present embodiment, the data storage module is further configured to: if the functions are reduced, the field names of the components corresponding to the reduced functions are deleted in a field mapping table of the development operation and maintenance tool and the unified model.
In some alternative implementations of the present embodiment, the data storage module is further configured to: if the function is modified, the field names of the components of the unified model and the field names of the components of the development tool that modified the function are remapped.
In some alternative implementations of the present embodiment, the data storage module is further configured to: in response to receiving the field mapping table query request, a field mapping table of the launch operation and maintenance tool and the unified model is output.
According to an embodiment of the disclosure, the disclosure further provides an electronic device, a readable storage medium.
An electronic device for continuous integrated CI/continuous deployment of CD component transformations, comprising: one or more processors; storage means having stored thereon one or more computer programs which, when executed by the one or more processors, cause the one or more processors to implement the method described in flow 200 or 400.
A computer readable medium having stored thereon a computer program, wherein the computer program when executed by a processor implements the method described in flow 200 or 400.
Fig. 6 illustrates a schematic block diagram of an example electronic device 600 that may be used to implement embodiments of the present disclosure. Electronic devices are intended to represent various forms of digital computers, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. The electronic device may also represent various forms of mobile devices, such as personal digital processing, cellular telephones, smartphones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are meant to be exemplary only, and are not meant to limit implementations of the disclosure described and/or claimed herein.
As shown in fig. 6, the apparatus 600 includes a computing unit 601 that can perform various appropriate actions and processes according to a computer program stored in a Read Only Memory (ROM) 602 or a computer program loaded from a storage unit 608 into a Random Access Memory (RAM) 603. In the RAM 603, various programs and data required for the operation of the device 600 may also be stored. The computing unit 601, ROM 602, and RAM 603 are connected to each other by a bus 604. An input/output (I/O) interface 605 is also connected to bus 604.
Various components in the device 600 are connected to the I/O interface 605, including: an input unit 606 such as a keyboard, mouse, etc.; an output unit 607 such as various types of displays, speakers, and the like; a storage unit 608, such as a magnetic disk, optical disk, or the like; and a communication unit 609 such as a network card, modem, wireless communication transceiver, etc. The communication unit 609 allows the device 600 to exchange information/data with other devices via a computer network, such as the internet, and/or various telecommunication networks.
The computing unit 601 may be a variety of general and/or special purpose processing components having processing and computing capabilities. Some examples of computing unit 601 include, but are not limited to, a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), various specialized Artificial Intelligence (AI) computing chips, various computing units running machine learning model algorithms, a Digital Signal Processor (DSP), and any suitable processor, controller, microcontroller, etc. The computing unit 601 performs the various methods and processes described above, such as the CI/CD component conversion method. For example, in some embodiments, the CI/CD assembly conversion method may be implemented as a computer software program tangibly embodied on a machine-readable medium, such as the storage unit 608. In some embodiments, part or all of the computer program may be loaded and/or installed onto the device 600 via the ROM 602 and/or the communication unit 609. When the computer program is loaded into the RAM 603 and executed by the computing unit 601, one or more steps of the CI/CD component conversion method described above may be performed. Alternatively, in other embodiments, the computing unit 601 may be configured to perform the CI/CD component conversion method in any other suitable manner (e.g., by means of firmware).
Various implementations of the systems and techniques described here above may be implemented in digital electronic circuitry, integrated circuit systems, field Programmable Gate Arrays (FPGAs), application Specific Integrated Circuits (ASICs), application Specific Standard Products (ASSPs), systems On Chip (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may include: implemented in one or more computer programs, the one or more computer programs may be executed and/or interpreted on a programmable system including at least one programmable processor, which may be a special purpose or general-purpose programmable processor, that may receive data and instructions from, and transmit data and instructions to, a storage system, at least one input device, and at least one output device.
Program code for carrying out methods of the present disclosure may be written in any combination of one or more programming languages. These program code may be provided to a processor or controller of a general purpose computer, special purpose computer, or other programmable data processing apparatus such that the program code, when executed by the processor or controller, causes the functions/operations specified in the flowchart and/or block diagram to be implemented. The program code may execute entirely on the machine, partly on the machine, as a stand-alone software package, partly on the machine and partly on a remote machine or entirely on the remote machine or server.
In the context of this disclosure, a machine-readable medium may be a tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. The machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on 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.
To provide for interaction with a user, the systems and techniques described here can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to a user; and a keyboard and pointing device (e.g., a mouse or trackball) by which a user can provide input to the computer. Other kinds of devices may also be used to provide for interaction with a user; for example, feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form, including acoustic input, speech input, or tactile input.
The systems and techniques described here can be implemented in a computing system that includes a background component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front-end component (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such background, middleware, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: local Area Networks (LANs), wide Area Networks (WANs), and the internet.
The computer system may include a client and a server. The client and server are typically remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other. The server may be a server of a distributed system or a server that incorporates a blockchain. The server can also be a cloud server, or an intelligent cloud computing server or an intelligent cloud host with artificial intelligence technology. The server may be a server of a distributed system or a server that incorporates a blockchain. The server can also be a cloud server, or an intelligent cloud computing server or an intelligent cloud host with artificial intelligence technology.
It should be appreciated that various forms of the flows shown above may be used to reorder, add, or delete steps. For example, the steps recited in the present disclosure may be performed in parallel or sequentially or in a different order, provided that the desired results of the technical solutions of the present disclosure are achieved, and are not limited herein.
The above detailed description should not be taken as limiting the scope of the present disclosure. It will be apparent to those skilled in the art that various modifications, combinations, sub-combinations and alternatives are possible, depending on design requirements and other factors. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present disclosure are intended to be included within the scope of the present disclosure.

Claims (10)

1. A continuously integrated CI/continuously deployed CD component conversion method, comprising:
responding to a received request of converting the original development operation tool into the target development operation tool, and acquiring a first field mapping table of the original development operation tool and the unified model and a second field mapping table of the target development operation tool and the unified model;
calling an API interface of the original development operation and maintenance tool to migrate the component data of the original development operation and maintenance tool to a database;
converting the field names of the components in the component data of the original development operation tool into the field names of the components of the unified model according to the first field mapping table;
receiving CI/CD operation of a user through an API interface of a unified model;
and reading the component data of the unified model from the database, converting the field names of the components of the unified model in the component data of the unified model into the field names of the components of the target development operation and maintenance tool according to the second field mapping table, and calling an API (application program interface) of the target development operation and maintenance tool to perform CI/CD (compact disc) operation.
2. The method of claim 1, the first field mapping table being generated by:
analyzing a manual of the original development operation and maintenance tool to determine functions of components of the original development operation and maintenance tool;
acquiring the function of a component of a predefined unified model;
and mapping field names of components of the original development operation tool with the same function and field names of components of the unified model to obtain a first field mapping table.
3. The method of claim 1, the second field mapping table being generated by:
analyzing a manual of the target development operation and maintenance tool, and determining functions of components of the target development operation and maintenance tool;
acquiring the function of a component of a predefined unified model;
and mapping field names of components of the target development operation tool and the field names of components of the unified model of the same function to obtain a second field mapping table.
4. The method of claim 1, the method further comprising:
in response to detecting a version change of the development maintenance tool, analyzing a manual of the development maintenance tool to determine if the function is changed;
if the function is newly added, defining a field name of the component for the newly added function in the unified model;
and mapping field names of components of the development operation tool of the newly added function and field names of components of the unified model, and updating field mapping tables of the development operation tool and the unified model.
5. The method of claim 4, the method further comprising:
if the functions are reduced, the field names of the components corresponding to the reduced functions are deleted in a field mapping table of the development operation and maintenance tool and the unified model.
6. The method of claim 4, the method further comprising:
if the function is modified, the field names of the components of the unified model and the field names of the components of the development tool that modified the function are remapped.
7. The method of claim 1, the method further comprising:
in response to receiving the field mapping table query request, a field mapping table of the launch operation and maintenance tool and the unified model is output.
8. A continuously integrated CI/continuously deployed CD assembly conversion apparatus, comprising:
the configuration storage module is configured to respond to the received request of converting the original development operation tool into the target development operation tool, and acquire a first field mapping table of the original development operation tool and the unified model and a second field mapping table of the target development operation tool and the unified model;
the data importing module is configured to call an API (application program interface) of the original development and maintenance tool to migrate the component data of the original development and maintenance tool into the database;
a field configuration conversion module configured to convert field names of components in the component data of the original development operation and maintenance tool into field names of components of a unified model according to the first field mapping table;
the external API module is configured to receive CI/CD operation of a user through an API interface of the unified model;
and the business processing module is configured to read the component data of the unified model from the database, convert the field names of the components of the unified model in the component data of the unified model into the field names of the components of the target development operation and maintenance tool according to the second field mapping table, and call the API interface of the target development operation and maintenance tool to perform CI/CD operation.
9. An electronic device for continuous integrated CI/continuous deployment of CD component transformations, comprising:
one or more processors;
a storage device having one or more computer programs stored thereon,
when executed by the one or more processors, causes the one or more processors to implement the method of any of claims 1-7.
10. A computer readable medium having stored thereon a computer program, wherein the computer program, when executed by a processor, implements the method of any of claims 1-7.
CN202310163698.8A 2023-02-16 2023-02-16 CI/CD assembly conversion method and device Pending CN116149728A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310163698.8A CN116149728A (en) 2023-02-16 2023-02-16 CI/CD assembly conversion method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310163698.8A CN116149728A (en) 2023-02-16 2023-02-16 CI/CD assembly conversion method and device

Publications (1)

Publication Number Publication Date
CN116149728A true CN116149728A (en) 2023-05-23

Family

ID=86340527

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310163698.8A Pending CN116149728A (en) 2023-02-16 2023-02-16 CI/CD assembly conversion method and device

Country Status (1)

Country Link
CN (1) CN116149728A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117806654A (en) * 2024-03-01 2024-04-02 杭州云掣科技有限公司 Tekton-based custom cloud native DevOps pipeline system and method

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117806654A (en) * 2024-03-01 2024-04-02 杭州云掣科技有限公司 Tekton-based custom cloud native DevOps pipeline system and method
CN117806654B (en) * 2024-03-01 2024-06-07 杭州云掣科技有限公司 Tekton-based custom cloud native DevOps pipeline system and method

Similar Documents

Publication Publication Date Title
CN113010181A (en) Deployment method and device of operators in deep learning framework and electronic equipment
CN113515271B (en) Service code generation method and device, electronic equipment and readable storage medium
CN114579107A (en) Data processing method, device, equipment and medium
CN110109983B (en) Method and device for operating Redis database
CN116028028B (en) Request function generation method, device, equipment and storage medium
CN116149728A (en) CI/CD assembly conversion method and device
CN114816393B (en) Information generation method, device, equipment and storage medium
CN112506854A (en) Method, device, equipment and medium for storing page template file and generating page
CN112860566B (en) Applet detection method, device, electronic equipment and readable medium
KR20210040311A (en) Method, apparatus, device and storage medium for customizing personalized rules for entities
US9298473B2 (en) System and method for a generic object access layer
CN114139039B (en) Service stability determination method, device, equipment and storage medium
CN112905270B (en) Workflow realization method, device, platform, electronic equipment and storage medium
US11966562B2 (en) Generating natural languages interface from graphic user interfaces
CN116483707A (en) Test method, test device, test apparatus, test program, and test program
CN114661274A (en) Method and device for generating intelligent contract
CN114510334A (en) Class instance calling method and device, electronic equipment and automatic driving vehicle
CN112486523A (en) Container mirror image creating method and device, storage medium and electronic equipment
CN112130860A (en) JSON object analysis method and device, electronic device and storage medium
CN116679921A (en) Method and device for developing application
CN115563183B (en) Query method, query device and program product
CN113360407B (en) Function positioning method and device, electronic equipment and readable storage medium
CN113220576B (en) Management method, device, equipment and storage medium of test environment
US11907194B2 (en) Systems and methods for executing and hashing modeling flows
CN112947846B (en) Batch processing task execution method and device of object storage system and electronic equipment

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