CN115086162A - Project deployment method, device, electronic equipment, system and storage medium - Google Patents

Project deployment method, device, electronic equipment, system and storage medium Download PDF

Info

Publication number
CN115086162A
CN115086162A CN202110231937.XA CN202110231937A CN115086162A CN 115086162 A CN115086162 A CN 115086162A CN 202110231937 A CN202110231937 A CN 202110231937A CN 115086162 A CN115086162 A CN 115086162A
Authority
CN
China
Prior art keywords
file
target
server
access address
network access
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
CN202110231937.XA
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.)
Jingdong Technology Holding Co Ltd
Original Assignee
Jingdong Technology Holding Co 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 Jingdong Technology Holding Co Ltd filed Critical Jingdong Technology Holding Co Ltd
Priority to CN202110231937.XA priority Critical patent/CN115086162A/en
Publication of CN115086162A publication Critical patent/CN115086162A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • H04L41/0889Techniques to speed-up the configuration process
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • H04L41/0866Checking the configuration
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • H04L41/0876Aspects of the degree of configuration automation
    • H04L41/0886Fully automatic configuration
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • H04L41/0893Assignment of logical groups to network elements
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/06Protocols specially adapted for file transfer, e.g. file transfer protocol [FTP]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/2866Architectures; Arrangements
    • H04L67/30Profiles

Abstract

The embodiment of the invention discloses a method, a device, electronic equipment, a system and a storage medium for item deployment, wherein the method for item deployment comprises the following steps: uploading the script file and the style file of the target project to a first server according to the configuration file to obtain a network access address of the script file and a network access address of the style file; writing the network access address of the script file and the network access address of the style file into an original page file of the target project to obtain a target page file; uploading the target page file to a second server to obtain a page identifier of the target project; according to the page identification, the network access address is generated for the target project, the project deployment process can be simplified, and the research and development time is saved.

Description

