Front-end application deployment methods and systems, front-end deployment devices and readable storage media

By creating multiple environment application containers and adapting them to the Web rendering service group in the Web front-end application deployment system, the problem of multi-environment deployment of Web applications is solved, deployment efficiency is improved and risks are reduced, and separation of front-end and back-end applications is achieved.

CN116610328BActive Publication Date: 2026-11-17HANGZHOU YIQI LIGHT DUST INFORMATION TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310542919.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-05-12
Publication Date
2026-11-17
Estimated Expiration
2043-05-12

AI Technical Summary

Technical Problem

Existing web front-end application deployment systems cannot meet the needs of multi-environment deployment, resulting in low deployment efficiency and high risk of web applications, and there is a serious code coupling between back-end rendering applications and front-end applications.

Method used

By calling GitLab tools to create a front-end application project, multiple environment application containers are built within the project, adapted to the Web rendering service group, code is packaged and built, the target environment application resource package is generated, and it is divided into the same application version identifier for release and deployment, thus realizing the separation of Web front-end application and back-end rendering application.

Benefits of technology

It enables multi-environment deployment of web applications, improves deployment efficiency, reduces deployment risks, and achieves separation of deployment between front-end applications and back-end rendering applications.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116610328B_ABST
    Figure CN116610328B_ABST
Patent Text Reader

Abstract

This application provides a front-end application deployment method and system, a front-end deployment device, and a readable storage medium, relating to the field of internet technology. This application creates a front-end application project for a web front-end application to be deployed, and within the front-end application project, creates multiple environment application containers according to the deployment configuration file of the web front-end application to be deployed. Then, for each environment application container, a web rendering service group adapted to the target rendering platform is built within the front-end application project. Next, the environment application container is packaged and built to obtain a corresponding target environment application resource package. The multiple target environment application resource packages are then divided under the same application version identifier for data storage and deployment. This effectively achieves the separation of deployment between the web front-end application and the back-end rendering application while meeting the multi-environment deployment requirements of the web front-end application.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of Internet technology, and more specifically, to a front-end application publishing method and system, a front-end publishing device, and a readable storage medium. Background Technology

[0002] With the continuous development of Internet technology, the complexity and scale of Web applications are constantly increasing. Conventional Web front-end application deployment systems, which can only achieve the deployment effect of Web front-end applications by directly uploading web application files such as HTML, CSS, and JavaScript files to the Web server in a single development environment, usually lead to obvious code coupling between the Web front-end application and the back-end rendering application involved in the Web application. This means that the back-end rendering application can only be deployed after the Web front-end application is deployed, and when the back-end rendering application needs to update its code, the coupled Web front-end application must be updated first. This seriously affects the deployment efficiency and deployment risk of Web applications. At the same time, this conventional Web front-end application deployment system is gradually unable to meet the multi-environment deployment requirements caused by the rapid development of Web business. Summary of the Invention

[0003] In view of this, the purpose of this application is to provide a front-end application deployment method and system, a front-end deployment device and a readable storage medium, which can effectively achieve the separation of deployment between the web front-end application and the back-end rendering application while meeting the multi-environment deployment needs of web front-end applications, so as to improve the deployment efficiency of web applications and reduce the deployment risk of web applications.

[0004] To achieve the above objectives, the technical solutions adopted in the embodiments of this application are as follows:

[0005] In a first aspect, this application provides a front-end application deployment method, applied to a front-end deployment device, the method comprising:

[0006] Use GitLab tools to create a corresponding front-end application project for the web front-end application to be released;

[0007] Obtain the release configuration file of the Web front-end application to be released, and create multiple environment application containers within the front-end application project according to the release configuration file, wherein each environment application container corresponds to a development environment.

[0008] For each environment application container, build a Web rendering service group adapted for the target rendering platform within the front-end application project;

[0009] In response to an external code input operation for the application container of the environment, and based on the Web rendering service group of the application container of the environment and the application code corresponding to the external code input operation, the application container of the environment is packaged and built to obtain the corresponding target application resource package.

[0010] The obtained multiple target environment application resource packages are divided into the same application version identifier for data storage, and the multiple target environment application resource packages corresponding to the web front-end application to be published under the application version identifier are published and deployed so that the target rendering platform can obtain the multiple target environment application resource packages for backend page rendering.

[0011] In an optional implementation, the step of creating multiple environment application containers within the front-end application project according to the release configuration file includes:

[0012] Initialize all environment application architecture files already created within the aforementioned front-end application project;

[0013] For each development environment configuration information included in the release configuration file, the Jenkins tool is invoked to build a container for that development environment configuration information and an initialized environment application architecture file, thereby obtaining an environment application container corresponding to that development environment configuration information.

[0014] In an optional implementation, for each environment application container, the step of building a group of web rendering services adapted for the target rendering platform within the front-end application project includes:

[0015] Send a rendering requirement acquisition instruction for the application container of the environment to the target rendering platform to obtain the rendering requirement content fed back by the target rendering platform for the application container of the environment;

[0016] Based on the rendering requirements, obtain the target application rendering parameters corresponding to the application container of this environment;

[0017] Initialize the application service group that has been created within the aforementioned front-end application project;

[0018] The parameters of the initialized application service group are updated according to the target application rendering parameters to obtain the Web rendering service group corresponding to the application container of the environment.

[0019] In an optional implementation, the step of responding to an external code entry operation for the application container of the environment includes:

[0020] Check whether the application publisher account that performs the external code entry operation has code editing permissions for the application container in this environment;

[0021] If it is detected that the application publisher's account has code editing permissions for the application container in this environment, then the step of packaging and building the application container in this environment will continue; otherwise, the step of packaging and building the application container in this environment will be prohibited.

[0022] In an optional implementation, the step of dividing the obtained multiple target environment application resource packages into the same application version identifier for data storage includes:

