Configurable simplified construction method and terminal based on front-end webpage application

Through the combination of Jenkins pipeline and grovy scripts, custom construction parameters for front-end web applications are realized, errors and inefficiency problems caused by manual modification of configuration files are solved, and efficient web application construction is realized.

CN119829863AInactive Publication Date: 2025-04-15FUZHOU WECON ELECTRONICS TECH
View PDF 8 Cites 0 Cited by

Patent Information

Application Number
CN202510066658.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-01-16
Publication Date
2025-04-15
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

The existing front-end web application construction method requires manual modification of configuration files, resulting in erroneous operations and inefficiency.

Method used

The visual page of the Jenkins pipeline is used to configure the construction parameters, parse the parameter information through the grovy script and generate dynamic instructions, combine the node construction script to run the construction instructions in the node child process, and convert it into environment variables for application construction.

Benefits of technology

It realizes efficient web application construction without manually modifying configuration files, reduces misoperation and improves construction efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119829863A_ABST
    Figure CN119829863A_ABST
Patent Text Reader

Abstract

The invention discloses a configurable simplified construction method based on a front-end webpage application and a terminal. Construction parameters are configured through a visual page based on a Jenkins assembly line; the method comprises the following steps: reading and analyzing construction parameters configured in a visual page through a grove script to obtain parameter information, and generating a dynamic instruction carrying the parameter information; running a node-based construction script by the dynamic instruction, determining construction information by the construction script according to the parameter information carried in the dynamic instruction, running a construction instruction in a node sub-process, converting the construction information into an environment variable for application construction, and generating a construction result; according to the method, a group script is used for transmitting construction parameters of a jenkins assembly line to a node-based construction script, and the construction script calls a construction instruction by using a node sub-process, so that construction information is ensured to take effect in a specific action range, and webpage application construction based on self-defined construction parameters is realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of front-end web page application development, and in particular to a configurable simplified construction method and terminal based on a front-end web page application. Background Art

[0002] There are currently three mainstream ways to build front-end web applications, all of which rely on configuration files in the project. When building a web application, the content of the configuration file is read to generate build information, and the final build result is controlled by this build information. The first is the most traditional way to build web applications. Developers run build instructions in the development environment to build applications. The second way is to use node scripts to automatically trigger build tasks when code files are submitted. The third way is the current mainstream way, through continuous integration tools such as gitlab or jenkins, when developers submit code, they will monitor this operation and perform build operations.

[0003] All three methods control the built application results through the configuration files in the project, which may have some defects, including: 1. Every time you build an application, you must modify or check the contents of the configuration files. Manually modifying these files will lead to many misoperations. 2. Efficiency issue: No matter which of the above methods is used, if you want to control the build results, you must modify the configuration file and then submit the code and other operations. Summary of the invention

[0004] The technical problem to be solved by the present invention is to provide a simplified construction method and terminal based on the configurable front-end web page application, so as to avoid direct manual modification of the configuration file and realize more efficient web page application construction.

[0005] In order to solve the above technical problems, the technical solution adopted by the present invention is: A simplified construction method based on configurable front-end web application, comprising the steps of: S1. Configure build parameters through the visualization page based on the Jenkins pipeline; S2. Read and parse the construction parameters configured in the visualization page through the grovy script to obtain parameter information, and generate dynamic instructions carrying the parameter information; S3. The dynamic instruction runs a node-based build script, the build script determines the build information according to the parameter information carried in the dynamic instruction, runs the build instruction in the node child process, converts the build information into environment variables for application construction, and generates a build result.

[0006] In order to solve the above technical problems, another technical solution adopted by the present invention is: A simplified construction terminal configurable based on a front-end web application comprises a processor, a memory, and a computer program stored in the memory and executable on the processor, wherein the processor implements the following steps when executing the computer program: S1. Configure build parameters through the visualization page based on the Jenkins pipeline; S2. Read and parse the construction parameters configured in the visualization page through the grovy script to obtain parameter information, and generate dynamic instructions carrying the parameter information; S3. The dynamic instruction runs a node-based build script, the build script determines the build information according to the parameter information carried in the dynamic instruction, runs the build instruction in the node child process, converts the build information into environment variables for application construction, and generates a build result.

[0007] The beneficial effects of the present invention are as follows: a simplified construction method and terminal based on the configurable front-end web application of the present invention utilizes the visualization page of the Jenkins pipeline to configure construction parameters, cooperates with the grovy script and the node-based construction script, and the grovy script implements the transfer of construction parameters from the Jenkins pipeline to the node-based construction script, and the construction script uses the node child process to call the construction instruction, thereby ensuring that the construction information takes effect in a specific scope, and realizing the construction of a web application based on customized construction parameters. BRIEF DESCRIPTION OF THE DRAWINGS