Project deployment method, device, electronic equipment, system and storage medium
Technical Field
The present invention relates to computer technologies, and in particular, to a method, an apparatus, an electronic device, a system, and a storage medium for item deployment.
Background
In a large or medium company, there are many business departments, each business department has different business, and each business may contain a plurality of projects. In implementing the present invention, the discoverer finds that at least the following problems exist when project deployment is currently performed: (1) each business department applies for a server, applies for a domain name, configures the server, applies for unified login, applies for embedded point script access, applies for monitoring access and the like by self, the process is complicated, and the research and development time is wasted; (2) each business department applies for a server and a domain name by itself, and a plurality of servers and domain names can be applied, so that resource waste is caused to a company; (3) if the projects are deployed under the same server by each service department, the problem of configuration errors may occur because each service department performs server configuration by itself.
Disclosure of Invention
The embodiment of the invention provides a project deployment method, a project deployment device, electronic equipment, a project deployment system and a storage medium, which can simplify the project deployment process and save the research and development time.
In a first aspect, an embodiment of the present invention provides a method for item deployment, including:
uploading a script file and a style file of a target project to a first server according to a configuration file to obtain a network access address of the script file and a network access address of the style file;
writing the network access address of the script file and the network access address of the style file into an original page file of the target project to obtain a target page file;
uploading the target page file to a second server to obtain a page identifier of the target project;
and generating a network access address for the target project according to the page identifier.
Optionally, the configuration file includes a storage path configured for each item in the first server, and the uploading the script file and the style file of the target item to the first server according to the configuration file includes:
determining a target storage path of the target item in the first server according to the configuration file;
and uploading the script file and the style file of the target item to the first server according to the target storage path.
Optionally, the first server includes a test server, a pre-send server, and an online server, and the configuration file includes a storage path in the test server, a storage path in the pre-send server, and a storage path in the online server configured for each project.
Optionally, the writing the network access address of the script file and the network access address of the style file into the original page file of the target item to obtain a target page file includes:
and correspondingly replacing the default access address in the original page file with the network access address of the script file and the network access address of the style file to obtain the target page file.
When the first server is a test server, correspondingly replacing the default access address in the original page file with the network access address of the script file and the network access address of the style file fed back by the test server to obtain the target page file;
when the first server is a pre-sending server, correspondingly replacing the default access address in the original page file with the network access address of the script file and the network access address of the style file fed back by the pre-sending server to obtain the target page file;
and when the first server is an online server, replacing the default access address in the original page file with the network access address of the script file and the network access address of the style file which are fed back by the online server correspondingly to obtain the target page file.
Optionally, the uploading the target pagefile to a second server includes:
and transmitting the source data in the target page file into a preset interface, and uploading the source data to the second server when monitoring that a preset control of the preset interface is triggered. When the environment is a test environment, the preset interface is a preset interface under the test environment, when the environment is a pre-sending environment, the preset interface is a preset interface under the pre-sending environment, and when the environment is an online environment, the preset interface is a preset interface under the online environment.
Optionally, before uploading the source data to the second server, the method further includes:
transcoding the source data;
the uploading the source data to the second server includes:
uploading the transcoded source data to the second server.
Optionally, the generating a network access address for the target item according to the page identifier includes:
acquiring a host identifier of the second server and an item identifier of the target item;
and combining the host identifier, the item identifier and the page identifier into the target item to generate a network access address. When the first server comprises a test server, a pre-sending server and an online server, the network access address generated for the target item can comprise a test access address, a pre-sending access address and an online access address.
Optionally, the method further comprises:
when the network access address of the target item is monitored to be triggered, acquiring the target page file from the second server;
acquiring the script file from the first server according to the network access address of the script file in the target page file, and acquiring the style file from the first server according to the network access address of the style file in the target page file;
and analyzing and rendering the target page file, the script file and the style file to generate a page to be verified of the target project.
In a second aspect, an embodiment of the present invention provides a project deployment apparatus, including:
the first uploading module is used for uploading the script file and the style file of the target project to a first server according to the configuration file to obtain the network access address of the script file and the network access address of the style file;
the writing module is used for writing the network access address of the script file and the network access address of the style file into an original page file of the target project to obtain a target page file;
the second uploading module is used for uploading the target page file to a second server to obtain a page identifier of the target project;
and the generating module is used for generating a network access address for the target project according to the page identifier.
In a third aspect, an embodiment of the present invention further provides an electronic device, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, where the processor executes the computer program to implement the method for deploying an item according to any one of the embodiments of the present invention.
In a fourth aspect, an embodiment of the present invention further provides a project deployment system, including a first server, a second server, and an electronic device for executing the project deployment method according to any embodiment of the present invention.
In a fifth aspect, the present invention further provides a computer-readable storage medium, on which a computer program is stored, which when executed by a processor implements the method for item deployment according to any one of the embodiments of the present invention.
In the embodiment of the invention, resource management can be unified, the script file and the style file of the target project are deployed according to a unified configuration file, the network access addresses of the deployed script file and the deployed style file are written into the page file of the target project, the page file of the target project is uploaded to the second server, and the network access address is automatically generated for the target project according to the page identifier of the target project fed back by the second server, so that the deployment of the target project is completed; in the process of deploying the target project, the business departments only need to submit the script file, the style file and the page file of the target project, do not need to apply for a server, apply for a domain name, configure the server, apply for unified login, apply for embedded point script access, apply for monitoring access and the like, simplify the process of deploying the project, save research and development time, and can concentrate on business logic processing of the business departments more.
In addition, the configuration file comprises a storage path configured for each project in the first server, namely, each project is uniformly deployed in the same server, so that the server and domain name resources are saved.
In addition, the storage path is configured for each project through the unified configuration file, and the problem of configuration errors is avoided.
Furthermore, the first server comprises a test server, a pre-sending server and an online server, namely, the test environment, the pre-sending environment and the online environment can adopt the item deployment method provided by the embodiment of the invention to deploy the target item, so that the problem of complicated item deployment in different environments is fundamentally eliminated, and the labor cost is saved.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings needed to be used in the embodiments will be briefly described below, it should be understood that the following drawings only illustrate some embodiments of the present invention and therefore should not be considered as limiting the scope, and for those skilled in the art, other related drawings can be obtained according to the drawings without inventive efforts.
Fig. 1 is a schematic flow chart of a method for item deployment according to an embodiment of the present invention.
Fig. 2 is a schematic diagram illustrating an effect of the method for deploying an item according to the embodiment of the present invention.
Fig. 3 is another schematic flow chart of the method for item deployment according to the embodiment of the present invention.
Fig. 4 is an interface diagram of the item deployment method according to the embodiment of the present invention.
Fig. 5 is another interface diagram of the item deployment method according to the embodiment of the present invention.
Fig. 6 is a schematic structural diagram of a project deployment apparatus according to an embodiment of the present invention.
Fig. 7 is a schematic structural diagram of a project deployment system according to an embodiment of the present invention.
Fig. 8 is a schematic structural diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
The present invention will be described in further detail with reference to the accompanying drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the invention and are not to be construed as limiting the invention. It should be further noted that, for the convenience of description, only some of the structures related to the present invention are shown in the drawings, not all of the structures.
Fig. 1 is a schematic flowchart of a project deployment method provided by an embodiment of the present invention, which may be executed by a project deployment apparatus provided by an embodiment of the present invention, and the apparatus may be implemented in software and/or hardware. In a specific embodiment, the apparatus may be integrated into an electronic device, such as a Personal Computer (PC), a tablet Computer, a notebook Computer, a desktop Computer, and the like. The following embodiments will be described by taking as an example that the apparatus is integrated in an electronic device, in which a visualization platform can be installed. Referring to fig. 1, the method may specifically include the following steps:
step 101, uploading the script file and the style file of the target project to a first server according to the configuration file to obtain a network access address of the script file and a network access address of the style file.
For example, the configuration file may include storage paths configured for each project, the storage paths configured for each project may be in the same server (i.e., the first server), and the configuration file may be configured in advance by a developer and saved in the visualization platform.
In a specific implementation, after a business department develops a page (HTML) code, a Script (JS) code, and a Style (CSS) code for a target project, the page code, the Script code, and the Style code may be respectively packaged into a page file (HTML file), a Script file (JS file), and a Style file (CSS file) by a preset command, for example, an npm run build command. The method comprises the steps that a visualization platform in the electronic equipment obtains a script file and a style file of a target project through packaging, obtains a storage path of the target project according to a configuration file, and uploads the script file and the style file of the target project to a first server according to the storage path of the target project.
The first server can be a server built by using a node, and the visualization platform can call a default. After uploading the script file and the style file of the target project to the first server, the first server stores the script file and the style file of the target project and feeds back the network access address of the script file and the network access address of the style file after storage, and the network access address of the script file and the network access address of the style file can be understood as an absolute path address. The network access address of the script file and the network access address of the sample file can both be composed of a host identifier of the first server, an item identifier of the target item, a storage path, a random code and the like.
And 102, writing the network access address of the script file and the network access address of the style file into an original page file of the target project to obtain a target page file.
In an example, the default access address in the original page file may be replaced with the network access address of the script file and the network access address of the style file, so as to obtain the target page file. The default access address in the original page file may be the local access address of the script file and the style file, and is a relative path address, that is, the relative path address is replaced with the absolute path address in step 102.
And 103, uploading the target page file to a second server to obtain the page identifier of the target project.
Illustratively, the second server may be a backend server of the visualization platform. Specifically, the source data in the target page file can be transmitted to a preset interface of the visualization platform according to user operation, and when it is monitored that a preset control of the preset interface is triggered, the source data is uploaded to the second server.
In specific implementation, because the source data includes special characters such as "/", in order to avoid the situation that the source data is inconsistent with actual data when the source data is stored and read by a subsequent second server, transcoding processing may be performed on the source data, and the source data after transcoding processing is uploaded to the second server. Specifically, the source data may be transcoded by encoderuricomponent. After the source data after the transcoding processing is uploaded to the second server, the second server stores the source data and feeds back the page identification pagekey of the target item after storage.
And 104, generating a network access address for the target item according to the page identifier.
Specifically, the host identifier of the second server and the item identifier of the target item may be obtained, and the host identifier, the item identifier, and the page identifier are combined into the target item to generate the network access address. In a particular embodiment, generating the network access address for the target item may be: host identity + item identity + page identity. The host identifier may be a host name of the second server, and the item identifier may include a service name, an item attribute, and the like of a service to which the item belongs. In a specific implementation, the domain name in the host identifier of the second server and the domain name in the host identifier of the first server may be the same, thereby saving domain name resources.
For example, the network access address generated for the target item may be a Uniform Resource Locator (URL) link represented by a character, or may be a URL link represented by a barcode or a two-dimensional code.
Further, service logic verification can be performed based on the network access address generated for the target project, which includes the following steps:
monitoring whether the network access address of the target project is triggered or not, and acquiring a target page file from a second server when the network access address of the target project is triggered; acquiring a script file from a first server according to a network access address of the script file in the target page file, and acquiring a style file from the first server according to a network access address of the style file in the target page file; and analyzing and rendering the target page file, the script file and the style file to generate a to-be-verified page of the target project.
Specifically, for example, a network access address generated for the target project may be triggered by a click operation on a visualization platform on the electronic device, after the triggering, the electronic device may acquire the script file from the first server, acquire the style file from the first server according to the network access address of the style file in the target page file, perform parsing and rendering processing on the target page file, the script file, and the style file by using an HTML parser of the visualization page, and generate a to-be-verified page of the target project on the visualization platform. Or the network access address generated for the target item may also be acquired (for example, acquired by scanning) by other devices, the network access address generated for the target item is triggered on the other devices, after the triggering, a page to be verified of the target item is generated on the other devices, and the service logic verification of the target item may be implemented by viewing the page to be verified.
For example, as shown in fig. 2, the target project is a plurality of projects (H5 projects 1-1, H5 projects 1-2, H5 projects 1-3 … …) of a plurality of business parties (business party 1, business party 2, business party 3 … …), after the project is packed to obtain a script file and a style file of each project, the script file and the style file of each project can be uploaded to a specified position of the first server according to a unified configuration file to obtain a network access address of the script file and a network access address of the style file of each project, and then the network access address of the script file and the network access address of the style file of each project are written into an original page file of the corresponding project to obtain a target page file of the corresponding project; the method comprises the steps of importing source data in a target page file of any project into a visual platform and submitting the source data to a second server, generating a network access address for the project according to a page identifier fed back by the second server for the project, and by analogy, generating the network access address for each project, wherein in the network access addresses generated for different projects, domain names in host identifiers are the same, and the project identifiers and the page identifiers are different, so that the domain names and server resources are saved.
In the embodiment of the invention, resource management can be unified, the script file and the style file of the target project are deployed according to a unified configuration file, the network access addresses of the deployed script file and the deployed style file are written into the page file of the target project, the page file of the target project is uploaded to the second server, and the network access address is automatically generated for the target project according to the page identifier of the target project fed back by the second server, so that the deployment of the target project is completed; in the process of deploying the target project, the business departments only need to submit the script file, the style file and the page file of the target project, do not need to apply for a server, apply for a domain name, configure the server, apply for unified login, apply for embedded point script access, apply for monitoring access and the like, simplify the process of deploying the project, save research and development time, and can concentrate on business logic processing of the business departments more.
In addition, the configuration file comprises a storage path configured for each project in the first server, namely, each project is uniformly deployed in the same server, so that the server and domain name resources are saved, and the problem of configuration errors is avoided by deploying each project through the uniform configuration file.
In a specific embodiment, the first server may include a test server, a pre-launch server, and an online server, that is, the method provided by the embodiment of the present invention may be applied to project deployment in a test environment, a pre-launch environment, and an online environment. Wherein. The test environment is an environment which is simulated by using some tools and data and is close to the use environment of a real user; the pre-sending environment is the last test before formal release, all functions and configurations, the database is highly similar to the on-line environment, only the function codes needing to be on-line are allowed to be input, and the testers submit the pre-sending environment for testing after confirming that the codes have no problem after the test environment is tested by the test case; an online environment is an environment that is accessed by a real user. Taking the example of deploying the target project in the pre-release environment as follows, as shown in fig. 3, the project deployment method may include the following steps:
step 201, determining a target storage path of the target item in the pre-sending server according to the configuration file.
Specifically, the configuration file may include a storage path configured for each project in the pre-release server, the configuration file may be configured in advance by a developer and stored in the visualization platform, and after acquiring a script file and a style file of a target project packaged by a business department, the visualization platform may determine a target storage path of the target project in the pre-release server according to the configuration file.
Step 202, uploading the script file and the style file of the target project to a pre-sending server according to the target storage path to obtain the network access address of the script file and the network access address of the style file.
After storing the script file and the style file of the target project, the pre-sending server feeds back the network access address of the script file and the network access address of the style file, and the network access address of the script file and the network access address of the style file can be understood as absolute path addresses.
Step 203, the default access address in the original page file of the target project is replaced by the network access address of the script file and the network access address of the style file correspondingly, and the target page file is obtained.
In an example, the default access address in the original page file may be replaced with the network access address of the script file and the network access address of the style file, so as to obtain the target page file. The default access address in the original page file may be an access address of the script file and the style file locally, and is a relative path address, which may be understood herein as replacing the relative path address with an absolute path address.
And 204, transmitting the source data in the target page file into a preset interface, and transcoding the source data when monitoring that a preset control of the preset interface is triggered.
Specifically, the source data in the target page file may be transmitted to a preset interface of the visualization platform in the pre-send state according to a user operation, in a specific embodiment, the preset interface of the visualization platform in the pre-send state may be as shown in fig. 4, and when it is monitored that a preset control (for example, a "confirmation creation" control) of the preset interface is triggered, the source data may be transcoded, and the source data after being transcoded is uploaded to the second server, so as to avoid a situation that the source data is inconsistent with actual data.
And step 205, uploading the transcoded source data to a second server to obtain a page identifier of the target project.
The second server stores the source data and feeds back the page identification pagekey of the target item after storage.
Step 206, the host identifier of the second server and the item identifier of the target item are obtained.
Illustratively, the host identity may be a host name of the second server, and the item identity may include a service name of a service to which the item belongs, an item name, an item attribute, and the like.
Step 207, combining the host identifier, the item identifier and the page identifier to generate a network access address for the target item.
In a particular embodiment, generating the network access address for the target item may be: host identity + item identity + page identity. For example, as shown in fig. 5, the network access address generated for the target item may be a Uniform Resource Locator (URL) link represented by a character, or may be a URL link represented by a barcode or a two-dimensional code. Specifically, in the prefired state, generating a network access address for the target item may prefire (show-pre) the access address.
And step 208, when the network access address of the target item is triggered, acquiring the target page file from the second server.
For example, a visualization platform on the electronic device may trigger a network access address generated for the target item through a click operation.
Step 209, the script file is obtained from the pre-sending server according to the network access address of the script file in the target page file, and the style file is obtained from the pre-sending server according to the network access address of the style file in the target page file.
And step 210, analyzing and rendering the target page file, the script file and the style file to generate a page to be verified of the target project.
For example, the target page file, the script file and the style file can be analyzed and rendered by an HTML analyzer of the visualization page, and a page to be verified of the target project is generated on the visualization platform.
It should be noted that, this embodiment is only described by taking the target project deployed under the pre-launch environment as an example, and the method for deploying the target project under the test environment and the online environment is similar to the method for deploying the target project under the pre-launch environment, where in the test environment, a script file and a style file of the target project are uploaded to a test server, a network access address of the script file of the target project and a network access address of the style file, which are fed back by the test server, are written in an original page file of the target project, when uploading source data to a second server, the source data are transmitted to a preset interface of a visualization platform in a test state, and a network access address generated for the target project is a test (test) access address; uploading a script file and a style file of a target project to an online server in an online environment, writing a network access address of the script file and a network access address of the style file of the target project, which are fed back by the online server, into an original page file of the target project, transmitting source data to a preset interface of a visual platform in an online state when uploading source data to a second server, and finally generating the network access address for the target project as an online (on-line) access address.
It should be noted that the interface schematic diagram shown in the embodiment of the present disclosure is intended to illustrate a method for deploying a project, and the content (including, but not limited to, text, pictures, and the like) presented in a specific interface does not constitute a limitation on the scheme.
In the embodiment of the invention, resource management can be unified, the script file and the style file of the target project are deployed according to a unified configuration file, the network access addresses of the deployed script file and the deployed style file are written into the page file of the target project, the page file of the target project is uploaded to the second server, and the network access address is automatically generated for the target project according to the page identifier of the target project fed back by the second server, so that the deployment of the target project is completed; in the process of deploying the target project, the business departments only need to submit the script file, the style file and the page file of the target project, do not need to apply for a server, apply for a domain name, configure the server, apply for unified login, apply for embedded point script access, apply for monitoring access and the like, simplify the process of deploying the project, save research and development time, and can concentrate on business logic processing of the business departments more.
In addition, the configuration file comprises a storage path configured for each project in the first server, namely, each project is uniformly deployed in the same server, so that the server and domain name resources are saved, and the problem of configuration errors is avoided by deploying each project through the uniform configuration file.
Furthermore, the first server comprises a test server, a pre-sending server and an online server, namely, the test environment, the pre-sending environment and the online environment can adopt the item deployment method provided by the embodiment of the invention to deploy the target item, so that the problem of complicated item deployment in different environments is fundamentally eliminated, and the labor cost is saved.
Fig. 6 is a structural diagram of a project deployment apparatus provided in an embodiment of the present invention, which is suitable for executing the project deployment method provided in the embodiment of the present invention. As shown in fig. 6, the apparatus may specifically include:
a first uploading module 301, configured to upload a script file and a style file of a target project to a first server according to a configuration file, so as to obtain a network access address of the script file and a network access address of the style file;
a writing module 302, configured to write the network access address of the script file and the network access address of the style file into an original page file of the target project, so as to obtain a target page file;
a second uploading module 303, configured to upload the target page file to a second server, so as to obtain a page identifier of the target project;
a generating module 304, configured to generate a network access address for the target item according to the page identifier.
In an embodiment, the configuration file includes storage paths configured for the items in the first server, and the uploading module 301 uploads the script file and the style file of the target item to the first server according to the configuration file includes:
determining a target storage path of the target item in the first server according to the configuration file;
and uploading the script file and the style file of the target item to the first server according to the target storage path.
In one embodiment, the first server includes a test server, a pre-send server, and an online server.
In an embodiment, the writing module 302 writes the network access address of the script file and the network access address of the style file into the original page file of the target item to obtain a target page file, including:
and correspondingly replacing the default access address in the original page file with the network access address of the script file and the network access address of the style file to obtain the target page file.
In an embodiment, the uploading the target pagefile to a second server by the second uploading module 303 includes:
and transmitting the source data in the target page file into a preset interface, and uploading the source data to the second server when monitoring that a preset control of the preset interface is triggered.
In one embodiment, the second uploading module 303 is further configured to,
transcoding the source data;
uploading the transcoded source data to the second server.
In one embodiment, the generating module 304 generates a network access address for the target item according to the page identifier, including:
acquiring a host identifier of the second server and an item identifier of the target item;
and combining the host identifier, the item identifier and the page identifier into the target item to generate a network access address.
In one embodiment, the apparatus further comprises a verification module;
the verification module is used for acquiring the target page file from the second server when monitoring that the network access address of the target project is triggered; acquiring the script file from the first server according to the network access address of the script file in the target page file, and acquiring the style file from the first server according to the network access address of the style file in the target page file; and analyzing and rendering the target page file, the script file and the style file to generate a page to be verified of the target project.
It is obvious to those skilled in the art that, for convenience and simplicity of description, the foregoing division of the functional modules is merely used as an example, and in practical applications, the above function distribution may be performed by different functional modules according to needs, that is, the internal structure of the device is divided into different functional modules to perform all or part of the above described functions. For the specific working process of the functional module, reference may be made to the corresponding process in the foregoing method embodiment, which is not described herein again.
In the embodiment of the invention, resource management can be unified, the script file and the style file of the target project are deployed according to a unified configuration file, the network access addresses of the deployed script file and the deployed style file are written into the page file of the target project, the page file of the target project is uploaded to the second server, and the network access address is automatically generated for the target project according to the page identifier of the target project fed back by the second server, so that the deployment of the target project is completed; in the process of deploying the target project, the business departments only need to submit the script file, the style file and the page file of the target project, do not need to apply for a server, apply for a domain name, configure the server, apply for unified login, apply for embedded point script access, apply for monitoring access and the like, simplify the process of deploying the project, save research and development time, and can concentrate on business logic processing of the business departments more.
In addition, the configuration file comprises a storage path configured for each project in the first server, namely, each project is uniformly deployed in the same server, so that the server and domain name resources are saved, and the problem of configuration errors is avoided by deploying each project through the uniform configuration file.
Furthermore, the first server comprises a test server, a pre-sending server and an online server, namely, the test environment, the pre-sending environment and the online environment can adopt the item deployment method provided by the embodiment of the invention to deploy the target item, so that the problem of complicated item deployment in different environments is fundamentally eliminated, and the labor cost is saved.
The embodiment of the present invention further provides an electronic device, which includes a memory, a processor, and a computer program that is stored in the memory and can be run on the processor, and when the processor executes the computer program, the processor implements the project configuration method provided in any of the above embodiments.
An embodiment of the present invention further provides a computer-readable medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the project configuration method provided in any of the above embodiments.
The embodiment of the present invention further provides a project configuration system, as shown in fig. 7, including a first server 401, a second server 402, and an electronic device 403 for executing the project deployment method according to any embodiment of the present invention.
The first server 401 may include a test server 4011, a pre-issue server 4012, and an online server 4013. The interaction among the devices can refer to the description of the previous embodiment, and is not described herein again.
Referring now to FIG. 8, shown is a block diagram of a computer system 500 suitable for use in implementing an electronic device of an embodiment of the present invention. The electronic device shown in fig. 8 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present invention.
As shown in fig. 8, the computer system 500 includes a Central Processing Unit (CPU)501 that can perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM)502 or a program loaded from a storage section 508 into a Random Access Memory (RAM) 503. In the RAM 503, various programs and data necessary for the operation of the system 500 are also stored. The CPU 501, ROM 502, and RAM 503 are connected to each other via a bus 504. An input/output (I/O) interface 505 is also connected to bus 504.
The following components are connected to the I/O interface 505: an input portion 506 including a keyboard, a mouse, and the like; an output portion 507 including a display such as a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and the like, and a speaker; a storage portion 508 including a hard disk and the like; and a communication section 509 including a network interface card such as a LAN card, a modem, or the like. The communication section 509 performs communication processing via a network such as the internet. The driver 510 is also connected to the I/O interface 505 as necessary. A removable medium 511 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is mounted on the drive 510 as necessary, so that a computer program read out therefrom is mounted on the storage section 508 as necessary.
In particular, according to the embodiments of the present disclosure, the processes described above with reference to the flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer-readable medium, the computer program comprising program code for performing the method illustrated by the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network through the communication section 509, and/or installed from the removable medium 511. The computer program performs the above-described functions defined in the system of the present invention when executed by the Central Processing Unit (CPU) 501.
It should be noted that the computer readable medium shown in the present invention can be a computer readable signal medium or a computer readable storage medium or any combination of the two. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present invention, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In the present invention, however, a computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, fiber optic cable, RF, etc., or any suitable combination of the foregoing.
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present invention. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams or flowchart illustration, and combinations of blocks in the block diagrams or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The modules and/or units described in the embodiments of the present invention may be implemented by software, and may also be implemented by hardware. The described modules and/or units may also be provided in a processor, and may be described as: a processor includes a first upload module, a write module, a second upload module, and a generate module. Wherein the names of the modules do not in some cases constitute a limitation of the module itself.
As another aspect, the present invention also provides a computer-readable medium that may be contained in the apparatus described in the above embodiments; or may be separate and not incorporated into the device. The computer readable medium carries one or more programs which, when executed by a device, cause the device to comprise: uploading a script file and a style file of a target project to a first server according to a configuration file to obtain a network access address of the script file and a network access address of the style file; writing the network access address of the script file and the network access address of the style file into an original page file of the target project to obtain a target page file; uploading the target page file to a second server to obtain a page identifier of the target project; and generating a network access address for the target project according to the page identifier.
According to the technical scheme of the embodiment of the invention, resource management can be unified, the script file and the style file of the target project are deployed according to a unified configuration file, the network access addresses of the deployed script file and the deployed style file are written into the page file of the target project, the page file of the target project is uploaded to the second server, and the network access address is automatically generated for the target project according to the page identifier of the target project fed back by the second server, so that the deployment of the target project is completed; in the process of deploying the target project, the business departments only need to submit the script file, the style file and the page file of the target project, do not need to apply for a server, apply for a domain name, configure the server, apply for unified login, apply for embedded point script access, apply for monitoring access and the like, simplify the process of deploying the project, save research and development time, and can concentrate on business logic processing of the business departments more.
In addition, the configuration file comprises a storage path configured for each project in the first server, namely, each project is uniformly deployed in the same server, so that the server and domain name resources are saved, and the problem of configuration errors is avoided by deploying each project through the uniform configuration file.
Furthermore, the first server comprises a test server, a pre-sending server and an online server, namely, the test environment, the pre-sending environment and the online environment can adopt the item deployment method provided by the embodiment of the invention to deploy the target item, so that the problem of complicated item deployment in different environments is fundamentally eliminated, and the labor cost is saved.
The above-described embodiments should not be construed as limiting the scope of the invention. Those skilled in the art will appreciate that various modifications, combinations, sub-combinations, and substitutions can occur, depending on design requirements and other factors. Any modification, equivalent replacement, and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims (12)

