CN107621963B - Software deployment method, software deployment system and electronic equipment - Google Patents

Software deployment method, software deployment system and electronic equipment Download PDF

Info

Publication number
CN107621963B
CN107621963B CN201710861079.0A CN201710861079A CN107621963B CN 107621963 B CN107621963 B CN 107621963B CN 201710861079 A CN201710861079 A CN 201710861079A CN 107621963 B CN107621963 B CN 107621963B
Authority
CN
China
Prior art keywords
software
test
description file
deployment
preset
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.)
Expired - Fee Related
Application number
CN201710861079.0A
Other languages
Chinese (zh)
Other versions
CN107621963A (en
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.)
Shenzhen Rongyimai Information Technology Co ltd
Original Assignee
Shenzhen Rongyimai Information Technology 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 Shenzhen Rongyimai Information Technology Co ltd filed Critical Shenzhen Rongyimai Information Technology Co ltd
Priority to CN201710861079.0A priority Critical patent/CN107621963B/en
Publication of CN107621963A publication Critical patent/CN107621963A/en
Application granted granted Critical
Publication of CN107621963B publication Critical patent/CN107621963B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Debugging And Monitoring (AREA)

Abstract

The invention discloses a software deployment method, a software deployment system, electronic equipment and a computer readable storage medium, wherein the software deployment method comprises the following steps: acquiring a construction product and a handover description file related to the software tested at this time; calling a preset first script to detect whether the constructed product and the handover description file meet a preset test condition; if the construction product and the transfer description file both meet preset test conditions, calling a preset second script, and carrying out test deployment on the software in a target test host on the basis of the construction product and the transfer description file. The method can improve the efficiency of testing and deploying the software.

Description

