CN115857961A - Multi-platform project unified deployment method and device - Google Patents

Multi-platform project unified deployment method and device Download PDF

Info

Publication number
CN115857961A
CN115857961A CN202211686121.7A CN202211686121A CN115857961A CN 115857961 A CN115857961 A CN 115857961A CN 202211686121 A CN202211686121 A CN 202211686121A CN 115857961 A CN115857961 A CN 115857961A
Authority
CN
China
Prior art keywords
target
deployment
configuration information
platform
packaging
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202211686121.7A
Other languages
Chinese (zh)
Inventor
姬照中
付迎鑫
刘桥
槐正
王健
徐锐
徐蕾
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
China Telecom Corp Ltd
Original Assignee
China Telecom Corp Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by China Telecom Corp Ltd filed Critical China Telecom Corp Ltd
Priority to CN202211686121.7A priority Critical patent/CN115857961A/en
Publication of CN115857961A publication Critical patent/CN115857961A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Stored Programmes (AREA)

Abstract

The application discloses a multi-platform project unified deployment method and device. Wherein, the method comprises the following steps: creating a platform configuration file under a root directory of a target project, wherein the platform configuration file comprises a plurality of groups of packaging configuration information and deployment configuration information corresponding to a plurality of platforms, and a plurality of groups of environment configuration information; running a prewritten packaging script, and determining a target platform and a target environment to be deployed, wherein the packaging script is used for determining target packaging configuration information and target deployment configuration information corresponding to the target platform and target environment configuration information corresponding to the target environment from a platform configuration file, and packaging and producing a package according to the target packaging configuration information, the target deployment configuration information and the target environment configuration information; and running a pre-written deployment script, wherein the deployment script is used for deploying the production package to the target platform. The method and the device solve the technical problems of low deployment efficiency and poor deployment reliability when the front-end projects are uniformly deployed at multiple platform ends in the related technology.

Description

