Coding environment automatic deployment method and device, equipment, storage medium and product

Through the automated coding environment deployment method, the complexity and inconsistency of coding environment deployment are solved, and the rapid and efficient coding environment deployment is achieved, which adapts to the Linux environment needs in the transformation of information and innovation.

CN119149100APending Publication Date: 2024-12-17SHANGHAI PUDONG DEVELOPMENT BANK
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411012586.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-26
Publication Date
2024-12-17

AI Technical Summary

Technical Problem

The installation and configuration of coding environments and development tools in the prior art are complex, resulting in long deployment time and inconsistent methods of coding environments. Especially during the transformation of information and innovation, there is a lack of unified and efficient deployment methods when changing from Windows to Linux environment.

Method used

Provides an automated deployment method for coding environments, open source code projects through the user interface, insert tasks into server task queues, determine IDE plug-in type, configure conversion protocol, start initialization script installation tools and configure environment, use IDE plug-ins and services The terminal interaction pulls the source code project to the user and updates the task queue to prevent duplicate processing.

Benefits of technology

A unified coding environment deployment method is realized, the deployment efficiency is improved, and the time for developers to get the project source code to complete the coding environment preparation is simplified.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119149100A_ABST
    Figure CN119149100A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a coding environment automatic deployment method and device, equipment, a storage medium and a product, and the method comprises the steps: inserting a task for opening a source code project into a task queue of a server based on the operation of opening the source code project in a user interface by a user; the server determines an IDE plug-in type according to the construction mode of the source code project; configuring a conversion protocol between the user interface and the user side according to the operating system environment of the user side; the user interface initiates a command to the user side based on the conversion protocol, and the user side starts an initialization script; the user side installs a tool and a configuration environment according to the initialization script; the user side is in butt joint interaction with the server side through an IDE plug-in, and the source code project is pulled to the user side; the user side opens the source code project based on the IDE window and carries out follow-up operation; and the server updates the task of opening the source code project in the task queue as completion. According to the embodiment of the invention, the deployment efficiency can be improved through a unified coding environment deployment mode.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of this specification relate to the field of coding environment deployment, and in particular, to a method, apparatus, device, storage medium and product for automated deployment of a coding environment. Background Art

[0002] At present, with the diversification of development projects and development technology stacks, the installation and configuration of coding environments and development tools in existing technologies are becoming increasingly complex. It often takes a long time for developers to obtain the project source code and complete the preparation of the coding environment and successfully build the source code. In particular, due to the overall transformation of information technology innovation, the coding environment has changed from a Windows-based environment to a Linux-based environment. Since there is no unified and efficient deployment method in the existing technology, the deployment environment takes a long time and the deployment method is not unified.

[0003] Therefore, there is an urgent need for an automated coding environment deployment method that can improve deployment efficiency through a unified coding environment deployment method. Summary of the invention

[0004] The purpose of the embodiments of this specification is to provide a method, apparatus, device, storage medium and product for automatic deployment of a coding environment, so as to improve deployment efficiency through a unified coding environment deployment method.

[0005] To achieve the above objectives, on the one hand, an embodiment of this specification provides a method for automatic deployment of a coding environment, including:

[0006] Based on the operation of opening a source code project by the user in the user interface, inserting a task of opening the source code project into a task queue of the server, wherein the source code project is a source code project of a target application;

[0007] The server determines the corresponding IDE plug-in type according to the construction method of the source code project, and prepares to interact with the corresponding type of IDE plug-in;

[0008] According to the operating system environment of the user terminal, configure the conversion protocol between the corresponding user interface and the user terminal;

[0009] The user interface initiates a command to the user terminal based on the conversion protocol, and the user terminal starts an initialization script;

[0010] The user terminal installs tools and configures the environment according to the initialization script;

[0011] When the source code project of the target application does not exist on the user end, the user end uses the installed IDE plug-in to interact with the server end to pull the source code project of the target application to the user end;

[0012] The user terminal opens the source code project based on the IDE window and performs subsequent operations;

[0013] The task of opening the source code project in the server update task queue is completed.

[0014] Preferably, the server determines the corresponding IDE plug-in type according to the construction method of the source code project further includes:

