Automatic small program engineering method for building and releasing

文档序号:1798197 发布日期:2021-11-05 浏览:4次 中文

阅读说明:本技术 自动化构建及发布的小程序工程化方法 (Automatic small program engineering method for building and releasing ) 是由 马山虎 于 2021-08-05 设计创作,主要内容包括:本申请涉及一种自动化构建及发布的小程序工程化方法,该方法包括:利用配置模块,获取用户需求信息,并根据需求信息配置代码上传密钥和IP地址信息,配置工程化系统参数、环境代理信息和三方依赖库信息;利用开发预览版生成模块,基于配置好的配置模块,确定第一预编译单元、编译单元、预览生成单元、第一变更记录生成单元和第一通知单元的参数配置;利用体验版生成模块,基于配置好的配置模块,确定第二预编译单元、第二变更记录生成单元、编译及上传单元和第二通知单元的参数配置,以便于根据用户指定需求发布体验版小程序。如此,极大地减少了人工干预的情况,降低了人为操作带来的风险,同时,提高了生成效率,确保了产出小程序的一致性。(The application relates to an automatic small program engineering method for building and releasing, which comprises the following steps: acquiring user demand information by using a configuration module, uploading key and IP address information according to a demand information configuration code, and configuring engineering system parameters, environment agent information and three-party dependency base information; determining parameter configurations of a first pre-compiling unit, a preview generating unit, a first change record generating unit and a first notification unit by using a development preview generation module based on a configured configuration module; and determining parameter configurations of a second pre-compiling unit, a second change record generating unit, a compiling and uploading unit and a second notification unit by using the experience version generating module based on the configured configuration module so as to release the experience version applet according to the specified requirements of the user. Therefore, the condition of manual intervention is greatly reduced, the risk caused by manual operation is reduced, meanwhile, the generation efficiency is improved, and the consistency of the output small program is ensured.)

1. The small program engineering method for automatic construction and release is characterized by being applied to a small program engineering system for automatic construction and release, wherein the small program engineering system for automatic construction and release comprises a configuration module, a development preview version generation module and an experience version generation module; the method comprises the following steps:

acquiring user demand information by using the configuration module, uploading key and IP address information according to the demand information configuration code, and configuring engineering system parameters, environment agent information and three-party dependency base information;

determining parameter configurations of a first pre-compiling unit, a preview generating unit, a first change record generating unit and a first notification unit by using the development preview version generating module based on the configured configuration module;

and determining parameter configurations of a second pre-compiling unit, a second change record generating unit, a compiling and uploading unit and a second notification unit by using the experience version generating module based on the configured configuration module so as to release the experience version applet according to the appointed requirement of the user.

2. The automated build and release applet engineering method according to claim 1, wherein the IP address information comprises IP white list information.

3. The automated build and release applet engineering method according to claim 1, characterized in that the engineering system parameters include: code branch information, server environment information, compiled code version information, and code setting information.

4. The automated build and release applet engineering method according to claim 3, wherein the code settings information comprises: whether to turn ES6 on ES5, whether to turn enhanced compilation on, whether to compress JS code, whether to compress WXML code, whether to compress WXSS code, whether to turn code protection on, and whether to turn style autocompletion on.

5. The automated build and release applet engineering method according to claim 1, wherein the three-party dependent library information configuration method comprises:

the dependent library of the installation terminal device is initialized by the software package manager.

Technical Field

The application relates to the technical field of small program development, in particular to a small program engineering method for automatically constructing and releasing.

Background

With the development of the mobile internet, the applet-related items have been explosively increased. Meanwhile, the development efficiency problem is increasingly highlighted. Although the development of the small program has the advantages of low development cost, high updating and updating speed, multiple shared entries, good user traffic foundation and the like, a series of problems of ecological closure of development, rigid development flow, scattered technology stacks and the like are faced, and particularly for the packaging and publishing technology of the small program, the compiling process depends on a developer tool, so that great trouble is caused to cross-functional cooperation.