Software deployment method, software deployment system and electronic equipment
Technical Field
The present invention relates to the field of information technology, and in particular, to a software deployment method, a software deployment system, an electronic device, and a computer-readable storage medium.
Background
In the existing Information Technology (IT) enterprise, tools are usually introduced to assist a human to complete a specific task during the delivery process of a software product, for example, when a tester needs to test software, a maintenance worker needs to manually test and deploy the software with the aid of a software deployment tool and a customized script in advance; after the test deployment is completed, the tester can test the software.
Disclosure of Invention
The invention provides a software deployment method, a software deployment system, electronic equipment and a computer readable storage medium, aiming at improving the efficiency of testing and deploying software.
A first aspect of the present invention provides a software deployment method, including:
acquiring a construction product and a handover description file related to the software tested at this time;
calling a preset first script to detect whether the constructed product and the handover description file meet a preset test condition;
if the construction product and the transfer description file both meet preset test conditions, calling a preset second script, and carrying out test deployment on the software in a target test host on the basis of the construction product and the transfer description file.
A second aspect of the present invention provides a software deployment system, including:
the first acquisition module is used for acquiring a construction product, a test input parameter and a handover description file related to the software to be tested;
the first calling module is used for calling a preset first script to detect whether the constructed product and the handover description file meet preset test conditions or not;
and the second calling module is used for calling a preset second script when the construction product and the handover description file both meet preset test conditions, and carrying out test deployment on the software in a target test host based on the construction product and the handover description file.
A third aspect of the present invention provides an electronic device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the method according to the first aspect when executing the computer program.
A fourth aspect of the present invention provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, performs the steps of the method according to the first aspect.
As can be seen from the above, according to the scheme of the present invention, a build product and a handover description file related to a software to be tested at this time are first obtained, then a preset first script is called to detect whether the build product and the handover description file meet preset test conditions, when both the build product and the handover description file meet the preset test conditions, a preset second script is called, and based on the build product and the handover description file, test deployment is performed on the software in a target test host. According to the scheme of the invention, the software is tested and deployed by calling the script, so that automatic test deployment can be realized, and the efficiency of test deployment is greatly improved.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed to be used in the embodiments or the prior art descriptions will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without inventive exercise.
FIG. 1 is a flowchart of an implementation of a software deployment method according to an embodiment of the present invention;
FIG. 2 is a flowchart of another implementation of a software deployment method according to an embodiment of the present invention;
FIG. 3 is a flowchart of an implementation of a third software deployment method according to an embodiment of the present invention;
FIG. 4 is a block diagram of a software deployment system provided by an embodiment of the invention;
fig. 5 is a schematic diagram of an electronic device provided in an embodiment of the present invention.
Detailed Description
In the following description, for purposes of explanation and not limitation, specific details are set forth, such as particular system structures, techniques, etc. in order to provide a thorough understanding of the embodiments of the invention. It will be apparent, however, to one skilled in the art that the present invention may be practiced in other embodiments that depart from these specific details. In other instances, detailed descriptions of well-known systems, devices, circuits, and methods are omitted so as not to obscure the description of the present invention with unnecessary detail.
In order to explain the technical means of the present invention, the following description will be given by way of specific examples.
Example one
Fig. 1 shows an implementation flow of a software deployment method provided in an embodiment of the present invention, which is detailed as follows:
in step S101, a construction product and a handover description file related to the software under test are acquired;
in the embodiment of the invention, firstly, a construction product and a handover description file related to the software tested at this time are obtained. The build product is specifically a product obtained after the build construction operation is performed by the software, and includes an executable program, a configuration file and output data obtained after the build construction operation is performed by the software. The handover description file is a JSON-formatted file, which is specifically a transmission standard file applied to Java, and a standard design of a software deployment method is embedded in the file, which is the basis for the operation of the software deployment method. The content of the handover description file includes, but is not limited to, the following data: file (files) data, configuration (configs) data and database (sqls) data; specifically, the file data includes: the file system comprises component types (component), operations (action), a source file (file) and a target file (destfile), wherein the operations specifically comprise addition (add), update (update) and deletion (delete); the configuration data includes: the method comprises the steps of selecting a component type (component), an operation (action), a target file (destfilename), a configuration item key value (key) and an environment value list, wherein the operation specifically comprises addition (add), update (update) and deletion (delete); the database data includes: the database type comprises mysql and oracle. It is noted that some data in the handover description file, such as component type, operation and object files, belong to both the content of the file data and the content of the configuration data.
In step S102, a preset first script is called to detect whether the constructed product and the handover description file satisfy a preset test condition;
in the embodiment of the present invention, after the building product and the handover description file are obtained in step S101, a preset first script may be called to parse the handover description file, and then the first script is called to detect whether the building product and the handover description file satisfy a preset test condition. The test conditions may be preset by a developer, and are not limited herein. Specifically, the first script is a Shell script.
In step S103, if the built product and the handover description file both satisfy a predetermined test condition, a predetermined second script is called, and based on the built product and the handover description file, a test deployment is performed for the software in the target test host.
In the embodiment of the present invention, after the target test host is determined in step S103, a preset second script is called, and based on the building product and the handover description file, test deployment is performed for the software in the target test host. Specifically, the second script is a Shell script.
Optionally, the software deployment method further includes:
acquiring test input parameters related to the software tested at this time;
determining a target test host based on the test input parameters;
the test input parameters can be obtained by calling a preset Shell script. Specifically, the test input parameters include: system coding and environment coding; based on the test input parameters, determining a target test host, comprising: calling a designated Shell script, inquiring and determining a target test host from a preset deployment platform according to the obtained system code and environment code, and obtaining host information of the target test host, wherein the host information comprises but is not limited to an Internet Protocol (IP) address of the target test host. Optionally, after the target test host is determined, the target test host may be verified, including verifying a public key, a private key, a state, and the like of the target test host.
Optionally, the step S103 includes:
calling a preset second script, and sequentially executing service stopping operation, cache cleaning operation, handover description file copying operation, constructed product copying operation and service starting operation in the target test host;
after step S103, the software deploying method further includes:
and calling a test platform, and testing the constructed product in the target test host based on the test platform and the test input parameters.
The test input parameters comprise a system code and an environment code, and also comprise a test type of the test. When test deployment is performed, firstly, the service of the target test host needs to be stopped, the cache of the target test host needs to be cleaned, then the handover description file and the constructed product obtained in the step S101 are respectively copied into the target test host to construct the test environment of the target test host, and finally, the service of the target test host is started to complete the test deployment. The process takes the traditional operations of manually stopping service, copying files and starting service by developers, and saves the waiting time of a compiling link and a testing deployment link. After the test deployment is completed, the test platform can be called, the system code, the environment code and the test type which are firstly related to the software tested at this time are used as the input of the test platform, the software is automatically tested, and the test result is returned after the test is completed. The types of the tests include, but are not limited to, smoke test, regression test, and the like, and are not limited herein.
Therefore, through the embodiment of the invention, when the software needs to be tested, the script can be called to determine the target test host, and the deployment of the test environment of the software is realized in the target test host, so that the waiting time of compiling and test deployment is saved, and the efficiency of test deployment is improved.
It should be understood that, the sequence numbers of the steps in the foregoing embodiments do not imply an execution sequence, and the execution sequence of each process should be determined by its function and inherent logic, and should not constitute any limitation to the implementation process of the embodiments of the present invention.
Example two
On the basis of the first embodiment, fig. 2 shows an implementation flow of another software deployment method provided by the second embodiment of the present invention, which is detailed as follows:
in step S201, a construction description file of the software is obtained and analyzed to obtain a construction product related to the software;
in the embodiment of the invention, whether a code set in a code base is changed or not is periodically detected, wherein the code base is a collection of all software developed by an enterprise and is stored in a management tool such as svn or git. Each software possesses different address in the code base, and each software possesses its corresponding hand-over number; when a developer changes the code of a certain software in the code base, the handover number of the software is changed. Therefore, the handover number corresponding to each piece of software can be used as a basis for judging whether the code set in the code base is changed, when the handover number of a piece of software in the code base is detected to be changed, the code set in the code base is determined to be changed, and the build description file build. Specifically, the above construction description file includes: the method comprises the steps of constructing a tool, constructing a version of the tool, compiling a version of the language, constructing a code, constructing a knowner list, constructing an execution file and constructing a product directory. After the construction description file is executed, a software environment corresponding to the software is selected to complete the work of compiling, unit testing, code quality checking and construction packaging, so that a construction product related to the software is obtained.
In step S202, a preset third script is called, and the above-mentioned build product and a preset handover description file are copied to a specified location in a preset file server;
in the embodiment of the present invention, a preset third script may be called to perform a handover operation on the above-mentioned build product and a preset handover description file. Specifically, the third script is a Python script. Optionally, the third script may be invoked to parse the handover description file to obtain configuration data included in the handover description file, and transmit and copy the build product and the handover description file to a predetermined location of a file server, where the predetermined location is determined based on the configuration data and a system code. By calling the preset third script, the operation that the constructed product needs to be manually copied after the traditional construction is finished is omitted, and the efficiency is further improved.
In step S203, the build product and the handover description file are obtained from a designated location in the file server;
in the embodiment of the present invention, the construction product and the handover description file related to the software tested this time are acquired from the designated location of the file server in step S202. After the construction is completed, relevant parameters in the construction process are reserved and are applied in the test deployment process.
In step S204, a preset first script is called to detect whether the constructed product and the handover description file satisfy a preset test condition;
in step S205, if the built product and the handover description file both satisfy the predetermined test condition, a predetermined second script is called, and based on the built product and the handover description file, the software is tested and deployed in the target test host.
In the embodiment of the present invention, the implementation manners of the steps S204 and S205 are the same as or similar to the implementation manners of the steps S102 and S103, and reference may be specifically made to the related descriptions of the steps S102 and S103, which are not described herein again.
Therefore, through the embodiment of the invention, the script can be called to carry out the transfer operation after the construction is finished, so that the construction and transfer efficiency of the software is greatly saved; when the software needs to be tested, the script can be called to determine the target test host, the deployment of the test environment of the software is realized in the target test host, the waiting time of compiling and test deployment is saved, and the efficiency of test deployment is improved.
EXAMPLE III
On the basis of the first embodiment, fig. 3 shows an implementation flow of a third software deployment method provided by the third embodiment of the present invention, which is detailed as follows:
in step S301, a construction product and a handover description file related to the software to be tested are acquired;
in step S302, a preset first script is called to detect whether the constructed product and the handover description file satisfy a preset test condition;
in step S303, if the built product and the handover description file both satisfy a preset test condition, a preset second script is called, and based on the built product and the handover description file, test deployment is performed for the software in a target test host;
in the embodiment of the present invention, the implementation manners of the steps S301, S302, and S303 are the same as or similar to the implementation manners of the steps S101, S102, and S103, and reference may be specifically made to the related descriptions of the steps S101, S102, and S103, which are not described herein again.
In step S304, detecting whether the software is in a production release state;
in step S305, if the software is already in the production release state, a production deployment is performed on the target production host for the software.
In the embodiment of the invention, after the test deployment is finished and the software is tested, the relevant parameters during the test deployment are reserved, and a preset fourth script is called to detect whether the software is in a production release state. If the software is in a production release state, determining a target production host and executing production transfer and production deployment, wherein the specific process of executing the production transfer and the production deployment is similar to the steps S301 to S303, but the test input parameters are not adopted, but the production input parameters are adopted; and the production environment obtained after the production deployment is synchronized into the test environment, so that the test environment is the same as the production environment.
Optionally, before the step S305, the software deploying method further includes:
a target production host is determined among the hosts currently in an idle state.
Wherein the target production host can be determined in a randomly specified manner among all hosts in idle state to ensure that the target production host can be called for production deployment.
Optionally, after the step S305, the software deploying method further includes:
calling a preset fourth script to verify whether the production deployment is successful;
and if the production deployment is successful, backing up all scripts in the target production host.
The fourth script may be continuously called, and whether the production deployment operation is successful is verified based on a production deployment rule preset by the software deployment system, for example, the target production host subjected to production deployment is verified in a manner of simulating login, a simulation request, and the like, so as to replace a conventional manual verification manner. Specifically, the fourth script is a Shell script. And when the production deployment is determined to be successful, backing up all scripts in the target production host and backing up information related to the production deployment of the target production host, so that if an abnormal condition occurs in the target production host subsequently, the target production host can return to a normal state by rolling back the backed-up scripts and the backed-up information related to the production deployment.
Therefore, by the embodiment of the invention, when software needs to be tested, the script can be called to determine the target test host, and the deployment of the test environment of the software is automatically realized in the target test host, so that the waiting time of compiling and test deployment is saved, and the efficiency of test deployment is improved; and moreover, after the test deployment is finished, the production deployment can be automatically executed through the script, so that the software publishing efficiency is further improved.
Example four
Fig. 4 shows a specific structural block diagram of the software deployment system provided by the embodiment of the present invention, and for convenience of explanation, only the parts related to the embodiment of the present invention are shown. The software deployment system 4 includes: a first obtaining module 41, a first calling module 42, and a second calling module 43.
The first obtaining module 41 is configured to obtain a construction product, a test input parameter, and a handover description file related to the software to be tested, where the handover description file is a JSON-formatted file;
a first calling module 42, configured to call a preset first script to detect whether the constructed product and the handover description file meet a preset test condition;
and the second calling module is used for calling a preset second script when the constructed product and the handover description file both meet preset test conditions, and carrying out test deployment on the software in the target test host based on the constructed product and the handover description file.
Optionally, the software deployment system 4 further includes:
the second acquisition module is used for acquiring the construction description file of the software;
the analysis module is used for analyzing the construction description file of the software to obtain a construction product related to the software;
the third calling module is used for calling a preset third script and copying the constructed product and a preset handover description file to a specified position in a preset file server;
the first obtaining module 41 is specifically configured to obtain the build product and the handover description file from a specified location in the file server.
Optionally, the software deployment system 4 further includes:
the third acquisition module is used for acquiring test input parameters related to the software tested at this time;
and the target test host determination module is used for determining the target test host based on the test input parameters.
Optionally, the second invoking module 43 is specifically configured to invoke a preset second script, and sequentially execute a service stopping operation, a cache cleaning operation, a handover description file copying operation, a build result copying operation, and a service starting operation in the target test host;
the software deployment system 4 further includes:
and the test calling module is used for calling a test platform and testing the constructed product in the target test host based on the test platform and the test input parameters.
Optionally, the software deployment system 4 further includes:
the state detection module is used for detecting whether the software is in a production release state;
and the production deployment module is used for carrying out production deployment on the software in the target production host, wherein the production environment obtained after the production deployment is the same as the test environment obtained after the test deployment.
Optionally, the software deployment system 4 further includes:
and the target production host determination module is used for determining the target production host in the hosts which are in the idle state currently.
Optionally, the software deployment system 4 further includes:
the fourth calling module is used for calling a preset fourth script and verifying whether the production deployment is successful or not;
and the backup module is used for backing up all scripts in the target production host when the production deployment is successful.
Therefore, through the embodiment of the invention, the software deployment system can call the script to perform the constructed handover operation, so that the construction and handover efficiency of the software is greatly saved; when the software needs to be tested, the script can be called to determine the target test host, and the deployment of the test environment of the software is automatically realized in the target test host, so that the waiting time of compiling and test deployment is saved, and the efficiency of test deployment is improved; and moreover, after the test deployment is finished, the production deployment can be automatically executed through the script, so that the software publishing efficiency is further improved.
EXAMPLE five
Fig. 5 is a schematic diagram of an electronic device provided in an embodiment of the present invention. As shown in fig. 5, the electronic apparatus 5 of this embodiment includes: a processor 50, a memory 51 and a computer program 52, such as a software deployment program, stored in the memory 51 and executable on the processor 50. The processor 50 implements the steps of the various method embodiments described above, such as steps S101 to S103 shown in fig. 1, when executing the computer program 52. Alternatively, the processor 50 executes the computer program 52 to implement the functions of the modules in the system embodiments, such as the modules 41 to 43 shown in fig. 4.
Illustratively, the computer program 52 may be divided into one or more modules, which are stored in the memory 51 and executed by the processor 50 to implement the present invention. The one or more modules may be a series of computer program instruction segments capable of performing specific functions, which are used to describe the execution of the computer program 52 in the electronic device 5. For example, the computer program 52 may be divided into a first obtaining module, a first calling module, and a second calling module. The specific functions of each module are as follows:
the first acquisition module is used for acquiring a construction product, test input parameters and a handover description file related to the software to be tested, wherein the handover description file is a JSON (Java Server object notation) file;
the first calling module is used for calling a preset first script to detect whether the constructed product and the handover description file meet preset test conditions or not;
and the second calling module is used for calling a preset second script when the constructed product and the handover description file both meet preset test conditions, and carrying out test deployment on the software in the target test host on the basis of the constructed product and the handover description file.
The electronic device 5 may be a desktop computer, a notebook, a palm computer, a smart phone, a smart watch, or other computing devices. The electronic device may include, but is not limited to, a processor 50 and a memory 51. Those skilled in the art will appreciate that fig. 5 is merely an example of the electronic device 5, and does not constitute a limitation of the electronic device 5, and may include more or less components than those shown, or combine certain components, or different components, for example, the electronic device 5 may further include an input-output device, a network access device, a bus, etc.
The Processor 50 may be a Central Processing Unit (CPU), other general purpose Processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field-Programmable Gate Array (FPGA) or other Programmable logic device, discrete Gate or transistor logic device, discrete hardware component, or the like. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
The storage 51 may be an internal storage module of the electronic device 5, such as a hard disk or a memory of the electronic device 5. The memory 51 may be an external storage device of the electronic device 5, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), and the like, which are provided on the electronic device 5. Further, the memory 51 may include both an internal storage module and an external storage device of the electronic device 5. The memory 51 is used for storing the computer program and other programs and data required by the electronic device 5. The above-mentioned memory 51 may also be used to temporarily store data that has been output or is to be output.
Therefore, through the embodiment of the invention, the electronic equipment can call the script to perform the constructed handover operation, so that the software construction and handover efficiency is greatly saved; when the software needs to be tested, the script can be called to determine the target test host, and the deployment of the test environment of the software is automatically realized in the target test host, so that the waiting time of compiling and test deployment is saved, and the efficiency of test deployment is improved; and moreover, after the test deployment is finished, the production deployment can be automatically executed through the script, so that the software publishing efficiency is further improved.
It will be clear to those skilled in the art that, for convenience and simplicity of description, the foregoing functional modules and division of modules are merely illustrated, and in practical applications, the above functions may be distributed by different functional modules and modules as needed, that is, the internal structure of the system is divided into different functional modules to complete all or part of the above described functions. Each functional module in the embodiments may be integrated into one processing module, or each module may exist alone physically, or two or more modules are integrated into one module, and the integrated module may be implemented in a form of hardware, or in a form of software functional module. In addition, specific names of the functional modules are only used for distinguishing one functional module from another, and are not used for limiting the protection scope of the application. The specific working process of the modules in the system may refer to the corresponding process in the foregoing method embodiment, and is not described herein again.
In the above embodiments, the descriptions of the respective embodiments have respective emphasis, and reference may be made to the related descriptions of other embodiments for parts that are not described or illustrated in a certain embodiment.
Those of ordinary skill in the art will appreciate that the various illustrative modules and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.
In the embodiments provided in the present invention, it should be understood that the disclosed system/electronic device and method can be implemented in other ways. For example, the above-described system/electronic device embodiments are merely illustrative, and for example, the division of the above-described modules is merely a logical division, and in actual implementation, there may be another division, for example, multiple modules or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be through some interfaces, and the system module indirect coupling or communication connection may be in an electrical, mechanical or other form.
The modules described as separate parts may or may not be physically separate, and parts displayed as modules may or may not be physical modules, may be located in one place, or may be distributed on a plurality of network modules. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment.
In addition, functional modules in the embodiments of the present invention may be integrated into one processing module, or each of the modules may exist alone physically, or two or more modules are integrated into one module. The integrated module can be realized in a hardware mode, and can also be realized in a software functional module mode.
The integrated module may be stored in a computer-readable storage medium if it is implemented in the form of a software functional module and sold or used as a separate product. Based on such understanding, all or part of the flow of the method according to the embodiments of the present invention may also be implemented by a computer program, which may be stored in a computer-readable storage medium and can implement the steps of the embodiments of the method when the computer program is executed by a processor. . The computer program includes computer program code, and the computer program code may be in a source code form, an object code form, an executable file or some intermediate form. The computer readable medium may include: any entity or device capable of carrying the above-mentioned computer program code, recording medium, usb disk, removable hard disk, magnetic disk, optical disk, computer Memory, Read-Only Memory (ROM), Random Access Memory (RAM), electrical carrier wave signal, telecommunication signal, software distribution medium, etc. It should be noted that the computer readable medium described above may be suitably increased or decreased as required by legislation and patent practice in jurisdictions, for example, in some jurisdictions, computer readable media excludes electrical carrier signals and telecommunications signals in accordance with legislation and patent practice.
The above-mentioned embodiments are only used for illustrating the technical solutions of the present invention, and not for limiting the same; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; such modifications and substitutions do not substantially depart from the spirit and scope of the embodiments of the present invention, and are intended to be included within the scope of the present invention.