[0015] When the source code project includes a pom file built by Maven, determining that the corresponding IDE plug-in type is a plug-in corresponding to IDEA;

[0016] When the source code project includes a package.json file built by npm, it is determined that the corresponding IDE plug-in type is a plug-in corresponding to VSCODE.

[0017] Preferably, configuring the conversion protocol between the corresponding user interface and the user terminal according to the operating system environment of the user terminal further includes:

[0018] Determine the operating system environment of the user terminal according to the JS script in the user interface;

[0019] When the operating system environment is a Windows environment, a conversion protocol between the corresponding user interface and the user terminal is configured by modifying the registry;

[0020] When the operating system environment is a Linux environment, a conversion protocol between the corresponding user interface and the user terminal is configured by creating a configuration file in a specific directory.

[0021] Preferably, the user terminal further includes, according to the initialization script, installing tools and configuring the environment:

[0022] When the initialization script is an IDEA script, perform the following steps:

[0023] Check and install IDEA software, check and configure the corresponding environment variables;

[0024] Check and install Git software;

[0025] Check and configure the setting.xml file in Maven;

[0026] Check and install IDEA plugins;

[0027] When the initialization script is a VSCODE script, perform the following steps:

[0028] Check and install dependencies required for user interface development;

[0029] Check and install nvm files, check and configure corresponding environment variables;

[0030] Check and install the set version of node;

[0031] Check and install the .npmrc file, and set the npm central library as the central library of the artifact library;

[0032] Check and install Git software;

[0033] Check and install the VSCODE plugin.

[0034] Preferably, after inserting the task of opening the source code project into the task queue of the server based on the operation of opening the source code project by the user in the user interface, the method further comprises:

[0035] The user interface sends the user information of the task and the target application information to the server;

[0036] The server determines whether the branch of the target application in the information of the target application exists in the Gitlab server;

[0037] If so, the user information and the target application information are saved in the cache of the server;

[0038] If it does not exist, a branch of the target application is created in the Gitlab server, and the user information and the target application information are saved in the cache of the server.

[0039] Preferably, the user end uses the installed IDE plug-in to interact with the server end, and pulling the source code project of the target application to the user end further includes:

[0040] The user end obtains the user information in the user interface;

[0041] When the IDE plug-in is working, the interactive interface of the server is called according to the user's information to obtain the target application information required by the user;

[0042] Pull the branch of the target application to the user end according to the Gitlab path where the target application is located in the information of the target application;

[0043] Calling the interactive interface of the server according to the information of the target application to obtain the service plug-in information of the user interface to which the target application belongs;

[0044] Download the service plug-in through the IDE plug-in according to the download path of the service plug-in in the service plug-in information;

[0045] The interactive interface of the server is called to clear the user information and the target application information in the cache of the server.

[0046] On the other hand, an embodiment of the present specification provides a coding environment automatic deployment device, the device comprising:

[0047] An insertion module, configured to insert a task of opening a source code project into a task queue of a server based on an operation of opening a source code project by a user in a user interface, wherein the source code project is a source code project of a target application;

[0048] A type determination module is used for the server to determine the corresponding IDE plug-in type according to the construction method of the source code project, and prepare to interact with the corresponding type of IDE plug-in;

[0049] A configuration module, used to configure the conversion protocol between the corresponding user interface and the user terminal according to the operating system environment of the user terminal;

[0050] A command initiation module, used for the user interface to initiate a command to the user end based on the conversion protocol, and the user end starts the initialization script;

[0051] Installation configuration module, used by the user end to install tools and configure the environment according to the initialization script;

[0052] A pulling module, used for, when the source code project of the target application does not exist on the user end, the user end uses the installed IDE plug-in to interact with the server end to pull the source code project of the target application to the user end;

[0053] An opening module is used by a user to open the source code project based on an IDE window to perform subsequent operations;

[0054] The update module is used to complete the task of opening the source code project in the server-side update task queue.

[0055] On the other hand, an embodiment of the present specification further provides a computer device, including a memory, a processor, and a computer program stored in the memory, wherein when the computer program is executed by the processor, the instructions of any one of the above methods are executed.

[0056] On the other hand, an embodiment of the present specification further provides a computer-readable storage medium having a computer program stored thereon, wherein when the computer program is executed by a processor of a computer device, the computer program executes instructions of any one of the above-described methods.

[0057] On the other hand, the embodiments of this specification further provide a computer program product, which, when executed by a processor of a computer device, executes instructions according to any one of the methods described above.

[0058] It can be seen from the technical solution provided by the above embodiments of this specification that, through the method of the embodiments of this specification, after the user opens the source code project in the user interface, the task is inserted into the task queue of the server. The server determines the IDE plug-in type according to the construction method of the source code project to facilitate subsequent interactions, configures the conversion protocol between the user interface and the user end, initiates commands to the user end based on the conversion protocol, starts the initialization script, and then installs the tools and configuration environment according to the initialization script, and uses the installed IDE plug-in to interact with the server, pulls the source code project to the user end, and updates the task queue to prevent repeated processing of tasks. The above method can improve deployment efficiency through a unified coding environment deployment method.

[0059] In order to make the above and other purposes, features and advantages of the present specification more obvious and easy to understand, the following specifically cites preferred embodiments and describes them in detail with reference to the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0060] In order to more clearly illustrate the embodiments of this specification or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this specification. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0061] Figure 1 A schematic diagram of a process flow of a coding environment automatic deployment method provided by an embodiment of this specification is shown;

[0062] Figure 2 A flow chart of inserting a task of opening a source code project into a task queue of a server side based on an operation of opening a source code project in a user interface provided by an embodiment of this specification is shown;

[0063] Figure 3 A schematic diagram of a process for configuring a conversion protocol between a corresponding user interface and a user terminal according to an operating system environment of a user terminal provided in an embodiment of this specification is shown;

[0064] Figure 4 A flow chart of the case where the initialization script is an IDEA script is shown in the embodiment of this specification;

[0065] Figure 5 A schematic diagram of a process flow when the initialization script provided in the embodiment of this specification is a VSCODE script is shown;

[0066] Figure 6 A schematic diagram of a process in which a user end according to an embodiment of the present specification interacts with a server end by using an IDE plug-in to pull a source code project of a target application to the user is shown;

[0067] Figure 7 A schematic diagram of the module structure of a coding environment automatic deployment device provided in an embodiment of this specification is shown;

[0068] Figure 8 A schematic diagram of the structure of a computer device provided in an embodiment of this specification is shown.

[0069] Description of the accompanying symbols:

[0070] 100. Insert module;

[0071] 200. Type determination module;

[0072] 300. Configuration module;

[0073] 400, command initiation module;

[0074] 500. Install configuration module;

[0075] 600, pull module;

[0076] 700, open the module;

[0077] 800, update module;

[0078] 702. Computer equipment;

[0079] 704, processor;

[0080] 706. Memory;

[0081] 708, driving mechanism;

[0082] 710, input / output module;

[0083] 712. Input devices;

[0084] 714. Output devices;

[0085] 716. Presentation equipment;

[0086] 718. Graphical user interface;

[0087] 720, network interface;

[0088] 722. Communication link;

[0089] 724. Communication bus. DETAILED DESCRIPTION

[0090] The following will be combined with the drawings in the embodiments of this specification to clearly and completely describe the technical solutions in the embodiments of this specification. Obviously, the described embodiments are only part of the embodiments of this specification, not all of the embodiments. Based on the embodiments in this specification, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the embodiments of this specification.

[0091] At present, with the diversification of development projects and development technology stacks, the installation and configuration of coding environments and development tools in existing technologies are becoming increasingly complex. It often takes a long time for developers to obtain the project source code and complete the preparation of the coding environment and successfully build the source code. In particular, due to the overall transformation of information technology innovation, the coding environment has changed from a Windows-based environment to a Linux-based environment. Since there is no unified and efficient deployment method in the existing technology, the deployment environment takes a long time and the deployment method is not unified.

[0092] In order to solve the above problems, an embodiment of the present specification provides a method for automatic deployment of a coding environment. Figure 1 It is a flowchart of a method for automatic deployment of a coding environment provided by an embodiment of this specification. This specification provides method operation steps as described in the embodiment or flowchart, but may include more or fewer operation steps based on conventional or non-creative labor. The order of steps listed in the embodiment is only one way of executing the order of many steps and does not represent the only execution order. When the system or device product in practice is executed, it can be executed in the order of the method shown in the embodiment or the accompanying drawings or in parallel.

[0093] It should be noted that the terms "first", "second", etc. in the description and claims of the embodiments of this specification and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of this specification described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, device, product or equipment that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or equipment.

[0094] Reference Figure 1 , the embodiment of this specification provides a method for automatic deployment of a coding environment, including:

[0095] S101: based on an operation of opening a source code project by a user in a user interface, inserting a task of opening a source code project into a task queue of a server, wherein the source code project is a source code project of a target application;

[0096] S102: The server determines the corresponding IDE plug-in type according to the construction method of the source code project, and prepares to interact with the corresponding type of IDE plug-in;

[0097] S103: configuring a conversion protocol between the corresponding user interface and the user terminal according to the operating system environment of the user terminal;

[0098] S104: The user interface initiates a command to the user terminal based on the conversion protocol to start the initialization script;

[0099] S105: The user terminal installs tools and configures the environment according to the initialization script;

[0100] S106: When the source code project of the target application does not exist on the user end, the user end uses the installed IDE plug-in to interact with the server end to pull the source code project of the target application to the user end;

[0101] S107: The user terminal opens the source code project based on the IDE window and performs subsequent operations;

[0102] S108: The task of opening the source code project in the server-side update task queue is completed.

[0103] The embodiments of this specification include a user interface, a user end, and a server end. The user interface is a part of the user end, generally used to display information and receive user operations. The user can input user information in the user interface and open the source code project of the target application. The user end can receive information about the user's operations on the user interface.

[0104] Among them, refer to Figure 2 After inserting the task of opening the source code project into the task queue of the server based on the operation of opening the source code project by the user in the user interface, the method further includes:

[0105] S01: The user interface sends the user information of the task and the target application information to the server;

[0106] S02: The server determines whether the branch of the target application in the information of the target application exists in the Gitlab server;

[0107] S03: If it exists, save the user information and the target application information into the cache of the server;

[0108] S04: If it does not exist, create a branch of the target application in the Gitlab server, and save the user information and the target application information in the cache of the server.

[0109] After the user enters the user information in the user interface, he will further select the button to open the source code project of the target application locally. The user information and the target application information will be sent to the server, and the task of opening the source code project will be inserted into the task queue of the server. The user information includes the user name, etc., and the target application information includes the target application name, the Gitlab path where the target application is located, and the branch of the target application.

[0110] The purpose of creating a branch is to ensure that a specified branch exists on the GitLab server so that developers can develop and manage source code projects on this branch. The purpose of saving to the cache is to quickly access information and reduce repeated operations. If you save directly to the cache without creating a branch, the information in the cache may be inconsistent with the source code project on the GitLab server. For example, the cache shows that a branch exists, but in fact there is no such branch on the GitLab server, which will cause subsequent operations to go wrong. When this branch exists on the GitLab server, saving the user's information and the target application's information to the server's cache can avoid storing invalid or erroneous information in the cache.

[0111] The user information and the target application information are saved in the server cache to facilitate the subsequent interaction between the server and the user, so that the user can open the source code project based on the IDE window and perform subsequent operations.

[0112] Furthermore, the server determines the corresponding IDE plug-in type according to the construction method of the source code project, and prepares to interact with the corresponding type of IDE plug-in, specifically:

[0113] When the source code project includes a pom file built by Maven, determining that the corresponding IDE plug-in type is a plug-in corresponding to IDEA;

[0114] When the source code project includes a package.json file built by npm, it is determined that the corresponding IDE plug-in type is a plug-in corresponding to VSCODE.

[0115] IDEA and VSCODE are both IDE tools, and different IDE tools correspond to different plug-ins.

[0116] In order to convert the operation of opening the source code project in the user interface into a command that can be executed by the user end, it is also necessary to configure the conversion protocol between the corresponding user interface and the user end according to the operating system environment of the user end. Figure 3, specifically:

[0117] S201: Determine the operating system environment of the user terminal according to the JS script in the user interface;

[0118] S202: When the operating system environment is a Windows environment, a conversion protocol between a corresponding user interface and a user terminal is configured by modifying a registry;

[0119] S203: When the operating system environment is a Linux environment, a conversion protocol between the corresponding user interface and the user terminal is configured by creating a configuration file in a specific directory.

[0120] Generally speaking, the conversion protocol is configured by prefabricating an image. In Windows, the IDEA / VSCODE protocol is written to the registry so that the user interface can initiate commands to the user end when executing the IDEA / VSCODE protocol. In Linux, create a desktop file of the html protocol in the usr / share / applications directory, write the execution command in the desktop file, so that the user interface can execute the commands in the html protocol through the Xdg-Open protocol. And execute the following two commands in advance to make the custom protocol effective in the Linux environment:

[0121] update-desktop-database / usr / share / applications;

[0122] xdg-mime default html.desktop x-scheme-handler / html.

[0123] Further, the user interface initiates a command to the user end based on the conversion protocol, and the user end starts an initialization script. The source code projects of different target applications correspond to different IDE tools, including IDEA tools and VSCODE tools. The user end has different initialization scripts for different IDE tools. The user end further includes installing tools and configuring the environment according to the initialization script:

[0124] When the initialization script is an IDEA script, refer to Figure 4 , perform the following steps:

[0125] S301: Check and install IDEA software, check and configure corresponding environment variables, including environment variables such as IDEA, MAVEN, JDK, etc.

[0126] S302: Check and install Git software;

[0127] S303: Check and configure the setting.xml file in Maven;

[0128] S304: Check and install IDEA plug-in;

[0129] Finally start the IDEA tool.

[0130] When the initialization script is a VSCODE script, refer to Figure 5 , perform the following steps:

[0131] S401: Check and install dependencies required for user interface development;

[0132] S402: Check and install nvm files, check and configure corresponding environment variables;

[0133] S403: Check and install the set version of node; including node version 18.12.1 and 12.16.3;

[0134] S404: Check and install the .npmrc file, and set the npm central library therein as the central library of the product library;

[0135] S405: Check and install Git software;

[0136] S406: Check and install VSCODE plug-in;

[0137] Finally start the VSCODE tool.

[0138] The above-mentioned inspection and installation means: if it has been installed after the inspection, it does not need to be installed again. If it has not been installed after the inspection, it needs to be installed. The meaning of inspection and configuration is the same, and this manual will not repeat them.

[0139] Whether it is the IDEA tool or the VSCODE tool, you need to check whether the IDE tool has been started. If not, start the IDE instance.

[0140] The user-side IDE plug-in checks whether the source code project of the target application exists on the user side. If so, the corresponding IDE window is directly focused. If not, Git checks out the corresponding source code project and then opens the corresponding IDE window.

[0141] Specifically, if there is no source code project corresponding to the Git checkout, the user end uses the IDE plug-in to interact with the server end to pull the source code project of the target application to the user end, refer to Figure 6 , specifically:

[0142] S501: The user terminal obtains the user information in the user interface;

[0143] S502: When the IDE plug-in is working, the interactive interface of the server is called according to the user information to obtain the target application information required by the user, including the target application name, the Gitlab path where the target application is located, and the branch of the target application;

[0144] S503: Pull the branch of the target application to the user end according to the Gitlab path where the target application is located in the information of the target application;

[0145] S504: calling the interactive interface of the server according to the information of the target application to obtain the service plug-in information of the user interface to which the target application belongs;

[0146] S505: downloading the service plug-in through the IDE plug-in according to the download path of the service plug-in in the service plug-in information;

[0147] S506: calling the interactive interface of the server to clear the user information and the target application information in the cache of the server.

[0148] After the service plug-in is downloaded, the user terminal can provide corresponding service.

[0149] When the IDE tool is the IDEA tool, IDEA uses the application-level Listener interface to listen to application-level events, uses the environment variable os.name to determine whether the operating system environment is Windows or Linux, and determines whether a new project needs to be opened based on the already opened window. At the same time, it obtains user information through environment variables, and uses the user information to query the server-side interactive interface to obtain the task of opening the source code project, the user's Git Token information, the project type, and the business plug-in information that needs to be installed, extracts the source code project to the user side, opens the corresponding source code project, triggers the source code project-level Listener, checks the JDK-related SDK, and completes the configuration of the Maven build Settings according to the specifications and addresses. Finally, the task of opening the source code project in the server-side update task queue is completed.

[0150] When the IDE tool is the VSCODE tool, the plug-in corresponding to the VSCODE tool determines whether the operating system environment is Windows or Linux through the platform attribute of the node native module process, and then obtains the user's information through the environment variables, and uses the user's information to query the server interaction interface to obtain the user's open source project task, user Git Token information, project type and business plug-in information that needs to be installed in the user interface, and then executes the corresponding command through the VSCODE command line to install the required business plug-in, extract the source code project to the user end, open the source code project of the target application, and finally the server updates the task of opening the source code project in the task queue as completed.

[0151] Through the method of the embodiment of this specification, after the user opens the source code project in the user interface, the task is inserted into the task queue of the server. The server determines the IDE plug-in type according to the construction method of the source code project to facilitate subsequent interaction, configures the conversion protocol between the user interface and the user end, initiates a command to the user end based on the conversion protocol, starts the initialization script, and then installs the tool and configures the environment according to the initialization script, and uses the installed IDE plug-in to interact with the server, pulls the source code project to the user end, and updates the task queue to prevent repeated processing of tasks. The above method can improve deployment efficiency through a unified coding environment deployment method.

[0152] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, storage, use, processing, transmission, provision, disclosure and application of the relevant data comply with the relevant laws, regulations and standards of the relevant countries and regions, take necessary confidentiality measures, do not violate public order and good morals, and provide corresponding operation entrances for users to choose to authorize or refuse.

[0153] This application provides users with corresponding big data analysis (such as personal biometrics, identity data, consumption data, asset data, electronic terminal operation data, etc.) operation entrances for users to choose to agree or reject automated decision-making results; if the user chooses to reject, the expert decision-making process will be entered.

[0154] Based on the above-described method for automatically deploying a coding environment, an embodiment of this specification also provides a device for automatically deploying a coding environment. The device may include a system (including a distributed system), software (application), module, component, server, client, etc. using the method described in the embodiment of this specification and a device in combination with necessary implementation hardware. Based on the same innovative concept, the device in one or more embodiments provided in the embodiment of this specification is as described in the following embodiments. Since the implementation scheme and method for solving the problem of the device are similar, the implementation of the specific device in the embodiment of this specification can refer to the implementation of the aforementioned method, and the repetitions will not be repeated. As used below, the term "unit" or "module" can implement a combination of software and / or hardware for a predetermined function. Although the device described in the following embodiments is preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceived.

[0155] Specifically, Figure 7 This is a schematic diagram of the module structure of an embodiment of a coding environment automatic deployment device provided in the embodiment of this specification, referring to Figure 7 As shown, an automatic deployment device for a coding environment provided by an embodiment of this specification includes: an insertion module 100, a type determination module 200, a configuration module 300, a command initiation module 400, an installation configuration module 500, a pull module 600, an opening module 700, and an update module 800.

[0156] The inserting module 100 is used to insert a task of opening a source code project into a task queue of a server based on an operation of opening a source code project by a user in a user interface, wherein the source code project is a source code project of a target application;

[0157] The type determination module 200 is used for the server to determine the corresponding IDE plug-in type according to the construction method of the source code project, and prepare to interact with the corresponding type of IDE plug-in;

[0158] Configuration module 300, used to configure the conversion protocol between the corresponding user interface and the user terminal according to the operating system environment of the user terminal;

[0159] A command initiation module 400, for the user interface to initiate a command to the user end based on the conversion protocol, and the user end starts an initialization script;

[0160] Installation configuration module 500, used by the user end to install tools and configure the environment according to the initialization script;

[0161] The pulling module 600 is used for, when the source code project of the target application does not exist on the user end, the user end uses the installed IDE plug-in to interact with the server end to pull the source code project of the target application to the user end;

[0162] The opening module 700 is used for the user end to open the source code project based on the IDE window and perform subsequent operations;

[0163] The updating module 800 is used to complete the task of opening the source code project in the server-side updating task queue.

[0164] Reference Figure 8As shown, based on the above-mentioned method for automatic deployment of a coding environment, a computer device 702 is also provided in an embodiment of this specification, wherein the above-mentioned method is run on the computer device 702. The computer device 702 may include one or more processors 704, such as one or more central processing units (CPUs) or graphics processing units (GPUs), and each processing unit may implement one or more hardware threads. The computer device 702 may also include any memory 706, which is used to store any kind of information such as code, settings, data, etc. In a specific implementation, a computer program on the memory 706 and executable on the processor 704, when the computer program is executed by the processor 704, can execute instructions according to the above-mentioned method. Non-limitingly, for example, the memory 706 may include any one or more combinations of the following: any type of RAM, any type of ROM, flash memory device, hard disk, optical disk, etc. More generally, any memory may use any technology to store information. Further, any memory may provide volatile or non-volatile retention of information. Further, any memory may represent a fixed or removable component of the computer device 702. In one embodiment, when the processor 704 executes the associated instructions stored in any memory or combination of memories, the computer device 702 can perform any operation of the associated instructions. The computer device 702 also includes one or more drive mechanisms 708 for interacting with any memory, such as a hard disk drive mechanism, an optical disk drive mechanism, etc.

[0165] The computer device 702 may also include an input / output module 710 (I / O) for receiving various inputs (via input devices 712) and for providing various outputs (via output devices 714). A specific output mechanism may include a presentation device 716 and an associated graphical user interface 718 (GUI). In other embodiments, the input / output module 710 (I / O), input device 712, and output device 714 may not be included, and the computer device 702 may be used as a computer device in a network. The computer device 702 may also include one or more network interfaces 720 for exchanging data with other devices via one or more communication links 722. One or more communication buses 724 couple the components described above together.

[0166] The communication link 722 may be implemented in any manner, for example, through a local area network, a wide area network (e.g., the Internet), a point-to-point connection, etc., or any combination thereof. The communication link 722 may include any combination of hardwired links, wireless links, routers, gateway functions, name servers, etc. governed by any protocol or combination of protocols.

[0167] Corresponds to Figure 1-Figure 6The method in the embodiment of the present specification also provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the steps of the above method are executed.

[0168] The embodiment of the present specification also provides a computer-readable instruction, wherein when the processor executes the instruction, the program therein causes the processor to execute the following Figures 1 to 6 The method shown.

[0169] The present specification also provides a computer program product. When the computer program product is executed by a processor of a computer device, the computer program product performs the following steps: Figures 1 to 6 The method shown.

[0170] The computer program product described in this specification is a software product that mainly implements the method described in this specification through a computer program.

[0171] It should be understood that in the various embodiments of this specification, the size of the serial numbers of the above-mentioned processes does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this specification.

[0172] It should also be understood that in the embodiments of this specification, the term "and / or" is only a description of the association relationship of the associated objects, indicating that three relationships can exist. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " in the embodiments of this specification generally indicates that the associated objects before and after are in an "or" relationship.

[0173] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed in the embodiments of this specification can be implemented with electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in terms of function in the above description. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of the embodiments of this specification.

[0174] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0175] In the several embodiments provided in this specification, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or units, or it can be an electrical, mechanical or other form of connection.

[0176] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the embodiments of this specification.

[0177] In addition, each functional unit in each embodiment of this specification may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0178] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the embodiment of this specification is essentially or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of this specification. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk and other media that can store program code.

[0179] Specific embodiments are used in this specification to illustrate the principles and implementation methods of the embodiments of this specification. The description of the above embodiments is only used to help understand the methods and core ideas of the embodiments of this specification. At the same time, for those skilled in the art, according to the ideas of the embodiments of this specification, there will be changes in the specific implementation methods and application scopes. In summary, the content of this specification should not be understood as a limitation on the embodiments of this specification.

Claims

1. A method for automatic deployment of a coding environment, characterized in that: include: Based on the operation of opening a source code project by the user in the user interface, inserting a task of opening the source code project into a task queue of the server, wherein the source code project is a source code project of a target application; The server determines the corresponding IDE plug-in type according to the construction method of the source code project, and prepares to interact with the corresponding type of IDE plug-in; According to the operating system environment of the user terminal, configure the conversion protocol between the corresponding user interface and the user terminal; The user interface initiates a command to the user terminal based on the conversion protocol, and the user terminal starts an initialization script; The user terminal installs tools and configures the environment according to the initialization script; When the source code project of the target application does not exist on the user end, the user end uses the installed IDE plug-in to interact with the server end to pull the source code project of the target application to the user end; The user terminal opens the source code project based on the IDE window and performs subsequent operations; The task of opening the source code project in the server update task queue is completed.