The basic idea of the existing small program packaging and issuing scheme is to manually pull up the latest code, switch the latest code into a correct code branch, open a project and compile through a development tool, manually set issuing contents and submit the issuing contents to a small program management background after compiling is completed, and set the issuing contents as a preview for other functional department personnel to use. On one hand, the packing and releasing scheme is too dependent on manual operation, so that the situation of manual operation errors is difficult to avoid, and the problem of product testing and delivery is easily caused; on the other hand, the precondition requires development of tools and codes, which increases difficulty for cross-functional participants, and requires a certain training of non-developers to participate in the workflow, thereby reducing the work efficiency.

Disclosure of Invention

In view of this, the present application aims to overcome the technical problems in the prior art that the applet packaging and publishing scheme too depends on manual operation and the compiling process too depends on developer tools, and provides an applet engineering method for automatic construction and publishing.

In order to achieve the purpose, the following technical scheme is adopted in the application:

the small program engineering system which is automatically constructed and released comprises a configuration module, a development preview version generation module and an experience version generation module; the method comprises the following steps:

acquiring user demand information by using the configuration module, uploading key and IP address information according to the demand information configuration code, and configuring engineering system parameters, environment agent information and three-party dependency base information;

determining parameter configurations of a first pre-compiling unit, a preview generating unit, a first change record generating unit and a first notification unit by using the development preview version generating module based on the configured configuration module;

and determining parameter configurations of a second pre-compiling unit, a second change record generating unit, a compiling and uploading unit and a second notification unit by using the experience version generating module based on the configured configuration module so as to release the experience version applet according to the appointed requirement of the user.

Optionally, the IP address information includes IP white list information.

Optionally, the engineering system parameters include: code branch information, server environment information, compiled code version information, and code setting information.

Optionally, the code setting information includes: whether to turn ES6 on ES5, whether to turn enhanced compilation on, whether to compress JS code, whether to compress WXML code, whether to compress WXSS code, whether to turn code protection on, and whether to turn style autocompletion on.

Optionally, the configuration method of the three-party dependent library information includes:

the dependent library of the installation terminal device is initialized by the software package manager.

The technical scheme provided by the application can comprise the following beneficial effects:

according to the scheme, the configuration module is utilized, after the requirement information of the user is obtained, the key and the IP address information can be uploaded according to the requirement information configuration code, the engineering system coefficient, the environment agent information and the three-party dependence library information are configured, and the basic configuration information is determined in an engineering mode. By utilizing the development preview generation module, the parameter configuration of the first pre-compiling unit, the preview generation unit, the first change record generation unit and the first notification unit can be determined based on the configured configuration module, so that the basic option configuration is provided for developing the applet of the preview, and a foundation is laid for automatically generating the applet of the development preview. By utilizing the experience version generation module, the parameter configuration of the second pre-compiling unit, the second change record generation unit, the compiling and uploading unit and the second notification unit can be determined based on the configured configuration module, so that the corresponding experience version applet can be issued according to the user formulation requirement. Therefore, based on the idea of sustainable integration and deployment, the small programs can be automatically constructed, compiled and packaged through basic option configuration and submitted to the small program management background, so that the condition of manual intervention is greatly reduced, the risk brought by manual operation is reduced, meanwhile, the generation efficiency is improved, and the consistency of the produced small programs is ensured.

Drawings

In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present application, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.

Fig. 1 is a flowchart of an automated applet construction and distribution method according to an embodiment of the present application.

Detailed Description

In order to make the objects, technical solutions and advantages of the present application more apparent, the technical solutions of the present application will be described in detail below. It is to be understood that the embodiments described are only a few embodiments of the present application and not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the examples given herein without making any creative effort, shall fall within the protection scope of the present application.