Claims (7)

1. A software deployment method, characterized in that the software deployment method comprises:
when detecting that a handover number of software in a code base changes, determining that a code set in the code base changes, acquiring and analyzing a construction description file of the software to obtain a construction product related to the software, wherein the construction product is a product obtained after construction operation of the software, and the handover number is used for judging whether the code set in the code base changes or not;
calling a preset third script, analyzing a handover description file to obtain configuration data contained in the handover description file, and copying the constructed product and the handover description file to a specified position in a preset file server, wherein the specified position is determined jointly based on the configuration data and a system code;
acquiring a construction product and a handover description file related to the software tested at this time from a specified position in the file server, wherein the construction product comprises an executable program, a configuration file and output data which are acquired after the software executes construction operation;
calling a preset first script to detect whether the constructed product and the handover description file meet a preset test condition;
if the construction product and the transfer description file both meet preset test conditions, calling a preset second script, and carrying out test deployment on the software in a target test host on the basis of the construction product and the transfer description file;
the software deployment method further comprises:
acquiring test input parameters related to the software to be tested, wherein the input parameters comprise system codes and environment codes;
determining the target test host based on the test input parameters.
2. The software deploying method according to claim 1, wherein the calling a preset second script to perform test deployment for the software in a target test host based on the build product and the handover description file comprises:
calling a preset second script, and executing service stopping operation, cache clearing operation, handover description file copying operation, constructed product copying operation and service starting operation in the target test host in sequence;
the calling a preset second script, and based on the constructed product and the handover description file, performing test deployment for the software in a target test host, and then further comprising:
and calling a test platform, and testing the constructed product in the target test host based on the test platform and the test input parameters.
3. The software deployment method according to claim 1 or 2, wherein the calling a preset second script, based on the build product and the handover description file, performs test deployment for the software in a target test host, and thereafter further comprises:
detecting whether the software is in a production release state;
and if the software is in a production release state, performing production deployment on the software in a target production host, wherein the production environment obtained after the production deployment is the same as the test environment obtained after the test deployment.
4. The method for deploying software according to claim 3, wherein the performing production deployment for the software in the target production host further comprises:
calling a preset fourth script to verify whether the production deployment is successful;
and if the production deployment is successful, backing up all scripts in the target production host.
5. A software deployment system, characterized in that the software deployment system comprises:
the second obtaining module is used for determining that the code set in the code base is changed when detecting that the handover number of the software in the code base is changed, and obtaining a construction description file of the software, wherein the handover number is used for judging whether the code set in the code base is changed or not;
the analysis module is used for analyzing the construction description file of the software to obtain a construction product related to the software, wherein the construction product is obtained after the construction operation of the software is executed;
the third calling module is used for calling a preset third script, analyzing the handover description file to obtain configuration data contained in the handover description file, and copying the constructed product and the handover description file to a specified position in a preset file server, wherein the specified position is determined jointly based on the configuration data and the system code;
a first obtaining module, configured to obtain, from a specified location in the file server, a construction product, a test input parameter, and a handover description file related to the software being tested, where the construction product includes an executable program, a configuration file, and output data obtained after the software performs a construction operation;
the first calling module is used for calling a preset first script to detect whether the constructed product and the handover description file meet preset test conditions or not;
the second calling module is used for calling a preset second script when the constructed product and the handover description file both meet preset test conditions, and carrying out test deployment on the software in a target test host on the basis of the constructed product and the handover description file;
the third acquisition module is used for acquiring test input parameters related to the software to be tested, and the input parameters comprise system codes and environment codes;
and the target test host determination module is used for determining the target test host based on the test input parameters.
6. An electronic device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that the steps of the method according to any of claims 1 to 4 are implemented when the computer program is executed by the processor.
7. A computer-readable storage medium, in which a computer program is stored which, when being executed by a processor, carries out the steps of the method according to any one of claims 1 to 4.
CN201710861079.0A 2017-09-21 2017-09-21 Software deployment method, software deployment system and electronic equipment Expired - Fee Related CN107621963B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710861079.0A CN107621963B (en) 2017-09-21 2017-09-21 Software deployment method, software deployment system and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710861079.0A CN107621963B (en) 2017-09-21 2017-09-21 Software deployment method, software deployment system and electronic equipment