[0008] Figure 1 This is a flowchart of a simplified construction method based on a configurable front-end webpage application according to an embodiment of the present invention; Figure 2 This is a structural example diagram of a simplified terminal that can be configured based on a front-end web application according to an embodiment of the present invention; Figure 3 This is an example diagram of the operation process of a simplified construction method based on a configurable front-end webpage application according to an embodiment of the present invention; Figure 4 This is an example diagram of a construction script flow of a simplified construction method based on a configurable front-end webpage application according to an embodiment of the present invention; Description of labels: 1. A simplified terminal that can be configured based on a front-end web application; 2. A processor; 3. A memory. DETAILED DESCRIPTION

[0009] In order to explain the technical content, achieved objectives and effects of the present invention in detail, the following is an explanation in combination with the implementation modes and the accompanying drawings.

[0010] Please refer to Figure 1 , Figure 3 and Figure 4 , a simplified construction method based on configurable front-end web application, including the steps of: S1. Configure build parameters through the visualization page based on the Jenkins pipeline; S2. Read and parse the construction parameters configured in the visualization page through the grovy script to obtain parameter information, and generate dynamic instructions carrying the parameter information; S3. The dynamic instruction runs a node-based build script, the build script determines the build information according to the parameter information carried in the dynamic instruction, runs the build instruction in the node child process, converts the build information into environment variables for application construction, and generates a build result.

[0011] From the above description, it can be seen that the beneficial effects of the present invention are: a simplified construction method based on the configurable front-end web application of the present invention utilizes the visualization page of the Jenkins pipeline to configure the construction parameters, cooperates with the grovy script and the node-based construction script, and the grovy script implements the construction parameter transfer from the Jenkins pipeline to the node-based construction script, and the construction script uses the node child process to call the construction instruction, ensuring that the construction information is effective in a specific scope, and realizing the construction of a web application based on customized construction parameters.

[0012] Further, step S3 includes the steps of: S31, the dynamic instruction runs a node-based build script; S32, the construction script reads the parameter information carried in the dynamic instruction and converts it into custom construction information; S33, running the build command through the node child process, and reading the preset build information in the configuration file of the project; S34, taking the custom build information as the first priority, merging the custom build information and the preset build information to obtain integrated build information; S35, converting the integrated construction information into environment variables to construct the web application and generate a construction result.

[0013] From the above description, we can see that some parameters can be modified, with customized build information as a higher priority, combined with the configuration file, to obtain the build information required for the build.

[0014] Further, step S32 is specifically as follows: The parameter information is verified, and after the verification passes, the parameter information is converted into custom construction information.

[0015] From the above description, it can be seen that the construction script needs to verify the parameter information to ensure the validity of the parameter information.

[0016] Furthermore, the visualization page based on the Jenkins pipeline includes parameter input controls, and corresponding verification rules are configured for each parameter input control to perform legality verification on the configured build parameters.

[0017] From the above description, it can be seen that it supports configuring corresponding rules on the visualization page or directly controlling the input range, which to some extent realizes the restriction on the modification of the verification parameters.

[0018] Furthermore, the dynamic instruction is a shell instruction.

[0019] From the above description, we can see that the build script is implemented by executing shell instructions through the grovy script.

[0020] Please refer to Figure 2 , a simplified construction terminal configurable based on a front-end web application, comprising a processor, a memory, and a computer program stored in the memory and executable on the processor, wherein the processor implements the following steps when executing the computer program: S1. Configure build parameters through the visualization page based on the Jenkins pipeline; S2. Read and parse the construction parameters configured in the visualization page through the grovy script to obtain parameter information, and generate dynamic instructions carrying the parameter information; S3. The dynamic instruction runs a node-based build script, the build script determines the build information according to the parameter information carried in the dynamic instruction, runs the build instruction in the node child process, converts the build information into environment variables for application construction, and generates a build result.

[0021] From the above description, it can be seen that the beneficial effects of the present invention are: a simplified build terminal configurable based on a front-end web application of the present invention uses the visualization page of the Jenkins pipeline to configure build parameters, cooperates with the grovy script and the node-based build script, and the grovy script implements the passing of build parameters from the Jenkins pipeline to the node-based build script. The build script calls the build instruction in the form of a node subprocess to ensure that the build information is effective in a specific scope, thereby realizing the construction of a web application based on customized build parameters.