Fig. 1 is a flowchart of an automated applet construction and distribution method according to an embodiment of the present application. As shown in the figure, the embodiment provides an automatic small program construction and release method, which can be applied to an automatic small program construction and release system, and the automatic small program construction and release system can include three modules, namely a configuration module, a development preview version generation module and an experience version generation module. The small program engineering method for automatic construction and release provided by the embodiment at least comprises the following implementation steps:

and 11, acquiring user demand information by using a configuration module, uploading key and IP address information according to a demand information configuration code, and configuring engineering system parameters, environment agent information and three-party dependency base information.

Wherein the IP address information comprises IP white list information. The IP white list information is an IP address that is allowed to access.

And step 12, determining parameter configurations of the first pre-compiling unit, the preview generating unit, the first change record generating unit and the first notification unit by utilizing the development preview version generating module based on the configured configuration module.

And step 13, determining parameter configurations of a second pre-compiling unit, a second change record generating unit, a compiling and uploading unit and a second notification unit by using the experience version generating module based on the configured configuration module so as to release the experience version applet according to the specified requirements of the user.

In this embodiment, the configuration module is used to upload the key and the IP address information according to the requirement information configuration code after acquiring the requirement information of the user, configure the engineering system coefficient, the environment agent information, and the third-party dependency base information, and determine the basic configuration information in an engineering manner. By utilizing the development preview generation module, the parameter configuration of the first pre-compiling unit, the preview generation unit, the first change record generation unit and the first notification unit can be determined based on the configured configuration module, so that the basic option configuration is provided for developing the applet of the preview, and a foundation is laid for automatically generating the applet of the development preview. By utilizing the experience version generation module, the parameter configuration of the second pre-compiling unit, the second change record generation unit, the compiling and uploading unit and the second notification unit can be determined based on the configured configuration module, so that the corresponding experience version applet can be issued according to the user formulation requirement. Therefore, based on the idea of sustainable integration and deployment, the small programs can be automatically constructed, compiled and packaged through basic option configuration and submitted to the small program management background, so that the condition of manual intervention is greatly reduced, the risk brought by manual operation is reduced, meanwhile, the generation efficiency is improved, and the consistency of the produced small programs is ensured.

In step 11, the configuration module can be used to implement three-part configuration of the small program engineering system which is automatically built and released: engineering system parameters, environmental agent information, and three-party dependency library information.

In practice, the above engineering system parameters may include, but are not limited to: code branch information, server environment information, compiled code version information, and code setting information.

Wherein the code setting information may include: whether to turn ES6 on ES5, whether to turn enhanced compilation on, whether to compress JS code, whether to compress WXML code, whether to compress WXSS code, whether to turn code protection on, and whether to turn style autocompletion on.

The configuration of the environment agent information mainly configures the local agent and the fixed local IP of the used terminal equipment so as to meet the white list requirement of the small program management background.

The configuration of the three-party dependent library information is mainly to initialize the dependent library of the installation terminal equipment through a software package manager. In particular, the native dependent libraries may be initially installed via npm. Wherein, node.js is an open source and cross-platform JavaScript runtime environment, and npm is node.js is a standard software package manager.

In step 12, the development preview generating module may include a first pre-compiling unit, a preview generating unit, a first change record generating unit, and a first notifying unit.

During implementation, the first precompilation unit compiles the VUE code into an applet code through the uni precompilator, and the code is dynamically processed by using parameters of the configuration module in the compiling process, wherein the processing mode can be, but is not limited to, using a sed instruction of linux.

The compiling unit can generate the executable applet through a miniprogam-ci instruction by using a CLI tool provided by the applet management background.

The preview generating unit can be used for uploading the generated static picture to the picture bed and generating a two-dimensional code which can be used online. In specific implementation, a mode of refreshing the token by using a timing task can be adopted, an available access _ token is maintained, and the picture is uploaded through the access _ token to generate an available online picture.