Multi-platform project unified deployment method and device
Technical Field
The application relates to the technical field of computer application, in particular to a multi-platform project unified deployment method and device.
Background
At present, with the development of information technology, the number of platform ends is continuously increased, and meanwhile, due to version iteration and function change of a front-end project, multi-end deployment of the front-end project is more and more complex. In addition, because the deployment modes of the front-end projects at the platform ends are different, when one front-end project is deployed to a plurality of platform ends at the same time, the front-end project needs to be packaged and deployed respectively, and the whole process is complicated and complicated; when the front-end project needs iteration or function change, each platform end needs to be packaged and deployed respectively again.
Therefore, in a multi-terminal scene, the unified deployment of the multiple terminals is realized by adopting an inefficient and repeated manual deployment method, which not only increases the time cost and the labor cost of a developer, but also influences the progress and the development efficiency of a front-end development project; in addition, the manual deployment mode cannot ensure that each link of the deployment process is strictly executed, resulting in poor deployment reliability.
In view of the above problems, no effective solution has been proposed.
Disclosure of Invention
The embodiment of the application provides a multi-platform project unified deployment method and device, and aims to at least solve the technical problems of low deployment efficiency and poor deployment reliability when front-end projects are deployed in a multi-platform end unified manner in the related art.
According to an aspect of an embodiment of the present application, a method for unified project deployment of multiple platforms is provided, including: creating a platform configuration file under a root directory of a target item, wherein the platform configuration file comprises multiple groups of packaging configuration information and deployment configuration information corresponding to multiple platforms, and multiple groups of environment configuration information; running a prewritten packaging script, and determining a target platform and a target environment to be deployed, wherein the packaging script is used for determining target packaging configuration information and target deployment configuration information corresponding to the target platform and target environment configuration information corresponding to the target environment from a platform configuration file, and packaging and producing a package according to the target packaging configuration information, the target deployment configuration information and the target environment configuration information; and running a pre-written deployment script, wherein the deployment script is used for deploying the production package to the target platform.
Optionally, each set of packing configuration information at least includes: the method comprises the following steps that first general configuration information and first personalized configuration information corresponding to a platform are obtained, wherein the first general configuration information at least comprises the following components: platform type, project name, project description and project version; each set of deployment configuration information at least comprises: the second general configuration information and second personalized configuration information corresponding to the platform, wherein the second general configuration information at least comprises: platform type, release description, release version and deployment command; each set of environment configuration information at least comprises: the server interface corresponding to the target environment accesses the address information, wherein the target environment comprises one of the following: development environment, test environment, production environment, user acceptance test environment and simulation environment.
Optionally, determining a target platform and a target environment to be deployed includes: in response to a first selection instruction input in a selection interface provided by the packaging script, selecting a target platform and a target environment corresponding to the first selection instruction from alternative platforms and alternative environments provided by the selection interface; or, in response to the deployment information input in the input interface provided by the packaging script, determining the target platform and the target environment in the deployment information.
Optionally, packaging the production package according to the target packaging configuration information, the target deployment configuration information, and the target environment configuration information, including: creating a production folder under the directory of the target project by the packaging script; the packaging script generates a packaging command according to the target packaging configuration information and the target environment configuration information, executes the packaging command to obtain a production package, and puts the production package into a production folder; and the packaging script creates a project configuration file, writes the target deployment configuration information into the project configuration file, and puts the project configuration file into a production folder.
Optionally, deploying the production package to the target platform comprises: the deployment script reads the project configuration file in the production folder, and configures the target platform according to the target deployment configuration information in the project configuration file; the deployment script deploys a target production package of the plurality of production packages to the target platform.
Optionally, the deploying script deploys a target production package in the plurality of production packages to the target platform, including: and the deployment script responds to a second selection instruction input in a selection interface provided by the deployment script, traverses the plurality of production packages in the production folder, determines a target production package corresponding to the second selection instruction from the plurality of production packages, and deploys the target production package to the target platform.
Optionally, when the version of the target project is updated, updating the platform configuration file; and re-running the packaging script and the deployment script.
According to another aspect of the embodiments of the present application, there is also provided a multi-platform project unified deployment apparatus, including: the system comprises a configuration module, a configuration module and a configuration module, wherein the configuration module is used for creating a platform configuration file under a root directory of a target project, and the platform configuration file comprises multiple groups of packaging configuration information and deployment configuration information corresponding to multiple platforms and multiple groups of environment configuration information; the system comprises a packaging module, a platform configuration file generation module and a packaging module, wherein the packaging module is used for running a pre-written packaging script and determining a target platform and a target environment to be deployed, the packaging script is used for determining target packaging configuration information and target deployment configuration information corresponding to the target platform and target environment configuration information corresponding to the target environment from the platform configuration file, and packaging a production package according to the target packaging configuration information, the target deployment configuration information and the target environment configuration information; and the deployment module is used for running a pre-written deployment script, wherein the deployment script is used for deploying the production package to the target platform.
According to another aspect of the embodiments of the present application, a nonvolatile storage medium is further provided, where the nonvolatile storage medium includes a stored program, and a device in which the nonvolatile storage medium is located executes the above-mentioned multi-platform project unified deployment method by running the program.
According to another aspect of the embodiments of the present application, there is also provided an electronic device, including: the system comprises a memory and a processor, wherein the memory stores a computer program, and the processor is configured to execute the multi-platform project unified deployment method through the computer program.
In the embodiment of the application, a platform configuration file is created under a root directory of a target project, wherein the platform configuration file comprises multiple groups of packaging configuration information and deployment configuration information corresponding to multiple platforms, and multiple groups of environment configuration information; running a prewritten packaging script, and determining a target platform and a target environment to be deployed, wherein the packaging script is used for determining target packaging configuration information and target deployment configuration information corresponding to the target platform and target environment configuration information corresponding to the target environment from a platform configuration file, and packaging and producing a package according to the target packaging configuration information, the target deployment configuration information and the target environment configuration information; and running a pre-written deployment script, wherein the deployment script is used for deploying the production package to the target platform. The method comprises the steps that a platform configuration file is created under a root directory of a target project, so that the cost of multi-terminal platform project deployment is increased, and the transverse expansion capability of the multi-terminal platform project deployment is improved; in addition, the efficiency of multi-terminal platform project deployment can be improved to the greatest extent by running the pre-written packaging script, project deployment time is shortened, meanwhile, automatic deployment is achieved, manual deployment errors are avoided, and the technical problems that in the related art, when front-end projects are deployed uniformly at multiple platforms, deployment efficiency is low and deployment reliability is poor are solved.
Drawings
The accompanying drawings, which are included to provide a further understanding of the application and are incorporated in and constitute a part of this application, illustrate embodiment(s) of the application and together with the description serve to explain the application and not to limit the application. In the drawings:
FIG. 1 is a flow chart of an alternative multi-platform project unified deployment method according to an embodiment of the present application;
FIG. 2 is a schematic structural diagram of an alternative multi-platform project unified deployment system according to an embodiment of the present application;
FIG. 3 is a schematic diagram of an alternative platform configuration according to an embodiment of the present application;
FIG. 4 is a schematic diagram of an alternative platform type according to an embodiment of the present application;
FIG. 5 is a schematic diagram of an alternative environmental configuration according to an embodiment of the present application;
fig. 6 is a schematic structural diagram of an alternative multi-platform project unified deployment apparatus according to an embodiment of the present application.
Detailed Description
In order to make the technical solutions better understood by those skilled in the art, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only partial embodiments of the present application, but not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
It should be noted that the terms "first," "second," and the like in the description and claims of this application and in the drawings are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the application described herein are capable of operation in sequences other than those illustrated or described herein. Furthermore, the terms "comprises," "comprising," and any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
Example 1
In accordance with an embodiment of the present application, there is provided a multi-platform project unified deployment method, it should be noted that the steps illustrated in the flowchart of the drawings may be performed in a computer system such as a set of computer executable instructions, and that while a logical order is illustrated in the flowchart, in some cases the steps illustrated or described may be performed in an order different than that herein.
Fig. 1 is a flowchart of an optional multi-platform project unified deployment method according to an embodiment of the present application, and as shown in fig. 1, the method includes at least steps S102-S106, where:
step S102, a platform configuration file is created under the root directory of the target item, wherein the platform configuration file comprises multiple groups of packaging configuration information and deployment configuration information corresponding to multiple platforms, and multiple groups of environment configuration information.
In the technical solution provided in step S102 of the present invention, the platform configuration file configures the packing configuration information of multiple platforms and the fields required by the deployment configuration information in a platform-configuration.
Json is manually added to the root directory of the target item. Platforms include, but are not limited to, H5, native App, applets such as hundredths, paypal, byte jitter, QQ, 360, express, flybook, kyoto, league, etc., and are not specifically limited herein.
And step S104, running a pre-written packaging script, and determining a target platform and a target environment to be deployed, wherein the packaging script is used for determining target packaging configuration information and target deployment configuration information corresponding to the target platform and target environment configuration information corresponding to the target environment from the platform configuration file, and packaging the production package according to the target packaging configuration information, the target deployment configuration information and the target environment configuration information.
In the technical solution provided by step S104 of the present invention, a series of maintenance tasks are completed in batch and automatically by running a packaging script, so as to reduce workload, where the packaging script may be, but is not limited to, a shell script.
And S106, running the pre-written deployment script, wherein the deployment script is used for deploying the production package to the target platform.
In the technical solution provided by step S106 of the present invention, the deployment script may automatically deploy the production package to the corresponding platform end, so as to implement extremely simple automated deployment, and facilitate flexible switching in various environments and platforms, where the deployment script may be, but is not limited to, deploying a shell script (i.e., deployment script).
Fig. 2 is a block diagram of an alternative multi-platform project unified deployment system according to an embodiment of the present application, and the method of the embodiment is further described with reference to fig. 2.
As an optional implementation manner, in the technical solution provided by step S102 of the present invention, each set of packing configuration information at least includes: the method comprises the following steps of obtaining first general configuration information and first personalized configuration information corresponding to a platform, wherein the first general configuration information at least comprises the following steps: platform type, project name, project description and project version; each set of deployment configuration information at least comprises: the second general configuration information and second personalized configuration information corresponding to the platform, wherein the second general configuration information at least comprises: platform type, release description, release version and deployment command; each set of environment configuration information at least comprises: the server interface corresponding to the target environment accesses the address information, wherein the target environment comprises one of the following: development environment, test environment, production environment, user acceptance test environment and simulation environment.
In this embodiment, the platform configuration file includes three main configuration items, i.e., a package configuration, an environment configuration, and a deployment configuration. Besides common fields such as platform type, project name, project description, project version and the like, the packaging configuration information also needs to awaken personalized configuration according to the type of the platform, for example, an applet ID needs to be configured, and a file name of deployment needs to be configured in HTML5 (Hypertext Markup Language5, fifth generation hypertext Markup Language). The environment configuration comprises a development environment (level), a testing environment (testing), a production environment (production), an UAT (User Acceptance Test) environment, a simulation environment and the like, and can be selected and combined according to an actual application scene, and in addition, corresponding server interface access addresses can be selected according to different environment configurations; the deployment configuration needs to configure fields required by deployment of each platform, so besides common fields, such as platform type, release description, release version, deployment command, and the like, personalized configurations required by platform deployment can be further provided, for example, an applet needs to configure an upload key and an applet ID, and HTML5 needs to configure a website title and a website domain name.
For example, fig. 3 is a schematic diagram of an optional platform configuration according to an embodiment of the present application, and as can be seen from fig. 3, names of multi-port unified deployment projects, application IDs, multi-port unified deployment project cases, version names, version passwords, and native APP configuration information, package information, environment information, and deployment information are defined in platform-config. Fig. 4 is a schematic diagram of an optional platform type according to an embodiment of the present application, and as can be seen from fig. 4, platform values corresponding to different platform types are different, and therefore, the platform values may also be used as personalized configuration information of the platform. In addition, fig. 5 is a schematic diagram of an alternative environment configuration according to an embodiment of the present application, and as can be seen from fig. 5, short names of different environments are defined in the environment configuration, such as dev for development environment and prod for production environment, and the environment configuration further includes corresponding server interface access address information.
As an optional implementation manner, in the technical solution provided by step S104 of the present invention, the method further includes: in response to a first selection instruction input in a selection interface provided by the packaging script, selecting a target platform and a target environment corresponding to the first selection instruction from alternative platforms and alternative environments provided by the selection interface; or, in response to the deployment information input in the input interface provided by the packaging script, determining the target platform and the target environment in the deployment information.
In this embodiment, the target platform and the target environment to be deployed may be determined manually, that is, when the shell script is executed, a developer may manually determine the platform and the environment type to be deployed from the platform configuration file by inputting the first selection instruction in the selection interface provided by the shell script. And the target platform and the target environment to be deployed can be determined in an automatic mode, namely when the shell script is run, a developer can input deployment information in a selection interface provided by the shell script, and the platform and the environment type to be deployed are automatically determined from the platform configuration file.
As another optional implementation manner, in the technical solution provided by step S104 of the present invention, the method further includes: creating a production folder under the directory of the target project by the packaging script; generating a packaging command by the packaging script according to the target packaging configuration information and the target environment configuration information, executing the packaging command to obtain a production package, and putting the production package into a production folder; and the packaging script creates a project configuration file, writes the target deployment configuration information into the project configuration file, and puts the project configuration file into a production folder.
In this embodiment, the shell script may create a build folder (i.e., a production folder) under the directory of the current project; generating a corresponding packing command according to packing configuration information and environment configuration information in platform-configuration.json, executing the packing command to obtain a production package, and putting the production package into a build folder; in a production package, a shell script creates a manifest.
As an optional implementation manner, in the technical solution provided by step S106 of the present invention, the method further includes: the deployment script reads the project configuration file in the production folder, and configures the target platform according to the target deployment configuration information in the project configuration file; the deployment script deploys a target production package of the plurality of production packages to the target platform.
In this embodiment, a deployment shell script is run, a manifest.json file in the build file is selected, a corresponding platform is configured according to the deployment configuration in the manifest.json file, and a corresponding production package in the build file is deployed on the corresponding platform, so that a plurality of platform ends are automatically deployed.
When the deployment shell script is operated and the production packages in the build file are selected for deployment, all the production packages can be selected to be deployed to the corresponding platforms or part of the production packages can be selected to be deployed to the corresponding platforms according to the actual application scene, so that the purpose of self-defining deployment of a plurality of platforms is achieved.
Optionally, the deployment script traverses the plurality of production packages in the production folder in response to a second selection instruction input in a selection interface provided by the deployment script, determines a target production package corresponding to the second selection instruction from the plurality of production packages, and deploys the target production package to the target platform.
As another optional implementation, the platform configuration file may also be updated when the version of the target project is updated; and the packaging script and the deployment script are re-run, so that unified deployment of the multi-end project is simplified, and high-efficiency and automatic deployment of version iteration of the multi-end project is realized.
The uni-app is used as a framework for developing all front-end applications based on vue.js, so that a developer writes a set of codes and can issue the codes to multiple platforms such as iOS, android, various small programs and fast applications, thereby realizing uniform development of multi-end codes, but the uni-app cannot realize uniform deployment of multi-end projects, and the method of the embodiment of the application can realize uniform deployment of multi-platform projects.
According to an alternative embodiment of the present application, a multi-platform project unified deployment may be implemented through steps S1 to S7:
step S1, creating a uniiapp item in a vue-cli command line, and creating a platform-config.json file under a root directory of the uniiapp item;
s2, configuring multiple groups of packaging configuration information and deployment configuration information corresponding to multiple platforms and multiple groups of environment configuration information in a platform-configuration.
S3, compiling a packaged shell script;
s4, compiling a deployment shell script;
s5, running a package shell script, and determining a target platform to be deployed and a target environment;
s6, running a deployment shell script, and deploying the production package to a target platform;
and S7, after deployment is completed, the deployed uniiapp project can be checked at the corresponding platform end.
In the embodiment of the application, a platform configuration file is created under a root directory of a target project, wherein the platform configuration file comprises multiple groups of packaging configuration information and deployment configuration information corresponding to multiple platforms, and multiple groups of environment configuration information; running a prewritten packaging script, and determining a target platform and a target environment to be deployed, wherein the packaging script is used for determining target packaging configuration information and target deployment configuration information corresponding to the target platform and target environment configuration information corresponding to the target environment from a platform configuration file, and packaging and producing a package according to the target packaging configuration information, the target deployment configuration information and the target environment configuration information; and running a pre-written deployment script, wherein the deployment script is used for deploying the production package to the target platform. The method comprises the steps that a platform configuration file is created under a root directory of a target project, so that the cost of multi-terminal platform project deployment is increased, and the transverse expansion capability of the multi-terminal platform project deployment is improved; in addition, the efficiency of multi-terminal platform project deployment can be improved to the greatest extent by running the pre-written packaging script, project deployment time is shortened, meanwhile, automatic deployment is achieved, manual deployment errors are avoided, and the technical problems that in the related art, when front-end projects are deployed uniformly at multiple platforms, deployment efficiency is low and deployment reliability is poor are solved.
Example 2
According to an embodiment of the present application, there is further provided a multi-platform project unified deployment apparatus for implementing the multi-platform project unified deployment method in embodiment 1, as shown in fig. 6, the multi-platform project unified deployment apparatus at least includes a configuration module 61, a packaging module 62, and a deployment module 63, where:
the configuration module 61 is configured to create a platform configuration file under a root directory of the target item, where the platform configuration file includes multiple sets of package configuration information and deployment configuration information corresponding to multiple platforms, and multiple sets of environment configuration information.
Optionally, each set of packed configuration information in the configuration module 61 at least includes: the method comprises the following steps that first general configuration information and first personalized configuration information corresponding to a platform are obtained, wherein the first general configuration information at least comprises the following components: platform type, project name, project description, and project version.
Optionally, each set of deployment configuration information in the configuration module 61 at least includes: the second general configuration information and second personalized configuration information corresponding to the platform, wherein the second general configuration information at least comprises: platform type, release description, release version, and deployment command.
Optionally, each set of environment configuration information in the configuration module 61 at least includes: the server interface corresponding to the target environment accesses the address information, wherein the target environment comprises one of the following: development environment, test environment, production environment, user acceptance test environment and simulation environment.
The platform configuration file comprises three main configuration items, namely packaging configuration, environment configuration, deployment configuration and the like. Besides common fields such as platform type, project name, project description, project version and the like, the packaging configuration information also needs to awaken personalized configuration according to the type of the platform, for example, an applet ID needs to be configured, and a file name of deployment needs to be configured in HTML5 (Hypertext Markup Language5, fifth generation hypertext Markup Language). The environment configuration comprises a development environment (development), a testing environment (testing), a production environment (production), an UAT (User Acceptance Test) environment, a simulation environment and the like, and can be selected and combined according to actual application scenes, and in addition, corresponding server interface access addresses can be selected according to different environment configurations; the deployment configuration requires configuring fields required for deployment of each platform, and therefore, besides common fields such as platform type, release description, release version, deployment command, and the like, personalized configurations required for platform deployment may also be provided according to the platform, for example, an applet requires configuring an upload key and an applet ID, and HTML5 requires configuring a website title and a website domain name.
And the packaging module 62 is configured to run a pre-written packaging script, and determine a target platform and a target environment to be deployed, where the packaging script is configured to determine target packaging configuration information and target deployment configuration information corresponding to the target platform and target environment configuration information corresponding to the target environment from the platform configuration file, and package the production package according to the target packaging configuration information, the target deployment configuration information, and the target environment configuration information.
Optionally, the packaging module 62 selects a target platform and a target environment corresponding to the first selection instruction from the candidate platforms and the candidate environments provided by the selection interface in response to the first selection instruction input in the selection interface provided by the packaging script; or, in response to the deployment information input in the input interface provided by the packaging script, determining the target platform and the target environment in the deployment information.
The target platform to be deployed and the target environment can be determined by a developer in a manual mode, namely when the shell script is run, the developer can input a first selection instruction in a selection interface provided by the shell script, and the platform to be deployed and the environment type are determined manually from the platform configuration file. And the target platform and the target environment to be deployed can be determined in an automatic mode, namely when the shell script is run, a developer can input deployment information in a selection interface provided by the shell script, and the platform and the environment type to be deployed are automatically determined from the platform configuration file.
As an alternative embodiment, the packaging module 62 may package the production package by: creating a production folder under the directory of the target project by the packaging script; the packaging script generates a packaging command according to the target packaging configuration information and the target environment configuration information, executes the packaging command to obtain a production package, and puts the production package into a production folder; and the packaging script creates a project configuration file, writes the target deployment configuration information into the project configuration file, and puts the project configuration file into a production folder.
Specifically, the shell script may create a build folder (i.e., a production folder) under the directory of the current project; generating a corresponding packing command according to packing configuration information and environment configuration information in platform-configuration.json, executing the packing command to obtain a production package, and putting the production package into a build folder; in a production package, a shell script creates a manifest.
And the deployment module 63 is configured to run a pre-written deployment script, where the deployment script is used to deploy the production package to the target platform.
Optionally, the deployment module 63 reads the project configuration file in the production folder through the deployment script, and configures the target platform according to the target deployment configuration information in the project configuration file; the deployment script deploys the target production package in the production packages to the target platform, so that a plurality of platform ends are automatically deployed.
When the deployment shell script is operated and the production packages in the build file are selected for deployment, all the production packages can be selected to be deployed to the corresponding platforms or part of the production packages can be selected to be deployed to the corresponding platforms according to the actual application scene, so that the purpose of self-defining deployment of a plurality of platforms is achieved.
As an alternative embodiment, the deployment module 63 may implement the deployment of the target production package in the plurality of production packages to the target platform by: and the deployment script responds to a second selection instruction input in a selection interface provided by the deployment script, traverses the plurality of production packages in the production folder, determines a target production package corresponding to the second selection instruction from the plurality of production packages, and deploys the target production package to the target platform.
As another optional implementation, the platform configuration file may also be updated when the version of the target project is updated; and the packaging script and the deployment script are re-run, so that unified deployment of the multi-end project is simplified, and high-efficiency and automatic deployment of version iteration of the multi-end project is realized.
It should be noted that, in the embodiment of the present application, each module in the multi-platform project unified deployment apparatus corresponds to each implementation step of the multi-platform project unified deployment method in embodiment 1 one to one, and since the detailed description is already performed in embodiment 1, details that are not partially represented in this embodiment may refer to embodiment 1, and are not described herein again.
Example 3
According to an embodiment of the present application, a nonvolatile storage medium is further provided, where the nonvolatile storage medium includes a stored program, and a device in which the nonvolatile storage medium is located executes the multi-platform project unified deployment method in embodiment 1 by running the program.
Optionally, the apparatus in which the non-volatile storage medium is located executes the following steps by executing the program: creating a platform configuration file under a root directory of a target project, wherein the platform configuration file comprises a plurality of groups of packaging configuration information and deployment configuration information corresponding to a plurality of platforms, and a plurality of groups of environment configuration information; running a prewritten packaging script, and determining a target platform and a target environment to be deployed, wherein the packaging script is used for determining target packaging configuration information and target deployment configuration information corresponding to the target platform and target environment configuration information corresponding to the target environment from a platform configuration file, and packaging and producing a package according to the target packaging configuration information, the target deployment configuration information and the target environment configuration information; and running a pre-written deployment script, wherein the deployment script is used for deploying the production package to the target platform.
According to an embodiment of the present application, a processor is further provided, and the processor is configured to execute a program, where the program executes the method for unified project deployment of multiple platforms in embodiment 1 when running.
Optionally, the program executes when executing the following steps: creating a platform configuration file under a root directory of a target project, wherein the platform configuration file comprises a plurality of groups of packaging configuration information and deployment configuration information corresponding to a plurality of platforms, and a plurality of groups of environment configuration information; running a prewritten packaging script, and determining a target platform and a target environment to be deployed, wherein the packaging script is used for determining target packaging configuration information and target deployment configuration information corresponding to the target platform and target environment configuration information corresponding to the target environment from a platform configuration file, and packaging a production package according to the target packaging configuration information, the target deployment configuration information and the target environment configuration information; and running a pre-written deployment script, wherein the deployment script is used for deploying the production package to the target platform.
According to an embodiment of the present application, there is also provided an electronic device, including: a memory in which a computer program is stored, and a processor configured to execute the project unified deployment method of multiple platforms in embodiment 1 by the computer program.
Optionally, the processor is configured to implement the following steps by computer program execution: creating a platform configuration file under a root directory of a target project, wherein the platform configuration file comprises a plurality of groups of packaging configuration information and deployment configuration information corresponding to a plurality of platforms, and a plurality of groups of environment configuration information; running a prewritten packaging script, and determining a target platform and a target environment to be deployed, wherein the packaging script is used for determining target packaging configuration information and target deployment configuration information corresponding to the target platform and target environment configuration information corresponding to the target environment from a platform configuration file, and packaging and producing a package according to the target packaging configuration information, the target deployment configuration information and the target environment configuration information; and running a pre-written deployment script, wherein the deployment script is used for deploying the production package to the target platform.
The above-mentioned serial numbers of the embodiments of the present application are merely for description, and do not represent the advantages and disadvantages of the embodiments.
In the above embodiments of the present application, the descriptions of the respective embodiments have respective emphasis, and for parts that are not described in detail in a certain embodiment, reference may be made to related descriptions of other embodiments.
In the embodiments provided in the present application, it should be understood that the disclosed technology can be implemented in other ways. The above-described apparatus embodiments are merely illustrative, and for example, a division of a unit may be a logical division, and in actual implementation, there may be another division, for example, multiple units or components may be combined or may be integrated into another system, or some features may be omitted, or may not be executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, units or modules, and may be in an electrical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present application may be substantially implemented or contributed to by the prior art, or all or part of the technical solution may be embodied in a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method of the embodiments of the present application. And the aforementioned storage medium includes: a U-disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a removable hard disk, a magnetic or optical disk, and other various media capable of storing program codes.
The foregoing is only a preferred embodiment of the present application and it should be noted that those skilled in the art can make several improvements and modifications without departing from the principle of the present application, and these improvements and modifications should also be considered as the protection scope of the present application.