1. A method of project deployment, comprising:
uploading a script file and a style file of a target project to a first server according to a configuration file to obtain a network access address of the script file and a network access address of the style file;
writing the network access address of the script file and the network access address of the style file into an original page file of the target project to obtain a target page file;
uploading the target page file to a second server to obtain a page identifier of the target project;
and generating a network access address for the target project according to the page identifier.
2. The method of claim 1, wherein the configuration file includes a storage path in the first server configured for each project, and the uploading the script file and the style file of the target project to the first server according to the configuration file includes:
determining a target storage path of the target item in the first server according to the configuration file;
and uploading the script file and the style file of the target item to the first server according to the target storage path.
3. The method of claim 2, wherein the first server comprises a test server, a pre-send server, and an online server.
4. The method according to claim 1, wherein writing the network access address of the script file and the network access address of the style file into an original page file of the target project to obtain a target page file comprises:
and correspondingly replacing the default access address in the original page file with the network access address of the script file and the network access address of the style file to obtain the target page file.
5. The method of claim 1, wherein said uploading said target pagefile to a second server comprises:
and transmitting the source data in the target page file into a preset interface, and uploading the source data to the second server when monitoring that a preset control of the preset interface is triggered.
6. The method of claim 5, further comprising, prior to uploading the source data to the second server:
transcoding the source data;
the uploading the source data to the second server includes:
uploading the transcoded source data to the second server.
7. The method of claim 1, wherein said generating a network access address for said target item based on said page identification comprises:
acquiring a host identifier of the second server and an item identifier of the target item;
and combining the host identifier, the item identifier and the page identifier into the target item to generate a network access address.
8. The method of item deployment according to any one of claims 1 to 7, further comprising:
when the network access address of the target item is monitored to be triggered, acquiring the target page file from the second server;
acquiring the script file from the first server according to the network access address of the script file in the target page file, and acquiring the style file from the first server according to the network access address of the style file in the target page file;
and analyzing and rendering the target page file, the script file and the style file to generate a page to be verified of the target project.
9. A project deployment apparatus, comprising:
the first uploading module is used for uploading the script file and the style file of the target project to a first server according to the configuration file to obtain the network access address of the script file and the network access address of the style file;
the writing module is used for writing the network access address of the script file and the network access address of the style file into an original page file of the target project to obtain a target page file;
the second uploading module is used for uploading the target page file to a second server to obtain a page identifier of the target project;
and the generating module is used for generating a network access address for the target project according to the page identifier.
10. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor implements the method of item deployment as claimed in any one of claims 1 to 8 when executing the program.
11. A project deployment system comprising a first server, a second server and an electronic device for performing the project deployment method of any of claims 1 to 8.
12. A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the method of item deployment as claimed in any one of claims 1 to 8.
CN202110231937.XA 2021-03-02 2021-03-02 Project deployment method, device, electronic equipment, system and storage medium Pending CN115086162A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110231937.XA CN115086162A (en) 2021-03-02 2021-03-02 Project deployment method, device, electronic equipment, system and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110231937.XA CN115086162A (en) 2021-03-02 2021-03-02 Project deployment method, device, electronic equipment, system and storage medium