[0022] Further, step S3 includes the steps of: S31, the dynamic instruction runs a node-based build script; S32, the construction script reads the parameter information carried in the dynamic instruction and converts it into custom construction information; S33, running the build command through the node child process, and reading the preset build information in the configuration file of the project; S34, taking the custom build information as the first priority, merging the custom build information and the preset build information to obtain integrated build information; S35, converting the integrated construction information into environment variables to construct the web application and generate a construction result.

[0023] From the above description, we can see that some parameters can be modified, with customized build information as a higher priority, combined with the configuration file, to obtain the build information required for the build.

[0024] Further, step S32 is specifically as follows: The parameter information is verified, and after the verification passes, the parameter information is converted into custom construction information.

[0025] From the above description, it can be seen that the construction script needs to verify the parameter information to ensure the validity of the parameter information.

[0026] Furthermore, the visualization page based on the Jenkins pipeline includes parameter input controls, and corresponding verification rules are configured for each parameter input control to perform legality verification on the configured build parameters.

[0027] From the above description, it can be seen that it supports configuring corresponding rules on the visualization page or directly controlling the input range, which to some extent realizes the restriction on the modification of the verification parameters.

[0028] Furthermore, the dynamic instruction is a shell instruction.

[0029] From the above description, we can see that the build script is implemented by executing shell instructions through the grovy script.

[0030] The present invention provides a simplified construction method and terminal based on the configurable front-end web page application, which are suitable for visual customized construction of web page applications.

[0031] Please refer to Figure 1 , Figure 3 and Figure 4 , Embodiment 1 of the present invention is: A simplified construction method based on configurable front-end web application, comprising the steps of: S1. Configure build parameters through the visualization page based on the Jenkins pipeline; The visualization page based on the Jenkins pipeline includes parameter input controls, and corresponding verification rules are configured for each parameter input control to perform legality verification on the configured construction parameters.

[0032] In this embodiment, in order to make the entire construction process more intuitive and simplified, the Jenkins pipeline is used to create parameter input controls (such as input boxes, selectors, etc.) through web page visualization to configure parameter information (construction parameters). These configured construction parameters support the configuration of corresponding verification rules on the page or direct control of the input range, which to some extent limits the modification of construction parameters and avoids misoperation, and is also conducive to continuous integration.

[0033] S2. Read and parse the construction parameters configured in the visualization page through the grovy script to obtain parameter information, and generate dynamic instructions carrying the parameter information; the dynamic instructions are shell instructions.

[0034] Please refer to Figure 3 In this embodiment, the build parameters configured in the visualization page need to be read and parsed by the grovy script. After the grovy script parses the configuration information set in the Jenkins pipeline, it will generate a dynamic instruction in grovy according to these configured parameters, that is, run the node build script through the shell instruction.

[0035] S3, the dynamic instruction runs a node-based build script, the build script determines the build information according to the parameter information carried in the dynamic instruction, runs the build instruction in the node child process, converts the build information into environment variables for application construction, and generates a build result; Please refer to Figure 4 , step S3 comprises the steps of: S31, the dynamic instruction runs a node-based build script; S32, the construction script reads the parameter information carried in the dynamic instruction and converts it into custom construction information; step S32 specifically includes: verifying the parameter information, and converting the parameter information into custom construction information after the verification passes; S33, running the build command through the node child process, and reading the preset build information in the configuration file of the project; S34, taking the custom build information as the first priority, merging the custom build information and the preset build information to obtain integrated build information; S35, converting the integrated construction information into environment variables to construct the web application and generate a construction result.

[0036] In this embodiment, the idea of ​​building a script is to read the parameter information carried when running the script (i.e., the parameter information carried in the dynamic instruction) through the node plug-in processed by the yargs command line parameter when running the custom script. In this custom node build script, the original project build instruction in the front-end web page project is run through the node subprocess module. The reason why the original build instruction of the project is run through the node subprocess is that in the custom node build script, the parameter information carried in the running script will be converted into environment variables. Only when the build instruction is run in the node subprocess can the build information carried in the running script (i.e., the custom build information) be obtained, thereby ensuring that these build information (custom build information and preset build information in the configuration file) are in the same scope. In this way, the parameter information carried by running the custom node build script is converted into the build information required for project construction, so that the build result can be affected without modifying the configuration file.

[0037] Please refer to Figure 2 , Embodiment 2 of the present invention is: A simplified construction terminal 1 configurable based on a front-end web application comprises a processor 2, a memory 3 and a computer program stored in the memory 3 and executable on the processor 2. When the processor 2 executes the computer program, the steps of a simplified construction method configurable based on a front-end web application in the above embodiment 1 are implemented.