Publications (2)

Publication Number Publication Date
CN107621963A CN107621963A (en) 2018-01-23
CN107621963B true CN107621963B (en) 2020-11-27

Family

ID=61090602

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710861079.0A Expired - Fee Related CN107621963B (en) 2017-09-21 2017-09-21 Software deployment method, software deployment system and electronic equipment

Country Status (1)

Country Link
CN (1) CN107621963B (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109240994A (en) * 2018-08-01 2019-01-18 北京奇虎科技有限公司 A kind of document handling method and device
CN109947458A (en) * 2019-03-22 2019-06-28 广东电网有限责任公司 A kind of offline source code security continuous integrating method
CN110308911A (en) * 2019-07-09 2019-10-08 西安点告网络科技有限公司 Software program delivery method, device, terminal and storage medium
CN110490483A (en) * 2019-08-26 2019-11-22 中国建设银行股份有限公司 Operation method, apparatus, equipment and storage medium
CN111338644A (en) * 2020-02-28 2020-06-26 深圳壹账通智能科技有限公司 Task script deployment method and system

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140181800A1 (en) * 2012-12-14 2014-06-26 Telefonaktiebolaget L M Ericsson (Publ) Systems, methods, and computer program products for a software build and load process using a compilation and deployment service
CN106970818A (en) * 2017-03-27 2017-07-21 深圳市中博睿存信息技术有限公司 A kind of software continuous integrated approach and device for Linux platform
CN107066292A (en) * 2017-03-06 2017-08-18 北京百度网讯科技有限公司 Server environment dispositions method and device

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140181800A1 (en) * 2012-12-14 2014-06-26 Telefonaktiebolaget L M Ericsson (Publ) Systems, methods, and computer program products for a software build and load process using a compilation and deployment service
US20150378718A1 (en) * 2012-12-14 2015-12-31 Telefonaktiebolaget L M Ericsson (Publ) Systems, methods, and computer program products for a software build and load process using a compilation and deployment service
CN107066292A (en) * 2017-03-06 2017-08-18 北京百度网讯科技有限公司 Server environment dispositions method and device
CN106970818A (en) * 2017-03-27 2017-07-21 深圳市中博睿存信息技术有限公司 A kind of software continuous integrated approach and device for Linux platform

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
持续集成之⑤:jenkins结合脚本实现代码自动化部署及一键回滚至上一版本;reblue520;《https://www.cnblogs.com/reblue520/p/7146693.html》;20170710;第1-6页 *

Also Published As

Publication number Publication date
CN107621963A (en) 2018-01-23

Similar Documents

Publication Publication Date Title
CN107621963B (en) Software deployment method, software deployment system and electronic equipment
CN107766236B (en) Test task automatic management method, device, equipment and storage medium
CN105787364B (en) Automatic testing method, device and system for tasks
CN110225078B (en) Application service updating method, system and terminal equipment
US20120110557A1 (en) Automated parallel software code impact analysis
CN107220169B (en) Method and equipment for simulating server to return customized data
CN111897724A (en) Automatic testing method and device suitable for cloud platform
CN110532021B (en) Processing method of configuration file of distributed control system, client and service device
CN111522738A (en) Test method and device of micro-service system, storage medium and electronic equipment
CN110688305B (en) Test environment synchronization method, device, medium and electronic equipment
CN111221721B (en) Automatic recording and executing method and device for unit test cases
CN115391228A (en) Precise test method, device, equipment and medium
CN111131131B (en) Vulnerability scanning method and device, server and readable storage medium
CN111767218A (en) Automatic testing method, equipment and storage medium for continuous integration
CN111949548A (en) Automatic unauthorized penetration testing method and storage device
CN110704307A (en) Application product testing method and device, user equipment and computer storage medium
CN115373929A (en) Test method, device, equipment, readable storage medium and program product
US11360871B1 (en) Automatic optimization and hardening of application images
CN114356346A (en) Application program deployment method, device, storage medium and electronic equipment
CN114812695A (en) Product testing method and device, computer equipment and storage medium
CN110417461B (en) Optical cable positioning method and device for multiple fault points and terminal equipment
CN108845932B (en) Unit testing method and device of network library, storage medium and terminal
CN110704301A (en) TPC-E automatic test method and TPC-E test system
CN112667498B (en) Server building method, device, computer equipment and readable storage medium
CN114741325B (en) Recording method and device of test script for application system test

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
CB02 Change of applicant information

Address after: 518000 Room 201, A building, No. 1, Qian Wan Road, Qianhai Shenzhen Hong Kong cooperation zone, Shenzhen, Guangdong (Shenzhen Qianhai business secretary Co., Ltd.):No. 1701, 1702B, A, New Hao one town, No. 7018 Cai Tian Road, Futian, Shenzhen

Applicant after: SHENZHEN MAIMAITI INFORMATION TECHNOLOGY Co.,Ltd.

Address before: 518000 Room 201, building A, 1 front Bay Road, Shenzhen Qianhai cooperation zone, Shenzhen, Guangdong

Applicant before: SHENZHEN MAIMAITI LEGOU FINANCE SERVICE CO.,LTD.

CB02 Change of applicant information
CB02 Change of applicant information

Address after: Room 201, Building A, No. 1 Qianwan Road, Qianhai Shenzhen-Hong Kong Cooperation Zone, Shenzhen, Guangdong 518000:No. 1701, 1702B, A, New Hao one town, No. 7018 Cai Tian Road, Futian, Shenzhen 518000 Room 201, No. 1 A (Qianhai business secretary, Shenzhen, Shenzhen City, Qianhai Shenzhen Hong Kong cooperation zone, Shenzhen City, Guangdong)

Applicant after: Shenzhen Rongyimai Information Technology Co.,Ltd.

Address before: Room 201, Building A, No. 1 Qianwan Road, Qianhai Shenzhen-Hong Kong Cooperation Zone, Shenzhen, Guangdong 518000:No. 1701, 1702B, A, New Hao one town, No. 7018 Cai Tian Road, Futian, Shenzhen 518000 Room 201, No. 1 A (Qianhai business secretary, Shenzhen, Shenzhen City, Qianhai Shenzhen Hong Kong cooperation zone, Shenzhen City, Guangdong)

Applicant before: SHENZHEN MAIMAITI INFORMATION TECHNOLOGY Co.,Ltd.

CB02 Change of applicant information
GR01 Patent grant
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20201127

CF01 Termination of patent right due to non-payment of annual fee