The first change record generation unit can dynamically generate through analyzing the gitlog history, and completes the screening of the change records through grep and sed instructions of linux.

The first notification unit can trigger the pushing of the two-dimensional code and the change record in a mode of mails or information groups and the like.

In step 13, the experience version generation module may include a second pre-compiling unit, a second change record generation unit, a compiling and uploading unit, and a second notification unit.

In practice, the second compiling unit is similar to the first compiling unit in execution process, the second change log generating unit is similar to the first change log generating unit in execution process, and the second notifying unit is similar to the first notifying unit in execution process. The compiling and uploading module can use a CLI tool provided by the applet management background, can upload the executable applet to the applet management background through the upload instruction, and can specify information such as version number, version description, number of an uploader and the like in the uploading process.

The method provided by the embodiment of the application can be realized through a set of sustainable integrated deployment system jenkins with open sources. Jenkins is an open-source continuous integration tool written by Java, can monitor problems in the continuous integration process in real time by adding programmable instructions and plug-ins, provides detailed log files and reminding functions, and can vividly show the trend and stability of project construction in the form of charts. Based on the method, the participation degree of the manual work can be reduced through an engineering mode, the configurable option is provided, the direct operation of the manual work on the code is avoided, and the risk is reduced. Meanwhile, the processes of construction and deployment are automatically processed by the system, and the construction and the release of the small program version can be completed without a development tool.

It is understood that the same or similar parts in the above embodiments may be mutually referred to, and the same or similar parts in other embodiments may be referred to for the content which is not described in detail in some embodiments.

It should be noted that, in the description of the present application, the terms "first", "second", etc. are used for descriptive purposes only and are not to be construed as indicating or implying relative importance. Further, in the description of the present application, the meaning of "a plurality" means at least two unless otherwise specified.

Any process or method descriptions in flow charts or otherwise described herein may be understood as representing modules, segments, or portions of code which include one or more executable instructions for implementing specific logical functions or steps of the process, and the scope of the preferred embodiments of the present application includes other implementations in which functions may be executed out of order from that shown or discussed, including substantially concurrently or in reverse order, depending on the functionality involved, as would be understood by those reasonably skilled in the art of the present application.

It should be understood that portions of the present application may be implemented in hardware, software, firmware, or a combination thereof. In the above embodiments, the various steps or methods may be implemented in software or firmware stored in memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, any one or combination of the following techniques, which are known in the art, may be used: a discrete logic circuit having a logic gate circuit for implementing a logic function on a data signal, an application specific integrated circuit having an appropriate combinational logic gate circuit, a Programmable Gate Array (PGA), a Field Programmable Gate Array (FPGA), or the like.

It will be understood by those skilled in the art that all or part of the steps carried by the method for implementing the above embodiments may be implemented by hardware related to instructions of a program, which may be stored in a computer readable storage medium, and when the program is executed, the program includes one or a combination of the steps of the method embodiments.

In addition, functional units in the embodiments of the present application may be integrated into one processing module, or each unit may exist alone physically, or two or more units are integrated into one module. The integrated module can be realized in a hardware mode, and can also be realized in a software functional module mode. The integrated module, if implemented in the form of a software functional module and sold or used as a stand-alone product, may also be stored in a computer readable storage medium.

The storage medium mentioned above may be a read-only memory, a magnetic or optical disk, etc.

In the description herein, reference to the description of the term "one embodiment," "some embodiments," "an example," "a specific example," or "some examples," etc., means that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the application. In this specification, the schematic representations of the terms used above do not necessarily refer to the same embodiment or example. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples.

Although embodiments of the present application have been shown and described above, it is understood that the above embodiments are exemplary and should not be construed as limiting the present application, and that variations, modifications, substitutions and alterations may be made to the above embodiments by those of ordinary skill in the art within the scope of the present application.

8页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:一种基于模型缓存实现的离线仓库实时交互方法与系统

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!