2. The method according to claim 1, characterized in that The server determines the corresponding IDE plug-in type according to the construction method of the source code project, further comprising: When the source code project includes a pom file built by Maven, determining that the corresponding IDE plug-in type is a plug-in corresponding to IDEA; When the source code project includes a package.json file built by npm, it is determined that the corresponding IDE plug-in type is a plug-in corresponding to VSCODE.

3. The method according to claim 1, characterized in that: The step of configuring the conversion protocol between the corresponding user interface and the user terminal according to the operating system environment of the user terminal further includes: Determine the operating system environment of the user terminal according to the JS script in the user interface; When the operating system environment is a Windows environment, a conversion protocol between the corresponding user interface and the user terminal is configured by modifying the registry; When the operating system environment is a Linux environment, a conversion protocol between the corresponding user interface and the user terminal is configured by creating a configuration file in a specific directory.

4. The method according to claim 1, characterized in that: The user terminal further includes, according to the initialization script, installing tools and configuring the environment: When the initialization script is an IDEA script, perform the following steps: Check and install IDEA software, check and configure the corresponding environment variables; Check and install Git software; Check and configure the setting.xml file in Maven; Check and install IDEA plugins; When the initialization script is a VSCODE script, perform the following steps: Check and install dependencies required for user interface development; Check and install nvm files, check and configure corresponding environment variables; Check and install the set version of node; Check and install the .npmrc file, and set the npm central library as the central library of the artifact library; Check and install Git software; Check and install the VSCODE plugin.

5. The method according to claim 1, characterized in that The method further comprises: inserting the task of opening the source code project into the task queue of the server based on the operation of opening the source code project by the user in the user interface; The user interface sends the user information of the task and the target application information to the server; The server determines whether the branch of the target application in the information of the target application exists in the Gitlab server; If so, the user information and the target application information are saved in the cache of the server; If it does not exist, a branch of the target application is created in the Gitlab server, and the user information and the target application information are saved in the cache of the server.

6. The method according to claim 5, characterized in that The user end uses the installed IDE plug-in to interact with the server end, and pulls the source code project of the target application to the user end, further comprising: The user end obtains the user information in the user interface; When the IDE plug-in is working, the interactive interface of the server is called according to the user's information to obtain the target application information required by the user; Pull the branch of the target application to the user end according to the Gitlab path where the target application is located in the information of the target application; Calling the interactive interface of the server according to the information of the target application to obtain the service plug-in information of the user interface to which the target application belongs; Download the service plug-in through the IDE plug-in according to the download path of the service plug-in in the service plug-in information; The interactive interface of the server is called to clear the user information and the target application information in the cache of the server.

7. A coding environment automatic deployment device, characterized in that: The device comprises: An insertion module, configured to insert a task of opening a source code project into a task queue of a server based on an operation of opening a source code project by a user in a user interface, wherein the source code project is a source code project of a target application; A type determination module is used for the server to determine the corresponding IDE plug-in type according to the construction method of the source code project, and prepare to interact with the corresponding type of IDE plug-in; A configuration module, used to configure the conversion protocol between the corresponding user interface and the user terminal according to the operating system environment of the user terminal; A command initiation module, used for the user interface to initiate a command to the user end based on the conversion protocol, and the user end starts the initialization script; Installation configuration module, used by the user end to install tools and configure the environment according to the initialization script; A pulling module, used for, when the source code project of the target application does not exist on the user end, the user end uses the installed IDE plug-in to interact with the server end to pull the source code project of the target application to the user end; An opening module is used by a user to open the source code project based on an IDE window to perform subsequent operations; The update module is used to complete the task of opening the source code project in the server-side update task queue.

8. A computer device comprising a memory, a processor, and a computer program stored in the memory, characterized in that: When the computer program is executed by the processor, the computer program executes the instructions of the method according to any one of claims 1 to 6.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor of a computer device, the computer program executes instructions of the method according to any one of claims 1 to 6.

10. A computer program product, characterized in that When the computer program product is executed by a processor of a computer device, the computer program product executes instructions of the method according to any one of claims 1 to 6.