Method and apparatus for ci / cd component conversion
By generating field mapping tables and a unified model, the problem of inconsistent custom terminology in CI/CD technical solutions was solved, enabling low-cost replacement of CI/CD components and unification of business models, thus simplifying the component replacement process.
Patent Information
- Application Number
- CN202310163698.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-02-16
- Publication Date
- 2026-01-16
- Estimated Expiration
- 2043-02-16
AI Technical Summary
Existing CI/CD technology solutions suffer from inconsistent terminology, leading to difficulties and high costs in component replacement and a lack of a unified business model.
By generating field mapping tables between the original development and operation tools and the unified model, as well as field mapping tables between the target development and operation tools and the unified model, the migration and name conversion of component data are realized, providing a unified CI/CD model and supporting low-cost replacement of different components.
It enables low-cost replacement between CI/CD components, provides a unified business model, simplifies the component replacement process, and reduces replacement costs.
Smart Images

Figure CN116149728B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] Embodiments of the present disclosure relate to the field of computer technology, and particularly to a CI / CD component conversion method and device. BACKGROUND
[0002] The most core feature of CICD DevOps is to mainly solve the problems of compilation, release and deployment in the software development process, and to realize automation construction, automation compilation and automation deployment through technical means to improve the efficiency of software development. At present, there are many solutions for CICD, such as Jenkins, Tekton, GitLab CI / CD, etc.
[0003] There are many technical solutions for CICD at present, but when solving the problems of compilation, release and deployment, the terms used by various technical solutions are not the same, and each technical solution has its own set of definitions, for example:
[0004] Definition of Jenkins:
[0005] (https: / / www.jenkins.io / zh / doc / book / pipeline / #stage)
[0006] Pipeline: Pipeline is a CD pipeline model defined by the user. The code of the pipeline defines the entire construction process, which usually includes the stages of building, testing and delivering the application.
[0007] Node: A machine that is part of the Jenkins environment and can execute the pipeline.
[0008] Stage: Defines conceptually different subsets of tasks performed in the entire pipeline (such as the "Build" stage)
[0009] Step: A single task, a step tells Jenkins what to do at a specific point in time
[0010] Trigger: Trigger condition
[0011] Definition of Tekton: (https: / / juejin.cn / post / 6971329329472995336)
[0012] Step: A specific step to be executed in a task
[0013] Task: Defines a series of steps that will launch specific build or delivery tools. These tools receive specific inputs and generate specific outputs.
[0014] Pipeline: define a series of tasks to complete a specific build or delivery goal.
[0015] PipelineRun: instantiate a Pipeline and execute it according to the specified input output and execution parameters.
[0016] PipelineResource: define the location of the input and output of each step Task.
[0017] Trigger: trigger condition
[0018] Definition of GitHub Actions:
[0019] (https: / / docs.github.com / cn / actions / learn-github-actions / understanding-github-actions)
[0020] Step: a set of tasks that perform a job, such as executing a set of shell scripts
[0021] Job: define a task, which consists of one or more steps
[0022] Workflow: a workflow consists of one or more jobs, which can be triggered by an event
[0023] Workflow run: the instance of the workflow that runs when the configuration event is triggered
[0024] Event: trigger condition
[0025] Runner: the machine that runs.
[0026] From the above examples, the following problems can be found:
[0027] 1. There is no unified business model among various technologies
[0028] 2. Individualization is strong among various technologies, replacement is troublesome and the cost is high. For example:
[0029] Jenkins is used to start CICD, and later GitHub Actions is used to replace it, which is troublesome and costly. SUMMARY
[0030] Embodiments of the present disclosure propose a CI / CD component conversion method and device.
[0031] In a first aspect, embodiments of the present disclosure provide a continuous integration (CI) / continuous deployment (CD) component conversion method, comprising: in response to receiving a request to convert a source development and operation tool into a target development and operation tool, obtaining a first field mapping table of the source development and operation tool and a second field mapping table of the target development and operation tool and a unified model; calling an API interface of the source development and operation tool to migrate component data of the source development and operation tool to a database; converting, according to the first field mapping table, a field name of a component in the component data of the source development and operation tool into a field name of a component of the unified model; receiving a CI / CD operation performed by a user through an API interface of the unified model; reading the component data of the unified model from the database, and converting, according to the second field mapping table, the field name of the component of the unified model in the component data of the unified model into a field name of a component of the target development and operation tool, and calling an API interface of the target development and operation tool to perform the CI / CD operation.
[0032] In some embodiments, the first field mapping table is generated by: analyzing a user manual of the source development and operation tool to determine functions of components of the source development and operation tool; obtaining pre-defined functions of components of the unified model; and mapping field names of the components of the source development and operation tool and field names of the components of the unified model with the same functions to obtain the first field mapping table.
[0033] In some embodiments, the second field mapping table is generated by: analyzing a user manual of the target development and operation tool to determine functions of components of the target development and operation tool; obtaining pre-defined functions of components of the unified model; and mapping field names of the components of the target development and operation tool and field names of the components of the unified model with the same functions to obtain the second field mapping table.
[0034] In some embodiments, the method further comprises: in response to detecting a version change of the development and operation tool, analyzing a user manual of the development and operation tool to determine whether the functions are changed; if a function is added, defining a field name of a component for the added function in the unified model; and mapping the field name of the component of the development and operation tool of the added function and the field name of the component of the unified model to update the field mapping table of the development and operation tool and the unified model.
[0035] In some embodiments, the method further comprises: if a function is reduced, deleting the field name of the component corresponding to the reduced function in the field mapping table of the development and operation tool and the unified model.
[0036] In some embodiments, the method further comprises: if a function is modified, re-mapping the field name of the component of the development and operation tool of the modified function and the field name of the component of the unified model.
[0037] In some embodiments, the method further comprises: in response to receiving the field mapping table query request, outputting the field mapping table of the development and operation tool and the unified model.
[0038] In a second aspect, embodiments of the present disclosure provide a continuous integration (CI) / continuous deployment (CD) component conversion device, comprising: a configuration saving module configured to, in response to receiving a request to convert an original development and operation tool into a target development and operation tool, obtain a first field mapping table of the original development and operation tool and a unified model and a second field mapping table of the target development and operation tool and the unified model; a data importing module configured to invoke an API interface of the original development and operation tool to migrate component data of the original development and operation tool to a database; a field configuration conversion module configured to convert field names of components in the component data of the original development and operation tool into field names of components of the unified model according to the first field mapping table; an external API module configured to receive CI / CD operations performed by a user through an API interface of the unified model; and a business processing module configured to read component data of the unified model from the database, convert field names of components of the unified model in the component data of the unified model into field names of components of the target development and operation tool according to the second field mapping table, and invoke an API interface of the target development and operation tool to perform CI / CD operations.
[0039] In some embodiments, the device further comprises a unified model module configured to: analyze a user manual of the original development and operation tool to determine functions of components of the original development and operation tool; obtain pre-defined functions of components of the unified model; and map field names of components of the original development and operation tool and field names of components of the unified model with the same functions to obtain the first field mapping table.
[0040] In some embodiments, the device further comprises a unified model module configured to: analyze a user manual of the target development and operation tool to determine functions of components of the target development and operation tool; obtain pre-defined functions of components of the unified model; and map field names of components of the target development and operation tool and field names of components of the unified model with the same functions to obtain the second field mapping table.
[0041] In some embodiments, the device further comprises a data storage module configured to: in response to detecting a version change of the development and operation tool, analyze a user manual of the development and operation tool to determine whether the functions are changed; if a function is added, define a field name of a component for the added function in the unified model; and map the field name of the component of the development and operation tool of the added function and the field name of the component of the unified model to update the field mapping table of the development and operation tool and the unified model.
[0042] In some embodiments, the data storage module is further configured to: if the function is reduced, delete the field name of the component corresponding to the reduced function in the field mapping table of the development operation tool and the unified model.
[0043] In some embodiments, the data storage module is further configured to: if the function is modified, remap the field name of the component of the development operation tool and the field name of the component of the unified model which are modified.
[0044] In some embodiments, the data storage module is further configured to: in response to receiving the field mapping table query request, output the field mapping table of the development operation tool and the unified model.
[0045] In a third aspect, embodiments of the present disclosure provide an electronic device for continuous integration CI / continuous deployment CD component conversion, comprising: one or more processors; a storage device having one or more computer programs stored thereon, when the one or more computer programs are executed by the one or more processors, the one or more processors implement the method of the first aspect.
[0046] In a fourth aspect, embodiments of the present disclosure provide a computer readable medium having a computer program stored thereon, wherein the computer program is executed by a processor to implement the method of the first aspect.
[0047] Embodiments of the present disclosure provide a continuous integration CI / continuous deployment CD component conversion method and device, which unifies the business model involved in CI / CD through field mapping, realizes low-cost replacement between CI / CD components, and mainly supports the following functions:
[0048] 1. Provide a unified CI / CD model.
[0049] 2. Field mapping conversion configuration function, support different components to be converted to a unified model through configuration.
[0050] 3. Migration function, through the field conversion function, the data of the existing component is migrated and converted to the unified model. BRIEF DESCRIPTION OF DRAWINGS
[0051] Other features, objects and advantages of the present disclosure will become more apparent from the following detailed description of non-limiting embodiments made with reference to the following drawings:
[0052] Figure 1 is an example system architecture diagram to which an embodiment of the present disclosure can be applied;
[0053] Figure 2is a flow chart of one embodiment of the CI / CD component conversion method according to the present disclosure;
[0054] Figure 3 is a schematic diagram of one application scenario of the CI / CD component conversion method according to the present disclosure;
[0055] Figure 4 is a flow chart of another embodiment of the CI / CD component conversion method according to the present disclosure;
[0056] Figure 5 is a structural schematic diagram of one embodiment of the CI / CD component conversion device according to the present disclosure;
[0057] Figure 6 is a structural schematic diagram of a computer system of an electronic device suitable for implementing embodiments of the present disclosure. DETAILED DESCRIPTION
[0058] The present disclosure will be further described below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely intended for the purpose of interpretation of the related application, and not for the limitation of the application. In addition, it should be noted that only parts related to the application are shown in the drawings for ease of description.
[0059] It should be noted that the embodiments in the present disclosure and the features in the embodiments can be combined with each other without conflict. The present disclosure will be described in detail below with reference to the accompanying drawings and in conjunction with the embodiments.
[0060] Figure 1 An exemplary system architecture is shown, which can apply the embodiments of the continuous integration CI / continuous deployment CD component conversion method and device of the present disclosure.
[0061] As shown in Figure 1 , the system architecture can include a server, a database, and a component layer, wherein the server includes an external API module, a unified model module, a data import module, a data storage module, a field configuration conversion module, a configuration saving module, and a business processing module, and the functions of each module are as follows:
[0062] External API module: provides a unified API interface to provide service capabilities
[0063] Unified model module: abstracts the related functions of CICD into a unified data model
[0064] Data import module: used for data migration, migrating the data of existing components to our database
[0065] Data storage module: data addition, deletion, modification, and query operations
[0066] Field configuration conversion module: convert data of each component according to configuration into our unified data model
[0067] Configuration saving module: save the mapping relationship between the fields of the component and the fields of our unified model
[0068] Business processing module: process the business module of CICD function.
[0069] The database can be Mogodb, Mysql, etc.
[0070] The component layer can include: Tektons, Jenkins, GitHub Actions, etc.
[0071] It should be noted that the CI / CD component conversion method provided by the embodiments of the present disclosure is generally executed by a server, and accordingly, the CI / CD component conversion device is generally provided in the server.
[0072] It should be understood that Figure 1 The number of servers, databases, and components in
[0073] With reference to Figure 2 , a flow 200 of one embodiment of the CI / CD component conversion method according to the present disclosure is shown. The CI / CD component conversion method includes the following steps:
[0074] Step 201, in response to receiving a request to convert the original development and operation tool into the target development and operation tool, obtaining a first field mapping table of the original development and operation tool and a unified model and a second field mapping table of the target development and operation tool and the unified model.
[0075] In the present embodiment, the execution subject of the CI / CD component conversion method (for example, the server shown in Figure 1 ) can receive a request to convert the original development and operation tool (for example, Tektons) into the target development and operation tool (for example, Jenkins) from a terminal used by a user to perform CI / CD component conversion through wired connection or wireless connection. The server can provide a web interface for the user to input the name of the original development and operation tool and the name of the target development and operation tool. The present application provides a unified model, and each component of the unified model can correspond to various development and operation tools, only the components with the same function are uniformly named. The field mapping table between the components of the unified model and the components of each development and operation tool is generated in advance. In order to distinguish the mapping table of different development and operation tools and the unified model, the mapping table of the original development and operation tool and the unified model is named as the first field mapping table, and the mapping table of the target development and operation tool and the unified model is named as the second field mapping table.
[0076] Field mapping relationship example:
[0077]
[0078]
[0079] Definition:
[0080] Step: The smallest unit of executing a task, such as executing a shell script
[0081] Task: A task composed of multiple steps, such as compiling a Java jar package
[0082] Pipeline: composed of multiple tasks, such as deploying a container in a specified k8s cluster
[0083] Trigger: The mechanism that triggers the pipeline to run
[0084] Execution machine: The machine that runs the pipeline
[0085] Step 202, call the API interface of the original development and operation tool to migrate the component data of the original development and operation tool to the database.
[0086] In this embodiment, the component data can be historical data or newly received and unprocessed data. The component data is imported into the database managed by the server.
[0087] Step 203, according to the first field mapping table, convert the field name of the component in the component data of the original development and operation tool into the field name of the component of the unified model.
[0088] In this embodiment, according to the first field mapping table, the field name of the component in the component data of the original development and operation tool is renamed, and the field name of the component in all the component data of the development and operation tool is unified with the field name of the component of the unified model.
[0089] Step 204, receive user CI / CD operation through the API interface of the unified model.
[0090] In this embodiment, the unified model of the present application provides an API interface to the outside, and the user can call the interface to perform CI / CD operation. In fact, the present application only encapsulates the component name, and the call is still the component of the existing development and operation tool.
[0091] In step 205, the component data of the unified model is read from the database, and the field names of the components of the unified model in the component data of the unified model are converted into the field names of the components of the target development and operation tool according to the second field mapping table, and the API interface of the target development and operation tool is called to perform the CI / CD operation.
[0092] In the embodiment, since the user wants to use the target development and operation tool, it is necessary to convert the field names of the unified model into the field names of the components of the target development and operation tool, and then call the API interface of the target development and operation tool to perform the CI / CD operation.
[0093] The method provided by the above embodiments of the present disclosure unifies the business models involved in CI / CD through field mapping, realizes low-cost replacement between CI / CD components, and mainly supports the following functions:
[0094] 1. Provide a unified CI / CD model.
[0095] 2. Field mapping conversion configuration function, support different components to be converted to a unified model through configuration.
[0096] 3. Migration function, through the field conversion function, the data of the existing components is migrated and converted to the unified model.
[0097] In some optional implementation manners of the embodiment, the first field mapping table is generated through the following steps: analyzing the user manual of the original development and operation tool to determine the functions of the components of the original development and operation tool; obtaining the functions of the components of the pre-defined unified model; and mapping the field names of the components of the original development and operation tool and the field names of the components of the unified model with the same functions to obtain the first field mapping table. The semantic analysis can be performed through a neural network model to extract the names and corresponding functions of the components from the user manual. Some user manuals can be used as samples to pre-train the model, and the trained model is used to perform semantic analysis on the user manual of the original development and operation tool to determine which fields are the names of the components, and then analyze the functions of the components from the instruction manual. The model can be a reading comprehension model, and the function of the component can be obtained through reading comprehension of the whole text description of the component. The unified model also has component names with the same functions. The field names of the components of the unified model with the same functions are corresponded to the field names of the components of the original development and operation tool. The corresponding relationship of each function can generate the field mapping table. In order to distinguish different development and operation tools, the mapping table of the field names of the components of the original development and operation tool and the field names of the components of the unified model is named as the first field mapping table.
[0098] In some optional implementations of the embodiment, the second field mapping table is generated by the following steps: analyzing the user manual of the target development and operation tool to determine the functions of the components of the target development and operation tool; obtaining the functions of the components of the pre-defined unified model; mapping the field names of the components of the target development and operation tool and the field names of the components of the unified model with the same functions to obtain the second field mapping table. Semantic analysis can be performed by a neural network model to extract the names of the components and the corresponding functions from the user manual. Some user manuals can be used as samples to pre-train the model, and the trained model is used to perform semantic analysis on the user manual of the target development and operation tool to determine which fields are the names of the components, and then analyze the functions of the components from the specification. The model can be a reading comprehension model, and the function can be obtained from the entire text description. The unified model also has component names with the same functions. The field names of the components of the unified model and the field names of the components of the target development and operation tool with the same functions are corresponded. The corresponding relationship of each function can generate the field mapping table. In order to distinguish different development and operation tools, the mapping table of the field names of the components of the target development and operation tool and the field names of the components of the unified model is named as the second field mapping table.
[0099] Continuing to refer to Figure 3 , Figure 3 is an application scenario of the continuous integration CI / continuous deployment CD component conversion method according to the embodiment. In the application scenario of Figure 3 , Jenkins is currently used for the CICD function, and needs to be replaced by tekton, and the steps are as follows:
[0100] 1. Configure the saving module, and initialize the field mapping relationship in the database
[0101] 2. Data import module, trigger the task of migrating data, call the api interface of jenkins, and extract the data of jenkins into our system
[0102] 3. Field configuration conversion module, use the initialized field mapping relationship in the database to convert the data of jenkins into the unified model of our system and save it to our database
[0103] 4. External API module, users use the interface provided by our API to perform CICD operations
[0104] 5. Business processing module, read the data from the database through the business processing module, and use the conversion function of the field configuration conversion module to convert the data structure into the data format of tekton
[0105] 6. Call the interface of tekton to complete the CICD function
[0106] With further reference Figure 4 FIG. 4 shows a flow 400 of yet another embodiment of the CI / CD component conversion method. The flow 400 of the CI / CD component conversion method includes the following steps:
[0107] At step 401, in response to receiving a request to convert a source development and operation tool into a target development and operation tool, a first field mapping table of the source development and operation tool and a unified model and a second field mapping table of the target development and operation tool and the unified model are obtained.
[0108] At step 402, an API interface of the source development and operation tool is called to migrate component data of the source development and operation tool to a database.
[0109] At step 403, field names of components in the component data of the source development and operation tool are converted into field names of components of the unified model according to the first field mapping table.
[0110] At step 404, a user performs a CI / CD operation through an API interface of the unified model.
[0111] At step 405, component data of the unified model is read from the database, and field names of components of the unified model in the component data of the unified model are converted into field names of components of the target development and operation tool according to the second field mapping table, and an API interface of the target development and operation tool is called to perform the CI / CD operation.
[0112] Steps 401-405 are substantially the same as steps 201-205, and thus will not be described again.
[0113] At step 406, in response to detecting a version change of the development and operation tool, a user manual of the development and operation tool is analyzed to determine whether the function has changed.
[0114] In this embodiment, whether a version change has occurred can be determined according to a version number, a release date, and other information of the development and operation tool. After the version change, the user manual of the development and operation tool is also changed. The contents of the user manuals of the development and operation tools at two times can be compared to find the changes in the function. If the contents of the user manual of the original development and operation tool have not been saved in advance, the user manual of the new version of the development and operation tool can be re-analyzed semantically to identify the functions supported by the version.
[0115] At step 407, if the function has changed, the field names of the components of the development and operation tool and the field names of the components of the unified model that have changed are mapped, and the field mapping tables of the development and operation tool and the unified model are updated.
[0116] In this embodiment, the function change can be an added function, a reduced function, a modified function, and the like.
[0117] If the function is added, the field name of the component is defined in the unified model for the added function; the field name of the component of the development and operation tool of the added function is mapped with the field name of the component of the unified model, and the field mapping table of the development and operation tool and the unified model is updated. New field mapping is added to the original field mapping table for the added function. Thus, the function of the unified model can be dynamically adjusted.
[0118] If the function is reduced, the field name of the component corresponding to the reduced function is deleted in the field mapping table of the development and operation tool and the unified model. The field corresponding to the reduced function can be directly deleted in the field mapping table, or the fields can be set as invalid. When the function is restored again, the state of the field can be directly modified as valid, without the need to add a new field for remapping, so that the generation speed of the field mapping table can be improved.
[0119] If the function is modified, the field name of the component of the development and operation tool modified in the function is mapped with the field name of the component of the unified model. The field content in the original mapping relationship is modified, without the need to reestablish the mapping relationship, so that the generation speed of the field mapping table can be improved.
[0120] As can be seen from Figure 4 , compared with the embodiment corresponding to Figure 2 , the process 400 of the continuous integration CI / continuous deployment CD component conversion method in the embodiment embodies the steps of the add, delete, modify and query operations on the component data. Thus, the scheme described in the embodiment can introduce more component field related data,
[0121] Further referring to Figure 5 , as an implementation of the method shown in the above figures, the disclosure provides an embodiment of a CI / CD component conversion device. The device embodiment corresponds to the method embodiment shown in Figure 2 , and the device can be specifically applied to various electronic devices.
[0122] As Figure 5As shown, the CI / CD component conversion apparatus 500 of the embodiment includes a configuration saving module 501, a data importing module 502, a field configuration conversion module 503, an external API module 504, and a business processing module 505. The configuration saving module 501 is configured to, in response to receiving a request to convert an original development and operation tool into a target development and operation tool, obtain a first field mapping table of the original development and operation tool and a unified model and a second field mapping table of the target development and operation tool and the unified model. The data importing module 502 is configured to call an API interface of the original development and operation tool to migrate component data of the original development and operation tool to a database. The field configuration conversion module 503 is configured to convert field names of components in the component data of the original development and operation tool into field names of components of the unified model according to the first field mapping table. The external API module 504 is configured to receive CI / CD operations performed by a user through an API interface of the unified model. The business processing module 505 is configured to read component data of the unified model from the database, convert field names of components of the unified model in the component data of the unified model into field names of components of the target development and operation tool according to the second field mapping table, and call an API interface of the target development and operation tool to perform CI / CD operations.
[0123] In the embodiment, the configuration saving module 501, the data importing module 502, the field configuration conversion module 503, the external API module 504, and the business processing module 505 of the CI / CD component conversion apparatus 500 can perform specific processing as described in the steps 201, 202, 203, 204, and 205 of the corresponding embodiment. Figure 2
[0124] In some optional implementations of the embodiment, the apparatus 500 further includes a unified model module (not shown in the drawings) configured to analyze a user manual of the original development and operation tool to determine functions of components of the original development and operation tool, obtain pre-defined functions of components of the unified model, and map field names of components of the original development and operation tool and field names of components of the unified model with the same functions to obtain the first field mapping table.
[0125] In some optional implementations of the embodiment, the apparatus 500 further includes a unified model module configured to analyze a user manual of the target development and operation tool to determine functions of components of the target development and operation tool, obtain pre-defined functions of components of the unified model, and map field names of components of the target development and operation tool and field names of components of the unified model with the same functions to obtain the second field mapping table.
[0126] In some optional implementations of the present embodiment, the apparatus 500 further comprises a data storage module (not shown in the figure) configured to: in response to detecting a version change of the development and operation tool, analyze a user manual of the development and operation tool to determine whether the function has changed; if a new function is added, define a field name of a component in the unified model for the new function; map the field name of the component of the development and operation tool of the new function and the field name of the component of the unified model, and update the field mapping table of the development and operation tool and the unified model.
[0127] In some optional implementations of the present embodiment, the data storage module is further configured to: if a function is reduced, delete the field name of the component corresponding to the reduced function in the field mapping table of the development and operation tool and the unified model.
[0128] In some optional implementations of the present embodiment, the data storage module is further configured to: if a function is modified, remap the field name of the component of the development and operation tool modified function and the field name of the component of the unified model.
[0129] In some optional implementations of the present embodiment, the data storage module is further configured to: in response to receiving a field mapping table query request, output the field mapping table of the development and operation tool and the unified model.
[0130] According to an embodiment of the present disclosure, the present disclosure further provides an electronic device and a readable storage medium.
[0131] An electronic device for continuous integration (CI) / continuous deployment (CD) component conversion, comprising: one or more processors; a storage device having one or more computer programs stored thereon, when the one or more computer programs are executed by the one or more processors, the one or more processors implement the method described in flow 200 or 400.
[0132] A computer readable medium having a computer program stored thereon, wherein the computer program is executed by a processor to implement the method described in flow 200 or 400.
[0133] Figure 6A schematic block diagram of an example electronic device 600 that can be used to implement embodiments of the present disclosure is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device may also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the present disclosure described and / or claimed herein.
[0134] like Figure 6 As shown, device 600 includes a computing unit 601, which can perform various appropriate actions and processes based on a computer program stored in read-only memory (ROM) 602 or a computer program loaded from storage unit 608 into random access memory (RAM) 603. RAM 603 may also store various programs and data required for the operation of device 600. The computing unit 601, ROM 602, and RAM 603 are interconnected via bus 604. Input / output (I / O) interface 605 is also connected to bus 604.
[0135] Multiple components in device 600 are connected to I / O interface 605, including: input unit 606, such as keyboard, mouse, etc.; output unit 607, such as various types of monitors, speakers, etc.; storage unit 608, such as disk, optical disk, etc.; and communication unit 609, such as network card, modem, wireless transceiver, etc. Communication unit 609 allows device 600 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.
[0136] The computing unit 601 can be various general and / or special purpose processing components with processing and computing capabilities. Some examples of the 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 various methods and processes described above, such as the CI / CD component conversion method. For example, in some embodiments, the CI / CD component conversion method can be implemented as a computer software program tangibly embodied in a machine-readable medium, such as the storage unit 608. In some embodiments, part or all of the computer program can 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 onto the RAM 603 and executed by the computing unit 601, one or more steps of the CI / CD component conversion method described above can be performed. Alternatively, in other embodiments, the computing unit 601 can be configured to perform the CI / CD component conversion method by any other suitable means, such as by means of firmware.
[0137] Various implementations of the systems and techniques described above can be realized in digital electronic circuitry, integrated circuitry, a field programmable gate array (FPGA), an application specific integrated circuit (ASIC), a system on a chip (SOC), a programmable logic device (PLD), a computer hardware, firmware, software, and / or combinations thereof. These various implementations can include implementation in one or more computer programs that are executable and / or interpretable on a programmable system including at least one programmable processor, which can be special or general purpose, coupled to receive data and instructions from, and to transmit data and instructions to, a storage system, at least one input device, and at least one output device.
[0138] Program code for carrying out methods of the present disclosure can be written in any combination of one or more programming languages. The program code can be provided to a processor or controller of a general purpose computer, special purpose computer, or other programmable data processing apparatus to produce a machine, such that the program code, when executed by the processor or controller, produces a function / operation specified in the flowchart and / or block diagram. The program code can be executed entirely on a machine, partially on a machine, partially on a machine as a stand-alone software package, and partially on a remote machine or a server.
[0139] In the context of this disclosure, a machine-readable medium can be a tangible medium that contains or stores a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can 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 the machine-readable storage medium will include one or more lines of electrical connections, portable computer disks, hard disk drives, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or Flash memory), optical fibers, portable compact disc read-only memories (CD-ROMs), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.
[0140] 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 the user and a keyboard and a pointing device (e.g., a mouse or a trackball) by which the user can provide input to the computer. Other kinds of devices can be used to provide for interaction with a user as well; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form, including acoustic, speech, or tactile input.
[0141] The systems and techniques described here can be implemented in a computing system that includes a back end 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 back end, 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 a local area network (LAN), a wide area network (WAN), and the Internet.
[0142] The computer system can include clients and servers. This relationship can be. The servers are generally remote from the users and can be accessed via the Internet using a communication network. The relationship can be a client-server relationship over a communications network, and as such, the servers can be accessed by the clients using computer programs. The servers can be servers of a distributed system, or servers combined with a blockchain. The servers can also be cloud servers, or intelligent cloud computing servers or intelligent cloud hosts with artificial intelligence technology.
[0143] It should be understood that the various forms of flow shown above can be re-ordered, added to, or have steps deleted, using the steps described above. For example, the steps described in the present disclosure can be performed in parallel, in series, or in a different order, as long as the desired results of the technical solutions of the present disclosure can be achieved, and the present disclosure is not limited herein.
[0144] The above detailed description does not constitute a limitation on the protection scope of the present disclosure. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent replacements, and improvements made within the spirit and principles of the present disclosure should be included in the protection scope of the present disclosure.
Claims
1. A method for converting a continuous integration (CI) / continuous deployment (CD) component, comprising: in response to receiving a request for converting a source development and operation tool into a target development and operation tool, obtaining a first field mapping table of the source development and operation tool and a second field mapping table of the target development and operation tool and a unified model, wherein each component of the unified model corresponds to each development and operation tool, and components with the same function are uniformly named; calling an API interface of the source development and operation tool to migrate component data of the source development and operation tool to a database; converting a field name of a component in the component data of the source development and operation tool into a field name of a component of the unified model according to the first field mapping table; receiving a CI / CD operation performed by a user through an API interface of the unified model; reading component data of the unified model from the database, converting the field name of the component of the unified model in the component data of the unified model into a field name of a component of the target development and operation tool according to the second field mapping table, and calling an API interface of the target development and operation tool to perform a CI / CD operation. 2.The method of claim 1, wherein the first field mapping table is generated by: analyzing a user manual of the source development and operation tool to determine functions of components of the source development and operation tool; obtaining pre-defined functions of components of the unified model; and mapping field names of components of the source development and operation tool and field names of components of the unified model with the same function to obtain the first field mapping table. 3.The method of claim 1, wherein the second field mapping table is generated by: analyzing a user manual of the target development and operation tool to determine functions of components of the target development and operation tool; obtaining pre-defined functions of components of the unified model; and mapping field names of components of the target development and operation tool and field names of components of the unified model with the same function to obtain the second field mapping table. 4.The method of claim 1, further comprising: in response to detecting a version change of the development and operation tool, analyzing a user manual of the development and operation tool to determine whether a function is changed; if a function is added, defining a field name of a component for the added function in the unified model; and mapping the field name of the component of the development and operation tool of the added function and the field name of the component of the unified model to update the field mapping table of the development and operation tool and the unified model. 5.The method of claim 4, further comprising: if a function is reduced, deleting the field name of the component corresponding to the reduced function in the field mapping table of the development and operation tool and the unified model. 6.The method of claim 4, further comprising: if a function is modified, re-mapping the field name of the component of the development and operation tool of the modified function and the field name of the component of the unified model. 7.The method of claim 1, further comprising: in response to receiving a field mapping table query request, outputting the field mapping table of the development and operation tool and the unified model. 8. A continuous integration (CI) / continuous deployment (CD) component conversion apparatus, comprising: a configuration saving module configured to, in response to receiving a request to convert a source development and operation tool into a target development and operation tool, obtain a first field mapping table of the source development and operation tool and a second field mapping table of the target development and operation tool and a unified model, wherein components of the unified model correspond to various development and operation tools and components with the same function are uniformly named; a data importing module configured to invoke an API interface of the source development and operation tool to migrate component data of the source development and operation tool to a database; a field configuration conversion module configured to convert field names of components in the component data of the source development and operation tool to field names of components of the unified model according to the first field mapping table; an external API module configured to receive CI / CD operations of a user through an API interface of the unified model; a business processing module 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 to field names of components of the target development and operation tool according to the second field mapping table, and invoke an API interface of the target development and operation tool to perform CI / CD operations.
9. An electronic device for continuous integration (CI) / continuous deployment (CD) component conversion, comprising: one or more processors; a storage device having one or more computer programs stored thereon, when the one or more computer programs are executed by the one or more processors, the one or more processors implement the method of any one of claims 1-7.
10. A computer readable medium having stored thereon a computer program, wherein, The computer program is executed by the processor to implement the method of any one of claims 1-7. The computer program is executed by the processor to implement the method of any one of claims 1-7.
Citation Information
Patent Citations
Data migration method and device
CN114356884A