[0023] The packaging tool is invoked to package the multiple target environment application resource packages obtained so far, resulting in the corresponding application deployment resource packages;

[0024] Create an application version identifier for the web front-end application to be published;

[0025] Detect whether the project creator account currently logged into the front-end publishing device has the permission to upload resource packages for the Web front-end application to be published;

[0026] If it is detected that the project creator account does not have the permission to upload resource packages for the web front-end application to be published, the application deployment resource package is stored locally, and a first association relationship is established between the application deployment resource package and the application version identifier for local storage.

[0027] If it is detected that the project creator account has the permission to upload resource packages for the web front-end application to be published, the application deployment resource package is uploaded to the content delivery network device for storage, and the target link address fed back by the content delivery network device for the application deployment resource package is obtained.

[0028] A second association is established between the target link address and the application version identifier and stored locally. The second association is then uploaded to a cache server for data caching.

[0029] In an optional implementation, the method further includes:

[0030] In response to a version switching operation for the Web front-end application to be published, the system detects whether the front-end publishing device currently stores locally multiple target environment application resource packages corresponding to the version identifier to be switched pointed to by the version switching operation.

[0031] If it is detected that the front-end publishing device currently has multiple target environment application resource packages corresponding to the version identifier to be switched locally, the multiple target environment application resource packages corresponding to the version identifier to be switched will be sent to the target rendering platform for back-end page rendering;

[0032] If the front-end publishing device detects that it does not currently have multiple target environment application resource packages corresponding to the version identifier to be switched locally, it sends a resource package link message or a resource package link acquisition instruction to the target rendering platform to perform backend page rendering. The resource package link message instructs the target rendering platform to acquire the corresponding multiple target environment application resource packages from the content delivery network device based on the target link address included in the resource package link message corresponding to the version identifier to be switched, and then performs backend page rendering. The resource package link acquisition instruction instructs the target rendering platform to acquire the target link address corresponding to the version identifier to be switched from the cache server based on the version identifier to be switched included in the resource package link acquisition instruction, and then instructs the target rendering platform to acquire the corresponding multiple target environment application resource packages from the content delivery network device based on the acquired target link address, and then performs backend page rendering.

[0033] Secondly, this application provides a front-end application publishing system for use with a front-end publishing device, the system comprising:

[0034] The application project creation module is used to call GitLab tools to create corresponding front-end application projects for web front-end applications to be published.

[0035] The application container creation module is used to obtain the release configuration file of the web front-end application to be released, and to create multiple environment application containers within the front-end application project according to the release configuration file, wherein each environment application container corresponds to a development environment.

[0036] The rendering service creation module is used to build a group of Web rendering services adapted to the target rendering platform for each environment application container within the front-end application project.

[0037] The code packaging and building module is used to respond to external code input operations for the application container of the environment, and to perform code packaging and building processing on the application container of the environment based on the Web rendering service group of the application container of the environment and the application code corresponding to the external code input operation, so as to obtain the corresponding target application resource package.

[0038] The application deployment module is used to divide the obtained multiple target environment application resource packages into the same application version identifier for data storage, and to deploy the multiple target environment application resource packages corresponding to the web front-end application to be published under the application version identifier, so that the target rendering platform can obtain the multiple target environment application resource packages for backend page rendering.

[0039] In an optional implementation, the system further includes:

[0040] The local resource detection module is used to respond to the version switching operation for the Web front-end application to be published and to detect whether the front-end publishing device currently stores multiple target environment application resource packages that correspond to the version identifier to be switched pointed to by the version switching operation locally.

[0041] The local resource sending module is used to send multiple target environment application resource packages corresponding to the version identifier to be switched to the target rendering platform for backend page rendering when it is detected that the front-end publishing device currently has multiple target environment application resource packages stored locally, which correspond to the version identifier to be switched.

[0042] The resource acquisition driver module is used to send a resource package link message or a resource package link acquisition instruction to the target rendering platform for backend page rendering when it is detected that the front-end publishing device does not currently have multiple target environment application resource packages corresponding to the version identifier to be switched locally. Specifically, the resource package link message instructs the target rendering platform to acquire the corresponding multiple target environment application resource packages from the content delivery network device based on the target link address included in the resource package link message corresponding to the version identifier to be switched, and then performs backend page rendering. The resource package link acquisition instruction instructs the target rendering platform to acquire the target link address corresponding to the version identifier to be switched from the cache server based on the version identifier to be switched included in the resource package link acquisition instruction, and then instructs the target rendering platform to acquire the corresponding multiple target environment application resource packages from the content delivery network device based on the acquired target link address, and then performs backend page rendering.

[0043] Thirdly, this application provides a front-end publishing device, including a processor and a memory, wherein the memory stores a computer program that can be executed by the processor, and the processor can execute the computer program to implement the front-end application publishing method described in any of the foregoing embodiments.

[0044] Fourthly, this application provides a readable storage medium storing a computer program thereon, which, when executed by the processor of a front-end publishing device, implements the front-end application publishing method described in any of the foregoing embodiments.

[0045] In this case, the beneficial effects of the embodiments of this application may include the following:

[0046] This application utilizes GitLab to create a corresponding front-end application project for the web front-end application to be released. Within the front-end application project, multiple environment application containers are created according to the release configuration file of the web front-end application to be released. Then, for each environment application container, a web rendering service group adapted for the target rendering platform is built within the front-end application project. Next, in response to external code input operations for the environment application container, the code of the environment application container is packaged and built according to the web rendering service group of the environment application container and the environment application code corresponding to the external code input operation, resulting in the corresponding target environment application resource package. Then, the multiple target environment application resource packages are divided into multiple application version identifiers for data storage, and the aforementioned multiple target environment application resource packages are released and deployed, enabling the target rendering platform to obtain the aforementioned multiple target environment application resource packages for backend page rendering. Thus, by creating multiple environment application containers for code packaging and building, the multi-environment deployment requirements of the web front-end application are met. By building the web rendering service group independently of the target rendering platform, the release and deployment separation effect between the web front-end application and the backend rendering application is achieved, thereby improving the deployment efficiency of the web application and reducing the deployment risk of the web application.