[0038] In summary, the present invention provides a simplified construction method and terminal based on the configurable front-end web application, which uses the visualization page of the Jenkins pipeline to configure the construction parameters, cooperates with the grovy script and the node-based construction script, and the grovy script implements the transfer of construction parameters from the Jenkins pipeline to the node-based construction script. The construction script uses the node child process to call the construction instruction, which ensures that the construction information is effective in a specific scope, and realizes the construction of a web application based on customized construction parameters.

[0039] The above descriptions are merely embodiments of the present invention and are not intended to limit the patent scope of the present invention. Any equivalent transformations made using the contents of the present invention's specification and drawings, or directly or indirectly applied in related technical fields, are also included in the patent protection scope of the present invention.

Claims

1. A simplified construction method based on configurable front-end web application, characterized in that: Includes steps: S1. Configure build parameters through the visualization page based on the Jenkins pipeline; S2. Read and parse the construction parameters configured in the visualization page through the grovy script to obtain parameter information, and generate dynamic instructions carrying the parameter information; S3. The dynamic instruction runs a node-based build script, the build script determines the build information according to the parameter information carried in the dynamic instruction, runs the build instruction in the node child process, converts the build information into environment variables for application construction, and generates a build result.

2. According to claim 1, a simplified construction method based on configurable front-end web application is characterized in that: Step S3 includes the steps of: S31, the dynamic instruction runs a node-based build script; S32, the construction script reads the parameter information carried in the dynamic instruction and converts it into custom construction information; S33, running the build command through the node child process, and reading the preset build information in the configuration file of the project; S34, taking the custom build information as the first priority, merging the custom build information and the preset build information to obtain integrated build information; S35, converting the integrated construction information into environment variables to construct the web application and generate a construction result.

3. According to claim 2, a simplified construction method based on configurable front-end web page application is characterized in that: Step S32 is specifically as follows: The parameter information is verified, and after the verification passes, the parameter information is converted into custom construction information.

4. According to claim 1, a simplified construction method based on configurable front-end web application is characterized in that: The visualization page based on the Jenkins pipeline includes parameter input controls, and corresponding verification rules are configured for each parameter input control to perform legality verification on the configured construction parameters.

5. The simplified construction method based on configurable front-end web application according to claim 1, characterized in that: The dynamic instruction is a shell instruction.

6. A simplified construction terminal configurable based on a front-end web application, comprising a processor, a memory, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the following steps are implemented: S1. Configure build parameters through the visualization page based on the Jenkins pipeline; S2. Read and parse the construction parameters configured in the visualization page through the grovy script to obtain parameter information, and generate dynamic instructions carrying the parameter information; S3. The dynamic instruction runs a node-based build script, the build script determines the build information according to the parameter information carried in the dynamic instruction, runs the build instruction in the node child process, converts the build information into environment variables for application construction, and generates a build result.

7. A simplified construction terminal configurable based on a front-end web application according to claim 6, characterized in that: Step S3 includes the steps of: S31, the dynamic instruction runs a node-based build script; S32, the construction script reads the parameter information carried in the dynamic instruction and converts it into custom construction information; S33, running the build command through the node child process, and reading the preset build information in the configuration file of the project; S34, taking the custom build information as the first priority, merging the custom build information and the preset build information to obtain integrated build information; S35, converting the integrated construction information into environment variables to construct the web application and generate a construction result.

8. The simplified construction terminal configurable based on front-end web application according to claim 7, characterized in that: Step S32 is specifically as follows: The parameter information is verified, and after the verification passes, the parameter information is converted into custom construction information.

9. The simplified construction terminal configurable based on front-end web application according to claim 6, characterized in that: The visualization page based on the Jenkins pipeline includes parameter input controls, and corresponding verification rules are configured for each parameter input control to perform legality verification on the configured construction parameters.

10. The simplified construction terminal configurable based on front-end web application according to claim 6, characterized in that: The dynamic instruction is a shell instruction.

Citation Information

Patent Citations

  • Jenkins and K3S-based software environment rapid deployment method

    CN112346752A

  • Website front-end construction method and system

    CN112860251A

  • IOS application program construction method and device, electronic equipment and storage medium

    CN112882700A

  • Jenkins assembly line configuration method and device based on YAML

    CN114594994A

  • Assembly line script generation method, system and equipment based on Jenkins plug-in and medium

    CN115098082A