Claims (10)

1. A project unified deployment method of multiple platforms is characterized by comprising the following steps:
creating a platform configuration file under a root directory of a target item, wherein the platform configuration file comprises multiple groups of packaging configuration information and deployment configuration information corresponding to multiple platforms, and multiple groups of environment configuration information;
running a pre-written packaging script, and determining a target platform and a target environment to be deployed, wherein the packaging script is used for determining target packaging configuration information and target deployment configuration information corresponding to the target platform and target environment configuration information corresponding to the target environment from the platform configuration file, and packaging and producing a package according to the target packaging configuration information, the target deployment configuration information and the target environment configuration information;
running a pre-written deployment script, wherein the deployment script is used to deploy the production package to the target platform.
2. The method of claim 1,
each group of the packaging configuration information at least comprises: the method comprises the following steps of first general configuration information and first personalized configuration information corresponding to a platform, wherein the first general configuration information at least comprises the following components: platform type, project name, project description and project version;
each set of the deployment configuration information at least comprises: the second general configuration information and second personalized configuration information corresponding to the platform, wherein the second general configuration information at least comprises: platform type, release description, release version and deployment command;
each set of the environment configuration information at least comprises: accessing address information by a server interface corresponding to a target environment, wherein the target environment comprises one of the following: development environment, test environment, production environment, user acceptance test environment and simulation environment.
3. The method of claim 1, wherein determining the target platform and the target environment to be deployed comprises:
in response to a first selection instruction input in a selection interface provided by the packaging script, selecting the target platform and the target environment corresponding to the first selection instruction from alternative platforms and alternative environments provided by the selection interface; or the like, or, alternatively,
in response to deployment information input in an input interface provided by the packaging script, determining the target platform and the target environment in the deployment information.
4. The method of claim 1, wherein packaging a production package according to the target packaging configuration information, the target deployment configuration information, and the target environment configuration information comprises:
the packaging script creates a production folder under the directory of the target project;
the packaging script generates a packaging command according to the target packaging configuration information and the target environment configuration information, executes the packaging command to obtain the production package, and puts the production package into the production folder;
and the packaging script creates a project configuration file, writes the target deployment configuration information into the project configuration file, and puts the project configuration file into the production folder.
5. The method of claim 4, wherein deploying the production package to the target platform comprises:
the deployment script reads the project configuration file in the production folder, and configures the target platform according to the target deployment configuration information in the project configuration file;
the deployment script deploys a target production package of the plurality of production packages to the target platform.
6. The method of claim 5, wherein the deployment script deploys a target production package of the plurality of production packages to the target platform, comprising:
and the deployment script responds to a second selection instruction input in a selection interface provided by the deployment script, traverses the plurality of production packages in the production folder, determines the target production package corresponding to the second selection instruction from the plurality of production packages, and deploys the target production package to the target platform.
7. The method of claim 1, further comprising:
updating the platform configuration file when the version of the target project is updated;
and re-running the packaging script and the deployment script.
8. A project unified deployment apparatus of multiple platforms, comprising:
the system comprises a configuration module, a configuration module and a configuration module, wherein the configuration module is used for creating a platform configuration file under a root directory of a target project, and the platform configuration file comprises multiple groups of packaging configuration information and deployment configuration information corresponding to multiple platforms and multiple groups of environment configuration information;
the packaging module is used for running a pre-written packaging script and determining a target platform and a target environment to be deployed, wherein the packaging script is used for determining target packaging configuration information and target deployment configuration information corresponding to the target platform and target environment configuration information corresponding to the target environment from the platform configuration file and packaging a production package according to the target packaging configuration information, the target deployment configuration information and the target environment configuration information;
and the deployment module is used for running a pre-written deployment script, wherein the deployment script is used for deploying the production package to the target platform.
9. A non-volatile storage medium, comprising a stored program, wherein a device on which the non-volatile storage medium is located executes the method for unified project deployment from multiple platforms according to any one of claims 1 to 7 by running the program.
10. An electronic device, comprising: a memory having stored therein a computer program and a processor configured to execute the method of multi-platform project unified deployment of any of claims 1 to 7 by the computer program.
CN202211686121.7A 2022-12-27 2022-12-27 Multi-platform project unified deployment method and device Pending CN115857961A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211686121.7A CN115857961A (en) 2022-12-27 2022-12-27 Multi-platform project unified deployment method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211686121.7A CN115857961A (en) 2022-12-27 2022-12-27 Multi-platform project unified deployment method and device