[0047] To make the above-mentioned objectives, features and advantages of this application more apparent and understandable, preferred embodiments are described below in detail with reference to the accompanying drawings. Attached Figure Description

[0048] To more clearly illustrate the technical solutions of the embodiments of this application, the accompanying drawings used in the embodiments will be briefly introduced below. It should be understood that the following drawings only show some embodiments of this application and should not be regarded as a limitation of the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.

[0049] Figure 1 A schematic diagram of the composition of the front-end publishing device provided in the embodiments of this application;

[0050] Figure 2 One of the flowcharts illustrating the front-end application publishing method provided in this application embodiment;

[0051] Figure 3 A second flowchart illustrating the front-end application publishing method provided in this application embodiment;

[0052] Figure 4 This is one of the schematic diagrams of the front-end application publishing system provided in the embodiments of this application;

[0053] Figure 5This is the second schematic diagram of the composition of the front-end application publishing system provided in the embodiments of this application.

[0054] Icons: 10-Front-end deployment device; 11-Storage; 12-Processor; 13-Communication unit; 100-Front-end application deployment system; 110-Application project creation module; 120-Application container creation module; 130-Rendering service creation module; 140-Code packaging and building module; 150-Application deployment module; 160-Local resource detection module; 170-Local resource sending module; 180-Resource acquisition driver module. Detailed Implementation

[0055] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. The components of the embodiments of this application described and shown in the accompanying drawings can generally be arranged and designed in various different configurations.

[0056] Therefore, the following detailed description of the embodiments of this application provided in the accompanying drawings is not intended to limit the scope of the claimed application, but merely to illustrate selected embodiments of the application. All other embodiments obtained by those skilled in the art based on the embodiments of this application without inventive effort are within the scope of protection of this application.

[0057] It should be noted that similar labels and letters in the following figures indicate similar items. Therefore, once an item is defined in one figure, it does not need to be further defined and explained in subsequent figures.

[0058] In the description of this application, it should be understood that relational terms such as "first" and "second" are used merely to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element. Those skilled in the art will understand the specific meaning of the above terms in this application based on the specific circumstances.

[0059] The following detailed description of some embodiments of this application is provided in conjunction with the accompanying drawings. Unless otherwise specified, the following embodiments and features can be combined with each other.

[0060] Please refer to Figure 1 , Figure 1 This is a schematic diagram illustrating the composition of the front-end deployment device 10 provided in this embodiment. In this embodiment, the front-end deployment device 10 can be used to deploy web front-end applications that meet the needs of multi-environment deployment and the separation of web front-end and back-end, thereby effectively improving the deployment efficiency of web applications and reducing the deployment risks of web applications. The front-end deployment device 10 can be, but is not limited to, a laptop computer, a personal computer, a server, a tablet computer, etc.

[0061] In this embodiment, the front-end publishing device 10 may include a memory 11, a processor 12, a communication unit 13, and a front-end application publishing system 100. The memory 11, the processor 12, and the communication unit 13 are electrically connected directly or indirectly to achieve data transmission or interaction. For example, these components can be electrically connected via one or more communication buses or signal lines.

[0062] In this embodiment, the memory 11 may be, but is not limited to, random access memory (RAM), read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), etc. The memory 11 is used to store computer programs, and the processor 12 can execute the computer programs accordingly after receiving execution instructions.

[0063] In this embodiment, the processor 12 can be an integrated circuit chip with signal processing capabilities. The processor 12 can be a general-purpose processor, including at least one of a Central Processing Unit (CPU), Graphics Processing Unit (GPU), Network Processor (NP), Digital Signal Processor (DSP), Application-Specific Integrated Circuit (ASIC), Field-Programmable Gate Array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. The general-purpose processor can be a microprocessor or any conventional processor, capable of implementing or executing the methods, steps, and logic block diagrams disclosed in this embodiment.

[0064] In this embodiment, the communication unit 13 is used to establish a communication connection between the front-end publishing device 10 and other electronic devices via a network, and to send and receive data via the network, wherein the network includes wired communication networks and wireless communication networks. For example, the front-end publishing device 10 can communicate with a terminal device held by a code entry personnel through the communication unit 13 to obtain program code edited by the code entry personnel for a certain Web front-end application; the front-end publishing device 10 can also communicate with a Web server running a certain rendering platform through the communication unit 13 to send a specific application resource package of a certain Web front-end application to the Web server, enabling the Web server to perform back-end page rendering based on the received specific application resource package.

[0065] In this embodiment, the front-end application deployment system 100 may include at least one software functional module that can be stored in the memory 11 in the form of software or firmware or embedded in the operating system of the front-end deployment device 10. The processor 12 can be used to execute the executable modules stored in the memory 11, such as the software functional modules and computer programs included in the front-end application deployment system 100. The front-end deployment device 10 can ensure that the corresponding deployed web front-end application can meet the deployment requirements of multiple environments through the front-end application deployment system 100, and achieve the deployment separation effect between the web front-end application and the back-end rendering application, thereby improving the deployment efficiency of web applications and reducing the deployment risk of web applications.

[0066] Understandable Figure 1 The block diagram shown is only a schematic diagram of one configuration of the front-end publishing device 10. The front-end publishing device 10 may also include... Figure 1 The more or fewer components shown, or having the same Figure 1The different configurations shown. Figure 1 The components shown can be implemented using hardware, software, or a combination thereof.

[0067] In this application, to ensure that the front-end deployment device 10 can deploy web front-end applications that meet the deployment requirements of multiple environments and achieve the separation of web front-end and back-end, thereby effectively improving the deployment efficiency of web applications and reducing the deployment risk of web applications, this application provides a front-end application deployment method applied to the aforementioned front-end deployment device 10 to achieve the aforementioned objectives. The front-end application deployment method provided in this application will be described in detail below.

[0068] Please refer to Figure 2 , Figure 2 This is one of the flowcharts illustrating the front-end application publishing method provided in this application embodiment. In this application embodiment, the front-end application publishing method may include steps S210 to S250.

[0069] Step S210: Use the GitLab tool to create a corresponding front-end application project for the web front-end application to be published.

[0070] In this embodiment, when a software developer needs to deploy a web front-end application to be released on the front-end deployment device 10, they will log in to their corresponding software developer account on the front-end deployment device 10 and build a front-end application project by calling the GitLab tool. This front-end application project represents the deployment requirements of the web front-end application to be released. The software developer account logged into the front-end deployment device 10 at this time is the project creator account of the front-end application project. The GitLab tool is a code management tool that uses the Git system to build web services.

[0071] Step S220: Obtain the release configuration file of the web front-end application to be released, and create multiple environment application containers within the front-end application project according to the release configuration file, wherein each environment application container corresponds to a different development environment.

[0072] In this embodiment, the release configuration file describes the environment configuration information for various development environments (e.g., testing environment, production environment, etc.) in which the web front-end application to be released can run. The environment configuration information describes the specific environment parameters required for the corresponding development environment. The front-end release device 10 can provide software developers with an application release configuration interface, allowing them to edit the corresponding release configuration file for the web front-end application to be released.

[0073] After obtaining the deployment configuration file of the web front-end application to be deployed, the front-end deployment device 10 can call the Jenkins tool to create an environment application container within the front-end application project of the web front-end application to be deployed, for each of the various development environments corresponding to the deployment configuration file, so that each environment application container can effectively adapt to a development environment. At this time, the step of creating multiple environment application containers within the front-end application project according to the deployment configuration file may include:

[0074] Initialize all environment application architecture files already created within the aforementioned front-end application project;

[0075] For each development environment configuration information included in the release configuration file, the Jenkins tool is invoked to build a container for that development environment configuration information and an initialized environment application architecture file, thereby obtaining an environment application container corresponding to that development environment configuration information.

[0076] The environment application architecture file describes the basic code architecture of the corresponding environment application. The front-end deployment device 10 can execute the specific steps in step S220 to construct multiple environment application containers that meet the multi-environment deployment requirements of the web front-end application to be deployed, each environment application container corresponding to a development environment described in the deployment configuration file.

[0077] Step S230: For each environment application container, build a Web rendering service group adapted to the target rendering platform within the front-end application project.

[0078] In this embodiment, when the front-end deployment device 10 builds an environment application container for a development environment within the created front-end application project, it consults the web server that independently deploys the target rendering platform to determine the rendering requirements needed to create the aforementioned development environment and run the web front-end application code hosted by the corresponding environment application container. Based on the obtained rendering requirements, it then creates an adapted web rendering service group for the environment application container within the front-end application project. This ensures that the target rendering platform can effectively create the development environment corresponding to the environment application container. The web rendering service group describes the application rendering parameters required by the target rendering platform when creating the development environment to which the corresponding environment application container belongs.

[0079] At this point, for each environment application container, the step of building a Web rendering service group adapted for the target rendering platform within the front-end application project may include:

[0080] Send a rendering requirement acquisition instruction for the application container of the environment to the target rendering platform to obtain the rendering requirement content fed back by the target rendering platform for the application container of the environment;

[0081] Based on the rendering requirements, obtain the target application rendering parameters corresponding to the application container of this environment;

[0082] Initialize the application service group that has been created within the aforementioned front-end application project;

[0083] The parameters of the initialized application service group are updated according to the target application rendering parameters to obtain the Web rendering service group corresponding to the application container of the environment.

[0084] When the front-end deployment device 10 obtains the rendering requirements corresponding to a certain environment application container, it can match the rendering requirements with the preset application rendering parameters corresponding to various development environments that it has pre-stored. This allows it to extract the target application rendering parameters of the environment application container that match the rendering requirements from the stored preset application rendering parameters. Alternatively, the front-end deployment device 10 can provide a rendering parameter input interface to software developers, displaying the obtained rendering requirements through this interface so that software developers can input the target application rendering parameters that substantially match the rendering requirements.

[0085] The front-end publishing device 10 can construct a Web rendering service group for creating an adapted development environment on the target rendering platform for each of the multiple environment application containers of the Web front-end application to be published by executing the specific steps and processes included in the above step S230.

[0086] Step S240: Respond to the external code input operation for the environment application container, and perform code packaging and building process on the environment application container according to the Web rendering service group of the environment application container and the environment application code corresponding to the external code input operation to obtain the corresponding target environment application resource package.

[0087] In this embodiment, after the project creator creates a front-end application project for the web front-end application to be released on the front-end deployment device 10, one or more application release personnel can be invited to edit the environment application code for multiple environment application containers under different development environments. By restricting which environment application containers each application release personnel's account has code editing permissions for, the deployment security of the web front-end application to be released is effectively improved, and the possibility of data leakage of the web front-end application to be released is effectively reduced. The front-end deployment device 10 can communicate with the terminal devices held by each application release personnel to obtain the environment application code entered by each application release personnel for the environment application container they are responsible for through their terminal devices.

[0088] When the front-end publishing device 10 receives environment application code entered for a certain environment application container, it will respond to the external code entry operation for that environment application container to determine whether the obtained environment application code can be applied to that environment application container. At this time, the step of responding to the external code entry operation for that environment application container may include:

[0089] Check whether the application publisher account that performs the external code entry operation has code editing permissions for the application container in this environment;

[0090] If it is detected that the application publisher's account has code editing permissions for the application container of the environment, then the step of packaging and building the application container of the environment will continue to be executed. At this time, the application code corresponding to the external code input operation can be applied to the application container of the environment.

[0091] If it is detected that the application publisher's account does not have code editing permissions for the application container of that environment, the step of packaging and building the code for the application container of that environment is prohibited. In this case, the application code corresponding to the external code entry operation is not allowed to be applied to the application container of that environment.

[0092] Therefore, the front-end deployment device 10 can effectively determine whether the application code corresponding to the external code entry operation can affect the application container by detecting whether the application deployment personnel performing the external code entry operation have code editing permissions for a certain application container. This effectively improves the deployment security of the web front-end application to be deployed and reduces the possibility of data leakage of the web front-end application to be deployed.

[0093] When the front-end publishing device 10 confirms that the external code input operation of a certain environment application container comes from the application publishing personnel account with code editing permissions, it can write the Web rendering service group and environment application code corresponding to the environment application container into the environment application container, and package and build the environment application container with the written code to obtain the target environment application resource package of the Web front-end application to be published in the specific development environment corresponding to the environment application container. The target environment application resource package represents the specific front-end application code content of the Web front-end application to be published that is currently running normally in the aforementioned specific development environment.

[0094] Step S250: The obtained multiple target environment application resource packages are divided into the same application version identifier for data storage, and the multiple target environment application resource packages corresponding to the application version identifier of the web front-end application to be released are released and deployed, so that the target rendering platform can obtain multiple target environment application resource packages for backend page rendering.

[0095] In this embodiment, when the front-end publishing device 10 responds to the external code input operations performed by each application publisher for the multiple environment application containers of the Web front-end application to be published, and generates corresponding target environment application resource packages for each environment application container, the project creator can assign an application version identifier to the multiple target environment application resource packages of the same batch at the front-end publishing device 10. Then, a resource package directory corresponding to the aforementioned application version identifier is generated within the aforementioned front-end application project, and the multiple target environment application resource packages belonging to the aforementioned application version identifier are stored in the resource package directory corresponding to the aforementioned application version identifier, so as to effectively represent the specific front-end environment application code content of the Web front-end application to be published in the front-end application version state corresponding to the aforementioned application version identifier through the resource package directory.

[0096] Next, the front-end publishing device 10 will publish and deploy multiple target environment application resource packages corresponding to the application version identifier of the web front-end application to be published, so that the target rendering platform can obtain the aforementioned multiple target environment application resource packages to perform back-end page rendering.

[0097] Optionally, in one embodiment of this application, the front-end publishing device 10 can directly store multiple target environment application resource packages belonging to the same application version identifier into the resource package directory corresponding to the aforementioned application version identifier for local storage. In this case, the target rendering platform needs to obtain the aforementioned multiple target environment application resource packages stored locally from the front-end publishing device 10 to achieve the back-end page rendering effect.

[0098] Optionally, in another embodiment of this application, in order to effectively reduce the storage resource consumption of the front-end publishing device 10, and to ensure that the target rendering platform can effectively obtain the aforementioned multiple target environment application resource packages to achieve the back-end page rendering effect when an error occurs while the front-end publishing device 10 is running the front-end application publishing method, the step of dividing the obtained multiple target environment application resource packages into the same application version identifier for data storage in step S250 may include:

[0099] The packaging tool is invoked to package the multiple target environment application resource packages obtained so far, resulting in the corresponding application deployment resource packages;

[0100] Create an application version identifier for the web front-end application to be published;

[0101] Detect whether the project creator account currently logged into the front-end publishing device 10 has the permission to upload resource packages for the Web front-end application to be published;

[0102] If it is detected that the project creator account does not have the permission to upload resource packages for the web front-end application to be published, the application deployment resource package is stored locally, and a first association relationship is established between the application deployment resource package and the application version identifier for local storage.

[0103] If it is detected that the project creator account has the permission to upload resource packages for the web front-end application to be published, the application deployment resource package is uploaded to the content delivery network device for storage, and the target link address fed back by the content delivery network device for the application deployment resource package is obtained.

[0104] A second association is established between the target link address and the application version identifier and stored locally. The second association is then uploaded to a cache server for data caching.

[0105] Wherein, the front-end publishing device 10 can, when the project creator account does not have the permission to upload resource packages for the web front-end application to be published, locally store the application deployment resource package and the first association relationship in the resource package directory corresponding to the application version identifier; when the project creator account has the permission to upload resource packages for the web front-end application to be published, the front-end publishing device 10 can, through the resource package directory corresponding to the application version identifier, locally store the second association relationship, thereby reducing the storage resource consumption of the front-end publishing device 10, and by uploading the second association relationship corresponding to the application version identifier to the cache server, ensure that the target rendering platform can obtain the aforementioned multiple target environment application resource packages through the cache server and the content delivery network device to achieve the back-end page rendering effect in the event of an error when the front-end publishing device 10 runs the front-end application publishing method.

[0106] It is understandable that when a project creator needs to deploy a new version of the Web front-end application to be released through the front-end release device 10, based on the multiple environment application containers corresponding to the Web front-end application to be released constructed in step S220 and the Web rendering service groups corresponding to the aforementioned multiple environment application containers constructed in step S230, multiple new target environment application resource packages belonging to the new application version identifier can be developed for data storage and deployment by inviting various application release personnel to cooperate with the front-end release device 10 to re-execute the above steps S240 and S250. At this time, the multiple new target environment application resource packages can be stored by creating a resource package directory corresponding to the new application version identifier in the front-end application project of the Web front-end application to be released.

[0107] Therefore, by executing the above steps S210 to S250, this application can ensure that the front-end publishing device 10 can publish and deploy a web front-end application that meets the deployment requirements of multiple environments and achieves the effect of web front-end and back-end separation, thereby effectively improving the deployment efficiency of web applications and reducing the deployment risk of web applications.

[0108] Alternatively, please refer to Figure 3 , Figure 3 This is the second flowchart illustrating the front-end application publishing method provided in this application embodiment. In this application embodiment, [the method is related to...]. Figure 2 Compared to the front-end application deployment method shown, Figure 3 The front-end application deployment method shown may further include steps S260 to S280 to achieve application version switching control of the Web front-end application required to perform back-end page rendering operations on the target rendering platform.

[0109] Step S260: In response to the version switching operation for the Web front-end application to be published, detect whether the front-end publishing device currently stores multiple target environment application resource packages corresponding to the version identifier to be switched pointed to by the version switching operation locally.

[0110] In this embodiment, when the front-end publishing device 10 has established multiple target environment application resource packages corresponding to multiple different application version identifiers for the web front-end application to be published, each meeting the deployment requirements of multiple environments, the project creator can effectively browse the target environment application resource packages corresponding to each application version identifier through the front-end publishing device 10, and select a certain application version identifier as the version identifier to be switched for the current version switching operation for the web front-end application to be published. At this time, the front-end publishing device 10 will detect whether it has multiple target environment application resource packages corresponding to the version identifier to be switched locally, so as to determine whether the front-end publishing device 10 can directly send the specific front-end application code content of the web front-end application to be published corresponding to the version identifier to be switched to the target rendering platform.

[0111] Step S270: If it is detected that the front-end publishing device currently has multiple target environment application resource packages corresponding to the version identifier to be switched locally, the multiple target environment application resource packages corresponding to the version identifier to be switched are sent to the target rendering platform for back-end page rendering.

[0112] In this embodiment, when the front-end publishing device 10 detects that it has multiple target environment application resource packages corresponding to the version identifier to be switched in its local storage, it indicates that the front-end publishing device 10 can directly send the specific front-end application code content of the Web front-end application to be published, corresponding to the version identifier to be switched, to the target rendering platform. At this time, the front-end publishing device 10 will extract all target environment application resource packages from the resource package directory of the front-end application project corresponding to the version identifier to be switched, and send all the extracted target environment application resource packages to the target rendering platform. This allows the target rendering platform to perform back-end page rendering based on all the target environment application resource packages corresponding to the version identifier to be switched, thereby realizing application version switching control of the Web front-end application required by the target rendering platform to perform back-end page rendering operations.

[0113] Step S280: If it is detected that the front-end publishing device does not currently have multiple target environment application resource packages corresponding to the version identifier to be switched locally, a resource package link message or a resource package link acquisition instruction is sent to the target rendering platform to render the back-end page.

[0114] In this embodiment, when the front-end publishing device 10 detects that it does not have multiple target environment application resource packages corresponding to the version identifier to be switched locally, it indicates that the front-end publishing device 10 cannot directly send the specific front-end application code content of the Web front-end application to be published corresponding to the version identifier to be switched to the target rendering platform. The target rendering platform needs to obtain multiple target environment application resource packages corresponding to the version identifier to be switched through the content distribution network device before it can use the multiple target environment application resource packages corresponding to the version identifier to be switched for back-end page rendering. At this time, the front-end publishing device 10 will send a resource package link message or a resource package link acquisition instruction to the target rendering platform to instruct the target rendering platform to obtain multiple target environment application resource packages corresponding to the version identifier to be switched from the content distribution network device for back-end page rendering, thereby effectively realizing the application version switching control of the Web front-end application required by the target rendering platform to perform back-end page rendering operations.

[0115] The resource package link message may include a target link address corresponding to the version identifier to be switched. The resource package link message is used to drive the target rendering platform to obtain multiple target environment application resource packages from the content delivery network device based on the target link address corresponding to the version identifier to be switched, and to perform backend page rendering.

[0116] The resource package link acquisition instruction may include the version identifier to be switched. The source package link acquisition instruction is used to drive the target rendering platform to obtain the target link address corresponding to the version identifier to be switched from the cache server based on the version identifier to be switched, and to drive the target rendering platform to obtain multiple target environment application resource packages corresponding to the content delivery network device based on the obtained target link address for backend page rendering.

[0117] Therefore, by executing the above steps S260 to S280, this application can achieve application version switching control of the Web front-end application required for performing back-end page rendering operations on the target rendering platform.

[0118] In this application, to ensure that the front-end publishing device 10 can effectively execute the aforementioned front-end application publishing method, the aforementioned function is achieved by dividing the front-end application publishing system 100 stored in the front-end publishing device 10 into functional modules. The specific composition of the front-end application publishing system 100 applied to the aforementioned front-end publishing device 10 provided in this application is described below.

[0119] Please refer to Figure 4 , Figure 4This is one of the schematic diagrams of the front-end application publishing system 100 provided in the embodiments of this application. In the embodiments of this application, the front-end application publishing system 100 may include an application project creation module 110, an application container creation module 120, a rendering service creation module 130, a code packaging and building module 140, and an application publishing and deployment module 150.

[0120] Application project creation module 110 is used to call GitLab tools to create corresponding front-end application projects for web front-end applications to be published.

[0121] The application container creation module 120 is used to obtain the release configuration file of the web front-end application to be released, and to create multiple environment application containers within the front-end application project according to the release configuration file, wherein each environment application container corresponds to a development environment.

[0122] The rendering service creation module 130 is used to build a group of web rendering services adapted to the target rendering platform for each environment application container within the front-end application project.

[0123] The code packaging and building module 140 is used to respond to external code input operations for the environment application container, and to perform code packaging and building processing on the environment application container according to the Web rendering service group of the environment application container and the environment application code corresponding to the external code input operation, so as to obtain the corresponding target environment application resource package.

[0124] The application deployment module 150 is used to divide the obtained multiple target environment application resource packages into the same application version identifier for data storage, and to deploy the multiple target environment application resource packages corresponding to the web front-end application to be published under the application version identifier, so that the target rendering platform can obtain the multiple target environment application resource packages for backend page rendering.

[0125] Alternatively, please refer to Figure 5 , Figure 5 This is a second schematic diagram of the composition of the front-end application publishing system 100 provided in this application embodiment. In this application embodiment, the front-end application publishing system 100 may further include a local resource detection module 160, a local resource sending module 170, and a resource acquisition driver module 180.

[0126] The local resource detection module 160 is used to respond to the version switching operation for the Web front-end application to be published and to detect whether the front-end publishing device currently stores multiple target environment application resource packages corresponding to the version identifier to be switched pointed to by the version switching operation locally.

[0127] The local resource sending module 170 is used to send multiple target environment application resource packages corresponding to the version identifier to be switched to the target rendering platform for backend page rendering when it is detected that the front-end publishing device currently has multiple target environment application resource packages stored locally, corresponding to the version identifier to be switched.

[0128] The resource acquisition driver module 180 is used to send a resource package link message or a resource package link acquisition instruction to the target rendering platform to perform backend page rendering when it is detected that the front-end publishing device does not currently have multiple target environment application resource packages corresponding to the version identifier to be switched locally.

[0129] The resource package link message is used to instruct the target rendering platform to obtain multiple target environment application resource packages from the content delivery network device based on the target link address included in the resource package link message that corresponds to the version identifier to be switched, and to perform backend page rendering.

[0130] The resource package link acquisition instruction is used to drive the target rendering platform to obtain the target link address corresponding to the version to be switched from the cache server based on the version to be switched identifier included in the resource package link acquisition instruction, and to drive the target rendering platform to obtain multiple target environment application resource packages corresponding to the content delivery network device based on the obtained target link address for backend page rendering.

[0131] It should be noted that the front-end application publishing system 100 provided in this embodiment has the same basic principle and technical effects as the aforementioned front-end application publishing method. For the sake of brevity, any parts not mentioned in this embodiment can be referred to the above description of the front-end application publishing method.

[0132] In the embodiments provided in this application, it should be understood that the disclosed apparatus and methods can also be implemented in other ways. The apparatus embodiments described above are merely illustrative. For example, the flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of apparatus, methods, and computer program products according to embodiments of this application. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code, which contains one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions marked in the blocks may occur in a different order than those marked in the drawings. For example, two consecutive blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in a block diagram and / or flowchart, and combinations of blocks in block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or action, or using a combination of dedicated hardware and computer instructions.

[0133] Furthermore, the functional modules in the various embodiments of this application can be integrated together to form an independent part, or each module can exist independently, or two or more modules can be integrated to form an independent part. If the various functions provided in this application are implemented in the form of software functional modules and sold or used as independent products, they can be stored in a storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a readable storage medium and includes several instructions to enable a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application when acting as a front-end publishing device. The aforementioned readable storage medium includes: USB flash drives, mobile hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, optical disks, and other media capable of storing program code.

[0134] In summary, in the front-end application publishing method and system, front-end publishing device, and readable storage medium provided in this application embodiment, this application creates a corresponding front-end application project for the web front-end application to be published by calling the GitLab tool, and creates multiple environment application containers within the front-end application project according to the publishing configuration file of the web front-end application to be published. Then, for each environment application container, a web rendering service group adapted to the target rendering platform is built within the front-end application project. Next, an external code input operation is responded to for the environment application container, and the environment application container is processed according to the web rendering service group of the environment application container and the environment application code corresponding to the external code input operation. The code is packaged and built to obtain the corresponding target environment application resource package. Then, multiple target environment application resource packages are divided into the same application version identifier for data storage, and the aforementioned multiple target environment application resource packages are published and deployed. This enables the target rendering platform to obtain the aforementioned multiple target environment application resource packages for backend page rendering. In this way, by creating multiple environment application containers for code packaging and building, the multi-environment deployment requirements of web front-end applications can be met. Furthermore, by building a web rendering service group independent of the target rendering platform, the release and deployment separation effect between web front-end applications and backend rendering applications is achieved, thereby improving the deployment efficiency of web applications and reducing the deployment risk of web applications.

[0135] The above descriptions are merely various embodiments of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.

Claims

1. A front-end application publishing method, characterized by, Applied to front-end deployment devices, the method includes: Use GitLab tools to create a corresponding front-end application project for the web front-end application to be released; Obtain the release configuration file of the Web front-end application to be released, and create multiple environment application containers within the front-end application project according to the release configuration file, wherein each environment application container corresponds to a development environment. For each environment application container, a Web rendering service group adapted for the target rendering platform is built within the front-end application project. Specifically, for each environment application container, a rendering requirement acquisition instruction for the environment application container is sent to the target rendering platform to obtain the rendering requirement content fed back by the target rendering platform for the environment application container. Then, the target application rendering parameters corresponding to the environment application container are obtained according to the rendering requirement content. Subsequently, the application service group already created within the front-end application project is initialized, and the parameters of the initialized application service group are updated according to the target application rendering parameters to obtain the Web rendering service group corresponding to the environment application container. In response to an external code input operation for the application container of the environment, and based on the Web rendering service group of the application container of the environment and the application code corresponding to the external code input operation, the application container of the environment is packaged and built to obtain the corresponding target application resource package. The obtained multiple target environment application resource packages are divided into the same application version identifier for data storage, and the multiple target environment application resource packages corresponding to the web front-end application to be published under the application version identifier are published and deployed so that the target rendering platform can obtain the multiple target environment application resource packages for backend page rendering.

2. The method of claim 1, wherein, The step of creating multiple environment application containers within the front-end application project according to the release configuration file includes: Initialize all environment application architecture files already created within the aforementioned front-end application project; For each development environment configuration information included in the release configuration file, the Jenkins tool is invoked to build a container for that development environment configuration information and an initialized environment application architecture file, thereby obtaining an environment application container corresponding to that development environment configuration information.

3. The method of claim 1, wherein, The steps for responding to external code entry operations for the application container in this environment include: Check whether the application publisher account that performs the external code entry operation has code editing permissions for the application container in this environment; If it is detected that the application publisher's account has code editing permissions for the application container in this environment, then the step of packaging and building the application container in this environment will continue; otherwise, the step of packaging and building the application container in this environment will be prohibited.

4. The method of claim 1, wherein, The step of dividing the obtained multiple target environment application resource packages into the same application version identifier for data storage includes: The packaging tool is invoked to package the multiple target environment application resource packages obtained so far, resulting in the corresponding application deployment resource packages; Create an application version identifier for the web front-end application to be published; Detect whether the project creator account currently logged into the front-end publishing device has the permission to upload resource packages for the Web front-end application to be published; If it is detected that the project creator account does not have the permission to upload resource packages for the web front-end application to be published, the application deployment resource package is stored locally, and a first association relationship is established between the application deployment resource package and the application version identifier for local storage. If it is detected that the project creator account has the permission to upload resource packages for the web front-end application to be published, the application deployment resource package is uploaded to the content delivery network device for storage, and the target link address fed back by the content delivery network device for the application deployment resource package is obtained. A second association is established between the target link address and the application version identifier and stored locally. The second association is then uploaded to a cache server for data caching.

5. The method according to any one of claims 1 to 4, characterized in that, The method further includes: In response to a version switching operation for the Web front-end application to be published, the system detects whether the front-end publishing device currently stores locally multiple target environment application resource packages corresponding to the version identifier to be switched pointed to by the version switching operation. If it is detected that the front-end publishing device currently has multiple target environment application resource packages corresponding to the version identifier to be switched locally, the multiple target environment application resource packages corresponding to the version identifier to be switched will be sent to the target rendering platform for back-end page rendering; If the front-end publishing device detects that it does not currently have multiple target environment application resource packages corresponding to the version identifier to be switched locally, it sends a resource package link message or a resource package link acquisition instruction to the target rendering platform to perform backend page rendering. The resource package link message instructs the target rendering platform to acquire the corresponding multiple target environment application resource packages from the content delivery network device based on the target link address included in the resource package link message corresponding to the version identifier to be switched, and then performs backend page rendering. The resource package link acquisition instruction instructs the target rendering platform to acquire the target link address corresponding to the version identifier to be switched from the cache server based on the version identifier to be switched included in the resource package link acquisition instruction, and then instructs the target rendering platform to acquire the corresponding multiple target environment application resource packages from the content delivery network device based on the acquired target link address, and then performs backend page rendering.

6. A front-end application publishing system, characterized by The system, applied to front-end deployment devices, includes: The application project creation module is used to call GitLab tools to create corresponding front-end application projects for web front-end applications to be published. The application container creation module is used to obtain the release configuration file of the web front-end application to be released, and to create multiple environment application containers within the front-end application project according to the release configuration file, wherein each environment application container corresponds to a development environment. The rendering service creation module is used to build a Web rendering service group adapted to the target rendering platform for each environment application container within the front-end application project. Specifically, for each environment application container, a rendering requirement acquisition instruction is sent to the target rendering platform to obtain the rendering requirement content fed back by the target rendering platform for the environment application container. Then, the target application rendering parameters corresponding to the environment application container are obtained according to the rendering requirement content. Subsequently, the application service group already created within the front-end application project is initialized, and the parameters of the initialized application service group are updated according to the target application rendering parameters to obtain the Web rendering service group corresponding to the environment application container. The code packaging and building module is used to respond to external code input operations for the application container of the environment, and to perform code packaging and building processing on the application container of the environment based on the Web rendering service group of the application container of the environment and the application code corresponding to the external code input operation, so as to obtain the corresponding target application resource package. The application deployment module is used to divide the obtained multiple target environment application resource packages into the same application version identifier for data storage, and to deploy the multiple target environment application resource packages corresponding to the web front-end application to be published under the application version identifier, so that the target rendering platform can obtain the multiple target environment application resource packages for backend page rendering.

7. The system of claim 6, wherein, The system also includes: The local resource detection module is used to respond to the version switching operation for the Web front-end application to be published and to detect whether the front-end publishing device currently stores multiple target environment application resource packages that correspond to the version identifier to be switched pointed to by the version switching operation locally. The local resource sending module is used to send multiple target environment application resource packages corresponding to the version identifier to be switched to the target rendering platform for backend page rendering when it is detected that the front-end publishing device currently has multiple target environment application resource packages stored locally, which correspond to the version identifier to be switched. The resource acquisition driver module is used to send a resource package link message or a resource package link acquisition instruction to the target rendering platform for backend page rendering when it is detected that the front-end publishing device does not currently have multiple target environment application resource packages corresponding to the version identifier to be switched locally. Specifically, the resource package link message instructs the target rendering platform to acquire the corresponding multiple target environment application resource packages from the content delivery network device based on the target link address included in the resource package link message corresponding to the version identifier to be switched, and then performs backend page rendering. The resource package link acquisition instruction instructs the target rendering platform to acquire the target link address corresponding to the version identifier to be switched from the cache server based on the version identifier to be switched included in the resource package link acquisition instruction, and then instructs the target rendering platform to acquire the corresponding multiple target environment application resource packages from the content delivery network device based on the acquired target link address, and then performs backend page rendering.

8. A front-end publishing device, characterized by It includes a processor and a memory, the memory storing a computer program that can be executed by the processor, the processor being able to execute the computer program to implement the front-end application publishing method according to any one of claims 1-5.

9. A readable storage medium, having stored thereon a computer program, characterized in that, When the computer program is executed by the processor of the front-end publishing device, it implements the front-end application publishing method according to any one of claims 1-5.

Citation Information

Patent Citations

  • Front-end application deployment method and device

    CN114281371A

  • Front-end application deployment method and device

    CN115016808A