Publications (1)

Publication Number Publication Date
CN115086162A true CN115086162A (en) 2022-09-20

Family

ID=83241247

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110231937.XA Pending CN115086162A (en) 2021-03-02 2021-03-02 Project deployment method, device, electronic equipment, system and storage medium

Country Status (1)

Country Link
CN (1) CN115086162A (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080148193A1 (en) * 2001-09-13 2008-06-19 John Moetteli System and method of efficient web browsing
CN102916995A (en) * 2011-08-05 2013-02-06 南京中兴新软件有限责任公司 Application hosting method and system
CN111045655A (en) * 2019-12-18 2020-04-21 广州市百果园信息技术有限公司 Page rendering method and device, rendering server and storage medium
CN111443921A (en) * 2020-03-27 2020-07-24 中国平安财产保险股份有限公司 Method, system and computer equipment for subpackage deployment of web front-end projects
CN112115056A (en) * 2020-09-23 2020-12-22 北京达佳互联信息技术有限公司 Project deployment method and device, server and storage medium

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080148193A1 (en) * 2001-09-13 2008-06-19 John Moetteli System and method of efficient web browsing
CN102916995A (en) * 2011-08-05 2013-02-06 南京中兴新软件有限责任公司 Application hosting method and system
CN111045655A (en) * 2019-12-18 2020-04-21 广州市百果园信息技术有限公司 Page rendering method and device, rendering server and storage medium
CN111443921A (en) * 2020-03-27 2020-07-24 中国平安财产保险股份有限公司 Method, system and computer equipment for subpackage deployment of web front-end projects
CN112115056A (en) * 2020-09-23 2020-12-22 北京达佳互联信息技术有限公司 Project deployment method and device, server and storage medium

Similar Documents

Publication Publication Date Title
US9594672B1 (en) Test case generation
CN109901834B (en) Document page generation method, device, computer equipment and storage medium
US10698797B2 (en) Mobile application program testing method, server, terminal, and storage medium
CN110688142A (en) Method, device and storage medium for publishing application programming interface
CN109815119B (en) APP link channel testing method and device
CN107608901B (en) Jmeter-based testing method and device, storage medium and electronic equipment
CN112685029A (en) Visual template generation method, device, equipment and storage medium
CN111654495B (en) Method, apparatus, device and storage medium for determining traffic generation source
CN115408245A (en) Data flow tracking method and system, electronic equipment and storage medium
CN112363938A (en) Data processing method and device, electronic equipment and storage medium
CN113836014A (en) Interface testing method and device, electronic equipment and storage medium
CN111930629A (en) Page testing method and device, electronic equipment and storage medium
CN115086162A (en) Project deployment method, device, electronic equipment, system and storage medium
CN114745313A (en) Terminal remote testing method and device, electronic equipment and readable medium
CN111858302B (en) Method and device for testing small program, electronic equipment and storage medium
CN113986679A (en) Performance analysis method and device based on configuration information hot loading
CN113805877A (en) Project engineering construction method and device based on IDEA plug-in
CN112328473A (en) Code automation integration test method and device and electronic equipment
CN111880775A (en) Multi-module layered architecture implementation method and device, electronic equipment and storage medium
CN112579428A (en) Interface testing method and device, electronic equipment and storage medium
CN111061627A (en) Webpage point burying method and device, electronic equipment and storage medium
CN112131095A (en) Pressure testing method and device
CN111290870A (en) Method and device for detecting abnormity
CN116561015B (en) Map application testing method, electronic device and computer readable medium
CN115600323B (en) Aviation system simulation method and system, electronic device and readable storage medium

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