Publications (1)

Publication Number Publication Date
CN115857961A true CN115857961A (en) 2023-03-28

Family

ID=85655078

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211686121.7A Pending CN115857961A (en) 2022-12-27 2022-12-27 Multi-platform project unified deployment method and device

Country Status (1)

Country Link
CN (1) CN115857961A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116450534A (en) * 2023-06-19 2023-07-18 建信金融科技有限责任公司 Method, device, equipment and medium for generating mobile terminal application program

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116450534A (en) * 2023-06-19 2023-07-18 建信金融科技有限责任公司 Method, device, equipment and medium for generating mobile terminal application program
CN116450534B (en) * 2023-06-19 2023-08-22 建信金融科技有限责任公司 Method, device, equipment and medium for generating mobile terminal application program

Similar Documents

Publication Publication Date Title
CN110046101B (en) Page automatic testing method and device and computer storage medium
US9864592B2 (en) System and method for deploying software into a computing environment
KR102341154B1 (en) High-speed application for installation on mobile devices for permitting remote configuration of such mobile devices
CN105511911A (en) System firmware upgrade package generation method and device
CN111290778A (en) AI model packaging method, platform and electronic equipment
CN109889587A (en) Internet of things system automated construction method, device, equipment and storage medium
CN106843901B (en) Page rendering and verification method and device
CN109298900A (en) A kind of application fractionation and on-demand loading method, apparatus
CN115857961A (en) Multi-platform project unified deployment method and device
CN110795139A (en) Client batch packaging method and device, computer equipment and storage medium
CN110716786B (en) Page display method, system and storage medium
CN111831532A (en) Method for constructing test scene and information processing equipment
CN111078529B (en) Client writing module testing method and device and electronic equipment
CN117370203A (en) Automatic test method, system, electronic equipment and storage medium
JP5905313B2 (en) Information processing apparatus, information processing method, information processing system, and program
CN111143193B (en) Big data service testing method, system, terminal and storage medium based on RobotFramework
McAllister Mastering Jenkins
CN114527979A (en) Method and system for generating multi-end form interactive page
CN110941429A (en) Method, device and equipment for processing business script of webpage
Oh et al. Practical Ansible 2: Automate infrastructure, manage configuration, and deploy applications with Ansible 2.9
CN116991355B (en) Method, system and device for supporting LED driving chip by modifying and iterating script
CN114443068B (en) Automatic deployment method, system and device for customized domestic operation system PXE
CN112631620B (en) Method, system, equipment and medium for manufacturing operating system
CN116595284B (en) Webpage system operation method, device, equipment, storage medium and program
Heinonen Learning Puppet

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination