Development environment configuration method and device, storage medium and electronic equipment

By creating an integrated development environment container and generating an access address, the complexity of environment configuration in multi-person collaborative development is solved, development efficiency is improved, and development environments are unified and shared.

CN118550577AInactive Publication Date: 2024-08-27CHINA UNIONPAY MERCHANT SERVICES CO LTD

Patent Information

Application Number
CN202411026054.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-30
Publication Date
2024-08-27
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

When multiple people collaborate to develop software, due to differences in developers' operating systems and environment configurations, the software development environment configuration is complex and difficult to unify, resulting in developers needing to perform a lot of repetitive work and causing low efficiency.

Method used

By obtaining the environment configuration for the source code warehouse address, create an integrated development environment container, install dependent software, editors, debuggers, and install plug-ins for them, generate access addresses to share the development environment, and reduce repeated configuration operations.

Benefits of technology

This improves efficiency by eliminating the need to repeatedly configure the development environment. Team members can obtain a unified integrated development environment through the access address, simplifying the creation and sharing of development environments.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118550577A
    Figure CN118550577A
Patent Text Reader

Abstract

The invention discloses a development environment configuration method and device, a storage medium and electronic equipment. The method comprises the steps that environment configuration for a first source code warehouse address can be obtained; according to the environment configuration, a corresponding integrated development environment container is created, and the integrated development environment container comprises a basic mirror image and a container application; installing corresponding dependent software in the integrated development environment container; installing a corresponding editor and a debugger in the integrated development environment container, and installing corresponding plug-ins for the editor and the debugger; and generating an access address of the integrated development environment container, so that a user can obtain the integrated development environment container for configuring the development environment according to the access address. According to the method, the integrated development environment container of the source code can be established and then shared to other users through the access address, other users can directly obtain the corresponding integrated development environment container through the access address to configure the development environment, repeated development environment configuration operation is not needed any more, and efficiency is high.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computers, and in particular to a development environment configuration method, device, storage medium and electronic equipment. Background Art

[0002] When multiple people collaborate to develop software, each person needs to spend a lot of repetitive work to configure the software development environment. Due to differences in operating systems and environment configurations among developers, the software development environment configuration is often complex and difficult to unify, causing developers to need to do a lot of repetitive work and low efficiency. Summary of the invention

[0003] In view of the above problems, the present invention provides a development environment configuration method, device, storage medium and electronic device that overcome the above problems or at least partially solve the above problems.

[0004] In a first aspect, a development environment configuration method includes:

[0005] Obtaining an environment configuration for the first source code repository address;

[0006] According to the environment configuration, create a corresponding integrated development environment container, wherein the integrated development environment container includes: a basic image and a container application;

[0007] Installing corresponding dependent software in the integrated development environment container;

[0008] Installing a corresponding editor and debugger in the integrated development environment container, and installing corresponding plug-ins for the editor and the debugger;

[0009] An access address of the integrated development environment container is generated so that a user can obtain the integrated development environment container according to the access address for configuring a development environment.

[0010] Optionally, in some optional implementations, obtaining the environment configuration for the first source code repository address includes:

[0011] Obtain the first source code repository address of the project to be developed input by the user;

[0012] Obtaining, through a form, environment configuration parameters input by the user for the first source code repository address;

[0013] According to the environment configuration parameters, corresponding environment configuration definition metadata is generated as the environment configuration of the first source code repository address.

[0014] Optionally, in some optional implementations, creating a corresponding integrated development environment container according to the environment configuration includes:

[0015] Create a temporary container;

[0016] According to the environment configuration, a corresponding integrated development environment container is created in the temporary container.

[0017] Optionally, in some optional implementations, creating a corresponding integrated development environment container in the temporary container according to the environment configuration includes:

[0018] According to the environment configuration, obtaining source code corresponding to the first source code warehouse address;

[0019] Traversing the setting file directory of the source code and checking the environment configuration definition metadata to generate a corresponding configuration file;

[0020] According to the configuration file, corresponding resources are obtained, wherein the resources include: number of CPU cores, memory size and storage space;

[0021] According to the configuration file, download the corresponding basic image from the image repository, wherein the corresponding integrated development environment is pre-installed in the basic image;

[0022] According to the basic image, the container application of the integrated development environment is deployed in the temporary container, thereby establishing the integrated development environment container.

[0023] Optionally, in some optional implementations, the installing corresponding dependent software in the integrated development environment container includes:

[0024] According to the dependency configuration definition in the configuration file, the corresponding dependency software is installed in the integrated development environment container.

[0025] Optionally, in some optional implementations, the installing a corresponding editor and debugger in the integrated development environment container, and installing corresponding plug-ins for the editor and the debugger, includes:

[0026] Installing corresponding editors and debuggers in the integrated development environment container;

[0027] According to the configuration information of the editor and the debugger in the configuration file, corresponding plug-ins are installed for the editor and the debugger.

[0028] Optionally, in some optional implementations, generating an access address of the integrated development environment container so that a user can obtain the integrated development environment container according to the access address for configuring a development environment includes:

[0029] Based on a preset address generation rule, an access address of the integrated development environment container is generated, wherein the integrated development environment container corresponds to the access address one by one;

[0030] The user obtains the integrated development environment container according to the access address;

[0031] Pulling the source code from the first source code repository address in the integrated development environment container;

[0032] Based on the source code, the editor and debugger in the integrated development environment container are run to run the integrated development environment container and configure the corresponding development environment.

[0033] In a second aspect, a development environment configuration device includes: an environment configuration obtaining unit, an environment container creating unit, a dependent software installing unit, a plug-in installing unit, and an access address generating unit;

[0034] The environment configuration obtaining unit is used to obtain the environment configuration for the first source code repository address;

[0035] The environment container creation unit is used to create a corresponding integrated development environment container according to the environment configuration, wherein the integrated development environment container includes: a basic image and a container application;

[0036] The dependent software installation unit is used to install the corresponding dependent software in the integrated development environment container;

[0037] The plug-in installation unit is used to install the corresponding editor and debugger in the integrated development environment container, and install the corresponding plug-ins for the editor and the debugger;

[0038] The access address generating unit is used to generate an access address of the integrated development environment container, so that the user can obtain the integrated development environment container according to the access address for configuring the development environment.

[0039] In a third aspect, a computer-readable storage medium stores a program, which, when executed by a processor, implements any of the above-mentioned development environment configuration methods.

[0040] In a fourth aspect, an electronic device comprises at least one processor, and at least one memory and a bus connected to the processor; wherein the processor and the memory communicate with each other via the bus; and the processor is used to call program instructions in the memory to execute any of the development environment configuration methods described above.

[0041] By means of the above technical scheme, a development environment configuration method, device, storage medium and electronic device provided by the present invention can obtain the environment configuration for the first source code warehouse address; according to the environment configuration, create a corresponding integrated development environment container, wherein the integrated development environment container includes: a basic image and a container application; install the corresponding dependent software in the integrated development environment container; install the corresponding editor and debugger in the integrated development environment container, and install the corresponding plug-in for the editor and the debugger; generate the access address of the integrated development environment container, so that the user can obtain the integrated development environment container according to the access address for configuring the development environment. It can be seen from this that the present invention can establish an integrated development environment container of the source code, and then share it with other users through the access address. Other users can directly obtain the corresponding integrated development environment container through the access address for configuring the development environment, without the need to perform repeated development environment configuration operations, and the efficiency is high.

[0042] The above description is only an overview of the technical solution of the present invention. In order to more clearly understand the technical means of the present invention, it can be implemented according to the contents of the specification. In order to make the above and other purposes, features and advantages of the present invention more obvious and easy to understand, the specific implementation methods of the present invention are listed below. BRIEF DESCRIPTION OF THE DRAWINGS

[0043] Various other advantages and benefits will become apparent to those of ordinary skill in the art by reading the detailed description of the preferred embodiments below. The accompanying drawings are only for the purpose of illustrating the preferred embodiments and are not to be considered as limiting the present invention. Moreover, the same reference symbols are used throughout the accompanying drawings to represent the same components. In the accompanying drawings:

[0044] Figure 1 A flow chart showing a first development environment configuration method provided by the present invention is shown;

[0045] Figure 2 A flow chart showing a second development environment configuration method provided by the present invention is shown;

[0046] Figure 3 A schematic diagram of the structure of a development environment configuration device provided by the present invention is shown;

[0047] Figure 4 A structural schematic diagram of an electronic device provided by the present invention is shown. DETAILED DESCRIPTION

[0048] The exemplary embodiments of the present invention will be described in more detail below with reference to the accompanying drawings. Although the exemplary embodiments of the present invention are shown in the accompanying drawings, it should be understood that the present invention can be implemented in various forms and should not be limited by the embodiments set forth herein. On the contrary, these embodiments are provided in order to enable a more thorough understanding of the present invention and to enable the scope of the present invention to be fully communicated to those skilled in the art.

[0049] like Figure 1 As shown, the present invention provides a development environment configuration method, including: S100, S200, S300, S400 and S500;

[0050] S100, obtaining an environment configuration for a first source code warehouse address;

[0051] Optionally, the overall architecture of the present invention may be a B / S architecture (browser-server architecture). That is, the execution subject of the present invention may include a front-end browser and a back-end server, and the present invention does not limit this.

[0052] Optionally, in some optional embodiments, the S100 includes: step 1.1, step 1.2 and step 1.3;

[0053] Step 1.1, obtaining the first source code repository address of the project to be developed input by the user;

[0054] Optionally, the user can access the address of the front-end tool software of the present invention in a browser to enter the front-end tool software of the present invention, and then enter the environment configuration parameters in the front-end tool software, which is not limited by the present invention.

[0055] Optionally, the address of the front-end tool software can be set in advance, and the user can access the address within the local area network. For security reasons, the external network is generally not allowed to access it. Of course, the present invention can also allow the external network to access the front-end tool software through the address in combination with actual needs, and the present invention does not limit this.

[0056] Optionally, the front-end tool software provides a rich interactive interface for display and interaction. For example, the user can select or input the first source code warehouse address in the front-end tool software, and the present invention does not limit this.

[0057] Optionally, the first source code repository address can be divided into two situations. The first situation: the user who logs in to the front-end tool software is the maintainer of a certain software source code. The original source code is created and maintained by the user in the source code repository management system. Such systems generally provide an access address for the source code in the source code system. The second situation: the user is a co-developer of a certain software project. For this user, other people or the system need to know in advance which source code repository management system the source code mentioned in the first situation above is in, as well as the specific access address.

[0058] Step 1.2: Obtaining environment configuration parameters input by the user for the first source code repository address through a form;

[0059] Optionally, the user can enter the environment configuration parameters by selecting through a drop-down form or directly entering the form in the front-end tool software. For example, after executing step 1.1, the browser page can switch to the option page of step 1.2. Three drop-down selection boxes are provided in the option page, one is the integrated development environment (IDE) to be created, and the other is a combination of the number of CPU cores + memory size + disk capacity that can be selected. The optional items of the integrated development environment can be hard-coded. The combination of the number of CPU cores + memory size + disk capacity can be set in the database of the present invention. If the user does not make a selection in this step, the present invention can be submitted to the next step according to the default options of each drop-down selection box, and the present invention does not limit this.

[0060] Step 1.3: Generate corresponding environment configuration definition metadata as the environment configuration of the first source code repository address according to the environment configuration parameters.

[0061] Optionally, defining metadata according to parameters is a well-known technical solution in the art, and the present invention will not describe this in detail. For details, please refer to the relevant explanations in the art. It should be noted that the environment configuration definition metadata of the present invention records the information of various configurations required to configure a certain development environment. The corresponding development environment can be accurately configured through the environment configuration definition metadata, and the present invention does not limit this.

[0062] S200. Create a corresponding integrated development environment container according to the environment configuration, wherein the integrated development environment container includes: a basic image and a container application;

[0063] Optionally, the front-end tool software can send a corresponding creation request to the back-end server of the present invention according to the generated environment configuration. The creation request carries the generated environment configuration, which is not limited by the present invention.

[0064] Optionally, in combination with the foregoing explanation, after receiving the creation request of the front-end tool software, the back-end server can create a corresponding integrated development environment container in a targeted manner. It should be noted that: the present invention uses containerization technology. Containerization technology is a lightweight, portable, self-contained software packaging technology that enables applications to run in the same way almost anywhere. It can be simply understood as a virtualization technology that is lighter than a virtual machine. Image: An application packaged using containerization technology. An image is a disk file. Image repository: Similar to a source code repository, an image repository is a system for managing and maintaining images. Container: A running container image.

[0065] In order to manage containers well, the present invention can use open source container orchestration software to simplify the management and deployment of containerized applications. Container orchestration software provides a mechanism to deploy, plan, update and maintain containerized applications.

[0066] The present invention uses the above-mentioned containerization technology and open source software to pre-build a basic container image (ie, an integrated development environment container), but the present invention does not impose any limitation on this.

[0067] For example, in some optional embodiments, the S200 includes: step 2.1 and step 2.2;

[0068] Step 2.1, create a temporary container;

[0069] Step 2.2: Create a corresponding integrated development environment container in the temporary container according to the environment configuration.

[0070] For example, in some optional embodiments, the step 2.2 includes: step 3.1, step 3.2, step 3.3, step 3.4 and step 3.5;

[0071] Step 3.1, according to the environment configuration, obtaining the source code corresponding to the first source code warehouse address;

[0072] Optionally, the development environment to be configured is associated with the project code to be developed. Therefore, when creating an integrated development environment container, it is necessary to first obtain the corresponding source code so as to subsequently create the corresponding integrated development environment container according to the needs of the source code, which is not limited by the present invention.

[0073] Optionally, the environment configuration may carry the first source code warehouse address, and the present invention may download the corresponding source code file from the source code warehouse through an API according to the address, and the present invention does not impose any limitation on this.

[0074] For example, the present invention can use the most widely used source code repository, such as an open source distributed version control system, to effectively and quickly handle version management of projects from very small to very large. The process of obtaining source code in the present invention is to use the HTTP API provided by the source code repository to initiate a download of a specified source code file from the source code repository.

[0075] Step 3.2, traverse the setting file directory of the source code and check the environment configuration definition metadata to generate a corresponding configuration file;

[0076] Optionally, in combination with the above explanation, after the source code is downloaded to the container, assuming that it is downloaded to the disk directory " / abc" in the container, the present invention can traverse and check the files in the " / abc" directory of the created container. The present invention has some built-in traversal rules, for example: if it contains a pom.xml file, it is considered to be a Java language source code, and if it contains a package.json file, it is considered to be a Javascipt language source code, and the present invention does not limit this.

[0077] Optionally, in an actual project of the present invention, it is also possible to check whether the " / abc" directory contains a special file "devunity.yml" and make a record, which is not limited by the present invention.

[0078] Optionally, the present invention can also check whether there is environment configuration definition metadata, and if so, a corresponding configuration file can be generated later. That is, the present invention can combine the information obtained by traversing the source code and checking the environment configuration definition metadata to generate an internal configuration file, so as to apply the configuration file in subsequent steps.

[0079] Optionally, for the same content, if it is provided in the "devunity.yml" file, the content provided by the "devuntiy.yml" file shall prevail. Of course, the present invention can also choose to take the content provided by the environment configuration definition metadata as the basis according to actual needs, or combine the content provided by the "devunity.yml" file and the content provided by the environment configuration definition metadata, and the present invention is not limited to this.

[0080] Step 3.3, according to the configuration file, obtain corresponding resources, wherein the resources include: number of CPU cores, memory size and storage space;

[0081] Optionally, as mentioned above, part of the configuration file is derived from the environment configuration definition metadata. That is, based on the environment configuration definition metadata recorded in the configuration file, the present invention can apply to the underlying container management system for resources such as the number of CPU cores, memory size, and storage space, and the present invention does not limit this.

[0082] Step 3.4: Download the corresponding basic image from the image repository according to the configuration file, wherein the basic image is pre-installed with the corresponding integrated development environment;

[0083] Optionally, the present invention can call the image download API provided by the container orchestration software to download the specified base image from the image warehouse. Here, what is downloaded is an image with an integrated development environment pre-installed, and the present invention does not limit this.

[0084] Optionally, the environment configuration definition metadata involves the integrated development environment selected by the user, so when downloading the base image, the corresponding base image is downloaded based on the integrated development environment included in the environment configuration definition metadata. In order to improve the applicability and efficiency of the present invention, the present invention can package multiple base images of different integrated development environments in advance, and the present invention does not limit this.

[0085] Optionally, the reason for pulling the base image is: if the above identification determines that the "devunity.yml" file exists, then you need to read the file and check the content in the image field. If the image value is set, it means that the user requires a custom image as part of the development environment. Therefore, this step requires pulling the base image corresponding to the image value, then extracting the content in the custom image, merging it with the image of the integrated development environment, generating a new image, and saving it to the image repository.

[0086] Step 3.5: Deploy the container application of the integrated development environment in the temporary container according to the basic image, thereby establishing the integrated development environment container.

[0087] Optionally, creating an integrated development environment container is to initiate an API request for creating a container to a cluster of the container orchestration software through a client of the container orchestration software. In the parameters of the request initiated to the cluster of the container orchestration software, it is specified that the created container is created based on the above-mentioned merged new image.

[0088] Optionally, the integrated development environment container mentioned here can also be understood as a basic container of a working environment, which includes the content of the aforementioned basic image and the content of the image of the integrated development environment, and the present invention is not limited to this.

[0089] S300, installing corresponding dependent software in the integrated development environment container;

[0090] For example, in some optional embodiments, the S300 includes: step 4.1;

[0091] Step 4.1: Install corresponding dependent software in the integrated development environment container according to the dependent configuration definition in the configuration file.

[0092] Optionally, the present invention may install related dependent software, such as development language, database, cache and other dependent software, in the target integrated development environment container according to the dependency configuration definition in the configuration file, and the present invention is not limited to this.

[0093] S400, installing a corresponding editor and debugger in the integrated development environment container, and installing corresponding plug-ins for the editor and the debugger;

[0094] Optionally, in some optional implementations, the S400 includes: step 5.1 and step 5.2;

[0095] Step 5.1, installing the corresponding editor and debugger in the integrated development environment container;

[0096] Optionally, the editor and debugger mentioned in the present invention are editors and debuggers used during programming. Any feasible editor and debugger are within the protection scope of the present invention, and the present invention does not impose any limitation on this.

[0097] Step 5.2: Install corresponding plug-ins for the editor and the debugger according to the configuration information of the editor and the debugger in the configuration file.

[0098] Optionally, part of the configuration information of the editor and debugger comes from the internal configuration file generated by checking the source code, part is obtained through rule analysis, and part is defined from the extentions field in the above "devunity.yml" file, which defines the user-defined plug-ins to be installed, and the present invention does not limit this.

[0099] S500: Generate an access address of the integrated development environment container so that a user can obtain the integrated development environment container according to the access address for configuring a development environment.

[0100] For example, in some optional embodiments, the S500 includes: step 6.1, step 6.2, step 6.3 and step 6.4;

[0101] Step 6.1: Generate an access address of the integrated development environment container based on a preset address generation rule, wherein the integrated development environment container corresponds to the access address one by one;

[0102] Optionally, the present invention can generate an access address through built-in rules. The format of the access address is "random string-name of the source code project.ws.domain name suffix". The domain name suffix is ​​the domain name corresponding to the URL of the aforementioned front-end tool software. Assuming that the domain name suffix is ​​"a.com", and assuming that the project name pulled from the source code repository at this time is "abc", the final access address generated is: random string-abc.ws.a.com, and the random string is filled in according to the actual situation. The random string is used to distinguish the same source code project, and there may be multiple online development environments. For example, both users A and B are creating. Or a user creates two environments for the abc project, one for developing new functions and one for fixing bugs, etc. The present invention does not limit this.

[0103] Step 6.2: The user obtains the integrated development environment container according to the access address;

[0104] Optionally, after the access address is generated, the browser page of the present invention can jump to the page corresponding to the access address. Of course, the present invention can also send the access address to other users so that other users can obtain the integrated development environment container based on the access address, and the present invention does not limit this.

[0105] Step 6.3: Pull the source code of the first source code repository address in the integrated development environment container;

[0106] Optionally, after obtaining the integrated development environment container, the present invention may re-pull the source code in the source code repository (ie, the source code at the first source code repository address) in the integrated development environment container, and the present invention does not limit this.

[0107] Step 6.4: Based on the source code, run the editor and debugger in the integrated development environment container to run the integrated development environment container and configure the corresponding development environment.

[0108] Optionally, the present invention can execute the automatic construction process of the editor and debugger to load and start the software project. This is a function of the integrated development environment, and most integrated development environments have the ability to automatically build (automatically compile) the software projects under their working directory when they are opened.

[0109] Optionally, the present invention adopts containerization technology to achieve unified configuration, web page access and sharing functions of the development environment through a browser-server architecture.

[0110] The browser is responsible for displaying and interacting with the user interface, and provides functions such as environment configuration, code editing, and debugging. The server is responsible for storing and managing development environment data, including container images, configuration files, and source code.

[0111] In the present invention, users can create a new development environment through the browser side, select the required development tools, dependent libraries and configuration files. The server side will generate a container image based on the user's configuration and store it on the server. When the development environment needs to be initialized, the user only needs to specify the source code warehouse address, and the present invention will automatically pull the code and start the container to complete the initialization of the environment.

[0112] In addition, the present invention also provides a web page access function. Team members can access the unified development environment through the web page interface to perform operations such as code editing, running programs, and viewing logs. This method does not require the installation of additional development tools, which improves the convenience of team collaboration.

[0113] In addition, the present invention implements a sharing function of the development environment status. When a team member encounters a problem, the current development environment status can be fully shared with other members. The present invention can generate a sharing link containing the environment configuration, and other members can load and reproduce the environment through the link to collaboratively solve the problem.

[0114] In addition, the present invention also supports the configurability of the development environment. Users can customize the required development tools, dependent libraries and configuration files according to different software development projects. The present invention provides a flexible template system to facilitate users to quickly create and reuse development environment configurations.

[0115] Finally, the present invention is integrated with mainstream source code management software. Users can add the metadata configuration file unique to the present invention to the source code engineering project. After pulling the project source code, the metadata configuration file can be read to initialize the entire development environment with one click, including the steps of pulling code, configuring the development environment, etc., thereby improving development efficiency.

[0116] In order to clearly describe the complete process of the present invention, the present invention provides Figure 2 The flowchart shown in FIG. 1 fully describes the execution process of the present invention. Figure 2 Please refer to the above explanation for each step in the process.

[0117] like Figure 3 As shown, the present invention provides a development environment configuration device, including: an environment configuration obtaining unit 100, an environment container creating unit 200, a dependent software installing unit 300, a plug-in installing unit 400 and an access address generating unit 500;

[0118] The environment configuration obtaining unit 100 is used to obtain the environment configuration for the first source code repository address;

[0119] The environment container creation unit 200 is used to create a corresponding integrated development environment container according to the environment configuration, wherein the integrated development environment container includes: a basic image and a container application;

[0120] The dependent software installation unit 300 is used to install the corresponding dependent software in the integrated development environment container;

[0121] The plug-in installation unit 400 is used to install the corresponding editor and debugger in the integrated development environment container, and install the corresponding plug-ins for the editor and the debugger;

[0122] The access address generating unit 500 is used to generate an access address of the integrated development environment container, so that the user can obtain the integrated development environment container according to the access address for configuring the development environment.

[0123] Optionally, in some optional implementations, the environment configuration obtaining unit 100 includes: a code address obtaining subunit, a configuration parameter obtaining subunit and a metadata definition subunit;

[0124] The code address obtaining subunit is used to obtain the first source code repository address of the project to be developed input by the user;

[0125] The configuration parameter obtaining subunit is used to obtain the environment configuration parameters input by the user for the first source code repository address through a form;

[0126] The metadata definition subunit is used to generate corresponding environment configuration definition metadata as the environment configuration of the first source code repository address according to the environment configuration parameters.

[0127] Optionally, in some optional implementations, the environment container creation unit 200 includes: a temporary container creation subunit and an integrated container creation subunit;

[0128] The temporary container creation subunit is used to create a temporary container;

[0129] The integrated container creation subunit is used to create a corresponding integrated development environment container in the temporary container according to the environment configuration.

[0130] Optionally, in certain optional implementations, the integrated container creation subunit includes: a code acquisition subunit, a file generation subunit, a resource acquisition subunit, a basic image acquisition subunit, and a container application deployment subunit;

[0131] The code acquisition subunit is used to acquire the source code corresponding to the first source code repository address according to the environment configuration;

[0132] The file generation subunit is used to traverse the setting file directory of the source code and check the environment configuration definition metadata to generate a corresponding configuration file;

[0133] The resource acquisition subunit is used to acquire corresponding resources according to the configuration file, wherein the resources include: number of CPU cores, memory size and storage space;

[0134] The base image obtaining subunit is used to download the corresponding base image from the image repository according to the configuration file, wherein the base image has a corresponding integrated development environment pre-installed therein;

[0135] The container application deployment subunit is used to deploy the container application of the integrated development environment in the temporary container according to the basic image, so as to establish the integrated development environment container.

[0136] Optionally, in some optional implementations, the dependent software installation unit 300 includes: a dependent software installation subunit;

[0137] The dependent software installation subunit is used to install the corresponding dependent software in the integrated development environment container according to the dependent configuration definition in the configuration file.

[0138] Optionally, in some optional implementations, the plug-in installation unit 400 includes: an editing and debugging installation subunit and an editing and debugging configuration subunit;

[0139] The editing, debugging and installing subunit is used to install the corresponding editor and debugger in the integrated development environment container;

[0140] The editing and debugging configuration subunit is used to install corresponding plug-ins for the editor and the debugger according to the configuration information of the editor and the debugger in the configuration file.

[0141] Optionally, in some optional implementations, the access address generation unit 500 includes: an address generation subunit, a container access subunit, a code pulling subunit and a container running subunit;

[0142] The address generation subunit is used to generate an access address of the integrated development environment container based on a preset address generation rule, wherein the integrated development environment container corresponds to the access address one by one;

[0143] The container access subunit is used for the user to obtain the integrated development environment container according to the access address;

[0144] The code pulling subunit is used to pull the source code of the first source code repository address in the integrated development environment container;

[0145] The container running subunit is used to run the editor and debugger in the integrated development environment container based on the source code, so as to run the integrated development environment container and configure the corresponding development environment.

[0146] The present invention provides a computer-readable storage medium on which a program is stored. When the program is executed by a processor, the development environment configuration method described in any one of the above items is implemented.

[0147] like Figure 4 As shown, the present invention provides an electronic device 70, which includes at least one processor 701, and at least one memory 702 and a bus 703 connected to the processor 701; wherein the processor 701 and the memory 702 communicate with each other through the bus 703; the processor 701 is used to call the program instructions in the memory 702 to execute any of the development environment configuration methods described above.

[0148] In the present invention, relational terms such as first and second, etc. are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "comprise", "include" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the statement "comprise a ..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.

[0149] Each embodiment in this specification is described in a related manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the system embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.

[0150] The above description of the disclosed embodiments enables those skilled in the art to implement or use the present invention. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined in the present invention may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to the embodiments shown in the present invention, but will conform to the widest scope consistent with the principles and novel features disclosed in the present invention.

[0151] The above description is only a preferred embodiment of the present invention and is not intended to limit the protection scope of the present invention. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention are included in the protection scope of the present invention.

Claims

1. A development environment configuration method, It is characterized in that include: Obtaining an environment configuration for the first source code repository address; According to the environment configuration, create a corresponding integrated development environment container, wherein the integrated development environment container includes: a basic image and a container application; Installing corresponding dependent software in the integrated development environment container; Installing a corresponding editor and debugger in the integrated development environment container, and installing corresponding plug-ins for the editor and the debugger; An access address of the integrated development environment container is generated so that a user can obtain the integrated development environment container according to the access address for configuring a development environment.

2. The method according to claim 1, It is characterized in that The obtaining of the environment configuration for the first source code warehouse address includes: Obtain the first source code repository address of the project to be developed input by the user; Obtaining, through a form, environment configuration parameters input by the user for the first source code repository address; According to the environment configuration parameters, corresponding environment configuration definition metadata is generated as the environment configuration of the first source code repository address.

3. The method according to claim 1, It is characterized in that The step of creating a corresponding integrated development environment container according to the environment configuration includes: Create a temporary container; According to the environment configuration, a corresponding integrated development environment container is created in the temporary container.

4. The method according to claim 3, It is characterized in that The step of creating a corresponding integrated development environment container in the temporary container according to the environment configuration includes: According to the environment configuration, obtaining source code corresponding to the first source code warehouse address; Traversing the setting file directory of the source code and checking the environment configuration definition metadata to generate a corresponding configuration file; According to the configuration file, corresponding resources are obtained, wherein the resources include: number of CPU cores, memory size and storage space; According to the configuration file, download a corresponding basic image from an image repository, wherein the basic image has a corresponding integrated development environment pre-installed therein; According to the basic image, the container application of the integrated development environment is deployed in the temporary container, thereby establishing the integrated development environment container.

5. The method according to claim 4, It is characterized in that The step of installing corresponding dependent software in the integrated development environment container includes: According to the dependency configuration definition in the configuration file, the corresponding dependency software is installed in the integrated development environment container.

6. The method according to claim 4, It is characterized in that The step of installing a corresponding editor and debugger in the integrated development environment container, and installing corresponding plug-ins for the editor and the debugger, includes: Installing corresponding editors and debuggers in the integrated development environment container; According to the configuration information of the editor and the debugger in the configuration file, corresponding plug-ins are installed for the editor and the debugger.

7. The method according to claim 1, It is characterized in that The generating of the access address of the integrated development environment container so that the user can obtain the integrated development environment container according to the access address for configuring the development environment includes: Based on a preset address generation rule, an access address of the integrated development environment container is generated, wherein the integrated development environment container corresponds to the access address one by one; The user obtains the integrated development environment container according to the access address; Pulling the source code from the first source code repository address in the integrated development environment container; Based on the source code, the editor and debugger in the integrated development environment container are run to run the integrated development environment container and configure the corresponding development environment.

8. A development environment configuration device, It is characterized in that include: Environment configuration acquisition unit, environment container creation unit, dependent software installation unit, plug-in installation unit and access address generation unit; The environment configuration obtaining unit is used to obtain the environment configuration for the first source code repository address; The environment container creation unit is used to create a corresponding integrated development environment container according to the environment configuration, wherein the integrated development environment container includes: a basic image and a container application; The dependent software installation unit is used to install the corresponding dependent software in the integrated development environment container; The plug-in installation unit is used to install the corresponding editor and debugger in the integrated development environment container, and install the corresponding plug-ins for the editor and the debugger; The access address generating unit is used to generate an access address of the integrated development environment container, so that the user can obtain the integrated development environment container according to the access address for configuring the development environment.

9. A computer-readable storage medium having a program stored thereon, It is characterized in that When the program is executed by a processor, the development environment configuration method according to any one of claims 1 to 7 is implemented.

10. An electronic device, It is characterized in that The electronic device includes at least one processor, and at least one memory and a bus connected to the processor; wherein the processor and the memory communicate with each other through the bus; the processor is used to call program instructions in the memory to execute the development environment configuration method as described in any one of claims 1 to 7.

Citation Information

Patent Citations

  • Embedded software development platform dynamic construction method, system and device

    CN112650478A

  • Method and device for constructing local development environment, equipment and medium

    CN115061698A

  • System and method for remote development and management and related equipment

    CN115129472A

  • Web integrated development environment management method, system and equipment based on Docker Swarm and medium

    CN118034758A

  • Method for customizing Web end integrated development environment and related product

    CN118093007A

Cited By

  • Graphical integrated development environment design method based on containerization technology

    CN119829020A