CN112579099A - Code deployment method and device, storage medium and electronic equipment - Google Patents

Code deployment method and device, storage medium and electronic equipment Download PDF

Info

Publication number
CN112579099A
CN112579099A CN201910945786.7A CN201910945786A CN112579099A CN 112579099 A CN112579099 A CN 112579099A CN 201910945786 A CN201910945786 A CN 201910945786A CN 112579099 A CN112579099 A CN 112579099A
Authority
CN
China
Prior art keywords
deployment
code
application program
version
deploying
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
CN201910945786.7A
Other languages
Chinese (zh)
Inventor
陈宽
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Gridsum Technology Co Ltd
Original Assignee
Beijing Gridsum 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 Beijing Gridsum Technology Co Ltd filed Critical Beijing Gridsum Technology Co Ltd
Priority to CN201910945786.7A priority Critical patent/CN112579099A/en
Publication of CN112579099A publication Critical patent/CN112579099A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/65Updates
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/71Version control; Configuration management

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Security & Cryptography (AREA)
  • Stored Programmes (AREA)

Abstract

The application discloses a code deployment method, a code deployment device, a storage medium and electronic equipment. The method comprises the following steps: the deployment platform receives a deployment request sent by the code warehouse, wherein the deployment request is used for requesting to deploy a client code of an application program with a preset version in the code warehouse, and the deployment request comprises version information of the application program with the preset version; the deployment platform analyzes whether the deployment request meets the deployment requirement; and under the condition that the deployment request meets the deployment requirement, deploying the client codes to obtain the application program of the preset version. By the method and the device, the problems that manual deployment is needed when the version iteration of the application program is carried out in the related technology, manpower is wasted, and program operation abnormity is easily caused are solved.

Description

Code deployment method and device, storage medium and electronic equipment
Technical Field
The present application relates to the field of application program update technologies, and in particular, to a method and an apparatus for deploying a code, a storage medium, and an electronic device.
Background
Each web site that is online on the internet needs to go through steps from the original code in the development tool to the program running on the server before going online. Due to the fact that the website has the requirement of version iteration, in the iteration process, a step from code to program running is performed for multiple times, and the website is abnormally operated due to the fact that an abnormality occurs in the step.
In the related art, manual deployment is required in the process of performing version iteration of a website, for example, logging in a deployment platform, manually clicking or filling in a specific parameter on the platform, and triggering release of the website. Because each operation in the deployment process needs manual operation, the situation that the normal operation of the website is affected due to inaccurate operation is easy to occur, and a large amount of time and labor are wasted due to manual deployment.
Aiming at the problems that manual deployment is needed when version iteration of an application program is carried out in the related technology, manpower is wasted, and abnormal program operation is easily caused, an effective solution is not provided at present.
Disclosure of Invention
The application provides a code deployment method, a code deployment device, a storage medium and electronic equipment, and aims to solve the problems that manual deployment is needed when version iteration of an application program is carried out in the related art, manpower is wasted, and program operation abnormity is easily caused.
According to one aspect of the present application, a method for deploying code is provided. The method comprises the following steps: the deployment platform receives a deployment request sent by the code warehouse, wherein the deployment request is used for requesting to deploy a client code of an application program with a preset version in the code warehouse, and the deployment request comprises version information of the application program with the preset version; the deployment platform analyzes whether the deployment request meets the deployment requirement; and under the condition that the deployment request meets the deployment requirement, deploying the client codes to obtain the application program of the preset version.
Optionally, the analyzing, by the deployment platform, whether the deployment request satisfies the deployment requirement includes: judging whether the version of the application program corresponding to the client code is the version which is supported to be deployed by the deployment platform; and determining that the deployment request meets the deployment requirement under the condition that the version of the application program corresponding to the client code is the version which is supported by the deployment platform to be deployed.
Optionally, in a case that the deployment request meets the deployment requirement, deploying the client code to obtain the application program of the preset version includes: activating a target deployment task on a deployment platform under the condition that a deployment request meets a deployment requirement; and the target deployment task pulls the client codes in the code warehouse to the deployment platform according to the pre-configured scripts, and deploys the client codes to obtain the application program with the preset version.
Optionally, the deploying the client code by the target deployment task to obtain the application program of the preset version includes: acquiring release configuration information through a file path name of a release file in a client code; and executing an operation task for deploying the client code based on the release configuration information to obtain the application program of the preset version, wherein the operation task at least comprises packaging and compiling.
Optionally, after obtaining the preset version of the application program, the method further includes: and sending the application program with the preset version to a target server, and releasing the application program with the preset version by using the target server.
Optionally, the method further comprises: under the condition that the client code deployment fails, re-executing the operation task of the client code deployment; and under the condition that the failure times of executing the operation task exceed the preset times, sending a message of failed deployment to the target object.
Optionally, in a case that the deployment request meets the deployment requirement, deploying the client code, and after obtaining the application program of the preset version, the method further includes: and sending the message of successful deployment to the target object.
According to another aspect of the present application, there is provided a deployment apparatus of code. The device includes:
the deployment platform comprises a receiving unit, a deployment unit and a processing unit, wherein the receiving unit is used for receiving a deployment request sent by the code warehouse through the deployment platform, the deployment request is used for requesting to deploy a client code of an application program with a preset version in the code warehouse, and the deployment request comprises version information of the application program with the preset version; the analysis unit is used for analyzing whether the deployment request meets the deployment requirement through the deployment platform; and the deployment unit is used for deploying the client codes to obtain the application program with the preset version under the condition that the deployment request meets the deployment requirement.
In order to achieve the above object, according to another aspect of the present application, there is provided a storage medium including a stored program, wherein the program performs any one of the above-described deployment methods of codes.
In order to achieve the above object, according to another aspect of the present application, there is provided an electronic device including at least one processor, and at least one memory connected with the processor, a bus; the processor and the memory complete mutual communication through a bus; the processor is configured to call program instructions in the memory to perform any one of the above-described deployment methods of code.
Through the application, the following steps are adopted: the deployment platform receives a deployment request sent by the code warehouse, wherein the deployment request is used for requesting to deploy a client code of an application program with a preset version in the code warehouse, and the deployment request comprises version information of the application program with the preset version; the deployment platform analyzes whether the deployment request meets the deployment requirement; under the condition that the deployment request meets the deployment requirement, the client codes are deployed to obtain the application program with the preset version, and the problems that manual deployment is needed when the version of the application program is iterated in the related art, manpower is wasted, and program operation is abnormal easily are solved. By automatically deploying the client codes under the condition of the newly added client codes, the application program of the preset version is obtained, and the effects of improving the efficiency and enhancing the running stability of the program during the version iteration of the application program are further achieved.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this application, illustrate embodiments of the application and, together with the description, serve to explain the application and are not intended to limit the application. In the drawings:
FIG. 1 is a flow chart of a method for deploying code provided according to an embodiment of the present application;
FIG. 2 is a flow chart of an alternative method of deploying code provided in accordance with an embodiment of the present application;
FIG. 3 is a schematic diagram of a data analysis apparatus provided in accordance with an embodiment of the present application; and
fig. 4 is a schematic diagram of an electronic device provided according to an embodiment of the application.
Detailed Description
It should be noted that the embodiments and features of the embodiments in the present application may be combined with each other without conflict. The present application will be described in detail below with reference to the embodiments with reference to the attached drawings.
In order to make the technical solutions better understood by those skilled in the art, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only partial embodiments of the present application, but not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
It should be noted that the terms "first," "second," and the like in the description and claims of this application and in the drawings described above are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It should be understood that the data so used may be interchanged under appropriate circumstances such that embodiments of the application described herein may be used. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
According to an embodiment of the application, a method for deploying code is provided.
Fig. 1 is a flowchart of a deployment method of code according to an embodiment of the present application. As shown in fig. 1, the method comprises the steps of:
step S101, a deployment platform receives a deployment request sent by a code warehouse, wherein the deployment request is used for requesting to deploy a client code of an application program with a preset version in the code warehouse, and the deployment request comprises version information of the application program with the preset version.
For example, the code repository may be a gitlab for managing and storing code at a remote server in a multi-person collaboration scenario; the deployment platform can be a jenkins platform and is used for executing deployment tasks through configured scripts.
Specifically, when the application program is updated, a programmer writes a source code including a release file, and the release file may be a jenkins file that can be read by a jenkins platform, and includes task configuration information such as packaging, compiling, and sending a compiled code.
After the source code is written, a programmer pushes the source code to the gitlab, after the gitlab receives the newly added source code, the gitlab trigger function configured on the gitlab sends an http request to inform a jenkins platform of code deployment, and specifically, the http request carries branch information, namely, version information of an application program of a preset version.
Step S102, the deployment platform analyzes whether the deployment request meets the deployment requirement.
Optionally, in the code deployment method provided in the embodiment of the present application, the analyzing, by the deployment platform, whether the deployment request meets the deployment requirement includes: judging whether the version of the application program corresponding to the client code is the version which is supported to be deployed by the deployment platform; and determining that the deployment request meets the deployment requirement under the condition that the version of the application program corresponding to the client code is the version which is supported by the deployment platform to be deployed.
It should be noted that the deployment platform only supports deployment of branch codes of a configured script file, taking a code warehouse as gitlab, taking the deployment platform as Jenkins platform as an example, the newly added codes in gitlab have corresponding versions, after receiving a request sent by gitlab trigger, the Jenkins platform judges whether the branches needing deployment change according to branch information, that is, whether the branches supporting deployment for the Jenkins platform change, if not, it indicates that the Jenkins platform cannot support deployment of codes of application programs of the version, and if so, the deployment is performed.
And step S103, deploying the client codes to obtain the application program with the preset version under the condition that the deployment request meets the deployment requirement.
Specifically, the deployment platform acquires a client code to be deployed, acquires a corresponding application program after deployment is completed, and publishes the application program through the publishing platform.
According to the code deployment method provided by the embodiment of the application, a deployment request sent by a code warehouse is received through a deployment platform, wherein the deployment request is used for requesting to deploy a client code of an application program with a preset version in the code warehouse, and the deployment request comprises version information of the application program with the preset version; the deployment platform analyzes whether the deployment request meets the deployment requirement; under the condition that the deployment request meets the deployment requirement, the client codes are deployed to obtain the application program with the preset version, and the problems that manual deployment is needed when the version of the application program is iterated in the related art, manpower is wasted, and program operation is abnormal easily are solved. By automatically deploying the client codes under the condition of the newly added client codes, the application program of the preset version is obtained, and the effects of improving the efficiency and enhancing the running stability of the program during the version iteration of the application program are further achieved.
Optionally, in the code deployment method provided in the embodiment of the present application, in a case that the deployment request meets the deployment requirement, deploying the client code to obtain the application program of the preset version includes: activating a target deployment task on a deployment platform under the condition that a deployment request meets a deployment requirement; and the target deployment task pulls the client codes in the code warehouse to the deployment platform according to the pre-configured scripts, and deploys the client codes to obtain the application program with the preset version.
Specifically, taking a code warehouse as gitlab and a deployment platform as Jenkins platform as an example, when a branch to be deployed is changed, a task corresponding to the branch on the Jenkins platform is activated, and according to a pre-configured script, a specified branch code on the gitlab is pulled to the Jenkins platform by using a code management tool git and is deployed to obtain an application program of a version corresponding to the branch code.
Optionally, in the code deployment method provided in the embodiment of the present application, the deploying the client code by the target deployment task to obtain the application program of the preset version includes: acquiring release configuration information through a file path name of a release file in a client code; and executing an operation task for deploying the client code based on the release configuration information to obtain the application program of the preset version, wherein the operation task at least comprises packaging and compiling.
Specifically, taking a code warehouse as a gitlab and a deployment platform as a jenkins platform as an example, since the release file contains release configuration information, a specific release task, that is, a task of deploying a code, can be determined by the release configuration information, the jenkins file in the code is read according to a configured file path name (/ jenkins file), and then the release task is executed according to the content in the jenkins file, so as to obtain an application program, which specifically can be a packaging and compiling task.
Optionally, in the deployment method of code provided in the embodiment of the present application, after obtaining the application program in the preset version, the method further includes: and sending the application program with the preset version to a target server, and releasing the application program with the preset version by using the target server.
Specifically, the packaged and compiled code may be sent to the target server by using the file transfer command scp, and then the issuing test is performed on the target server, and the application program is issued if the test is successful.
Optionally, in the method for deploying code provided in the embodiment of the present application, to avoid that the deployment process is affected by the accidental exception during deployment, the method further includes: under the condition that the client code deployment fails, re-executing the operation task of the client code deployment; and under the condition that the failure times of executing the operation task exceed the preset times, sending a message of failed deployment to the target object.
It should be noted that, in the case of an error in a source code of a client, or in the case of an exception in the process of executing deployment, for example, in the case of failure in acquiring a published file and error in packaging and compiling a code, failure in deploying the client code may be caused, and since some deployment exceptions are sporadic, operations may be re-executed when an operation task loss for executing the deployment client code is less than a preset number of times, for example, the preset number of times may be 3 times, and in the case of failure in re-executing 3 times, it is described that the probability of an error in the client code is large, and a message that the deployment fails is sent to a target object, specifically, the target object may be a writer for the source code, and a message may be sent by triggering a mail.
In order to enable the target object to know the code deployment condition in time, optionally, in a case that the deployment request meets the deployment requirement, deploying the client code, and after obtaining the application program of the preset version, the method further includes: and sending the message of successful deployment to the target object.
It should be noted that, besides the deployment failure notification code writer, a message is also sent to notify the code writer when the deployment is successful, and specifically, the deployment platform may be used to trigger the email to notify the code writer.
According to an embodiment of the application, an alternative code deployment method is provided.
Fig. 2 is a flowchart of an alternative code deployment method according to an embodiment of the present application.
As shown in fig. 2, a code writer writes a client code with a release configuration file (jenkinsfile), and sends the code to a code repository gitlab, and a gitlab trigger function on the gitlab sends an http request with branch information to a jenkins platform to request deployment of the client code. It should be noted that, because the Jenkins platform only supports deployment of part of branch codes, the Jenkins platform determines whether a branch needs to be deployed according to code branch information in a request sent by the gitlab trigger, and if not, ends the process, and if so, executes deployment.
Specifically, the process of executing deployment is: activating a specific task on a Jenkins platform, pulling a specified branch code on a gitlab to the Jenkins platform by using a code management tool git according to a pre-configured script, reading a Jenkins file in a code according to a configured file path name (./Jenkins file), executing a release task according to configuration information in the Jenkins file, such as a package, compilation and other release tasks, sending the compiled code to a destination server by using a file transmission command scp.
It should be noted that the steps illustrated in the flowcharts of the figures may be performed in a computer system such as a set of computer-executable instructions and that, although a logical order is illustrated in the flowcharts, in some cases, the steps illustrated or described may be performed in an order different than presented herein.
The embodiment of the present application further provides a device for deploying a code, and it should be noted that the device for deploying a code of the embodiment of the present application may be used to execute the method for deploying a code provided in the embodiment of the present application. The following describes a deployment apparatus of code provided in an embodiment of the present application.
Fig. 3 is a schematic diagram of a deployment apparatus for code according to an embodiment of the present application. As shown in fig. 3, the apparatus includes: a receiving unit 10, an analyzing unit 20 and a deployment unit 30.
Specifically, the receiving unit 10 is configured to receive, by the deployment platform, a deployment request sent by the code repository, where the deployment request is used to request to deploy a client code of an application program in a preset version in the code repository, and the deployment request includes version information of the application program in the preset version.
And the analysis unit 20 is configured to analyze whether the deployment request meets the deployment requirement through the deployment platform.
The deployment unit 30 is configured to deploy the client code to obtain the application program of the preset version under the condition that the deployment request meets the deployment requirement.
The code deployment device provided in the embodiment of the application is configured to receive, by using the receiving unit 10, a deployment request sent by a code repository through a deployment platform, where the deployment request is used to request to deploy a client code of an application program of a preset version in the code repository, and the deployment request includes version information of the application program of the preset version; an analysis unit 20, configured to analyze whether the deployment request meets the deployment requirement through the deployment platform; the deployment unit 30 is configured to deploy the client code to obtain the application program of the preset version under the condition that the deployment request meets the deployment requirement, so that the problems that manual deployment is needed when the version of the application program is iterated in the related art, manpower is wasted, and program operation is easily abnormal are solved.
Optionally, in the deployment apparatus of code provided in the embodiment of the present application, the analysis unit 20 includes: the judging module is used for judging whether the version of the application program corresponding to the client code is the version which is supported by the deployment platform to be deployed or not; and the determining module is used for determining that the deployment request meets the deployment requirement under the condition that the version of the application program corresponding to the client code is the version which is supported by the deployment platform to be deployed.
Optionally, in the deployment apparatus of code provided in the embodiment of the present application, the deployment unit 30 includes: the activation module is used for activating a target deployment task on the deployment platform under the condition that the deployment request meets the deployment requirement; and the deployment module is used for pulling the client codes in the code warehouse to the deployment platform through the target deployment task according to the pre-configured scripts and deploying the client codes to obtain the application programs with the preset versions.
Optionally, in the deployment apparatus for code provided in the embodiment of the present application, the deployment module includes: the acquisition submodule is used for acquiring the release configuration information through the file path name of the release file in the client code; and the execution submodule is used for executing an operation task for deploying the client code based on the release configuration information to obtain the application program with the preset version, wherein the operation task at least comprises packaging and compiling.
Optionally, in the deployment apparatus of code provided in the embodiment of the present application, the apparatus further includes: and the release unit is used for sending the application program with the preset version to the target server and releasing the application program with the preset version by using the target server.
Optionally, in the deployment apparatus of code provided in the embodiment of the present application, the apparatus further includes: the re-execution unit is used for re-executing the operation task of deploying the client code under the condition that the client code fails to be deployed; and the first sending unit is used for sending the message of failed deployment to the target object under the condition that the number of times of failure in executing the operation task exceeds the preset number of times.
Optionally, in the deployment apparatus of code provided in the embodiment of the present application, the apparatus further includes: and the second sending unit is used for deploying the client codes under the condition that the deployment request meets the deployment requirement, and sending the message of successful deployment to the target object after the application program of the preset version is obtained.
The code deploying device comprises a processor and a memory, wherein the receiving unit 10, the analyzing unit 20, the deploying unit 30 and the like are stored in the memory as program units, and the processor executes the program units stored in the memory to realize corresponding functions.
The processor comprises a kernel, and the kernel calls the corresponding program unit from the memory. The kernel can be set to be one or more than one, and the problems that manual deployment is needed when version iteration of the application program is carried out in the related technology, manpower is wasted, and program operation abnormity is easily caused are solved by adjusting kernel parameters.
An embodiment of the present invention provides a storage medium on which a program is stored, and the program implements a deployment method of the code when executed by a processor.
An embodiment of the present invention provides an electronic device, as shown in fig. 4, the device includes at least one processor, and at least one memory and a bus connected to the processor; the processor and the memory complete mutual communication through a bus; the processor is used for calling the program instructions in the memory to execute the deployment method of the codes. The device herein may be a server, a PC, a PAD, a mobile phone, etc.
The present application further provides a computer program product adapted to perform a program for initializing the following method steps when executed on a data processing device: the deployment platform receives a deployment request sent by the code warehouse, wherein the deployment request is used for requesting to deploy a client code of an application program with a preset version in the code warehouse, and the deployment request comprises version information of the application program with the preset version; the deployment platform analyzes whether the deployment request meets the deployment requirement; and under the condition that the deployment request meets the deployment requirement, deploying the client codes to obtain the application program of the preset version.
The analysis of the deployment platform whether the deployment request meets the deployment requirement includes: judging whether the version of the application program corresponding to the client code is the version which is supported to be deployed by the deployment platform; and determining that the deployment request meets the deployment requirement under the condition that the version of the application program corresponding to the client code is the version which is supported by the deployment platform to be deployed.
Under the condition that the deployment request meets the deployment requirement, deploying the client code to obtain the application program with the preset version comprises the following steps: activating a target deployment task on a deployment platform under the condition that a deployment request meets a deployment requirement; and the target deployment task pulls the client codes in the code warehouse to the deployment platform according to the pre-configured scripts, and deploys the client codes to obtain the application program with the preset version.
The target deployment task deploys the client code, and the obtaining of the application program of the preset version comprises the following steps: acquiring release configuration information through a file path name of a release file in a client code; and executing an operation task for deploying the client code based on the release configuration information to obtain the application program of the preset version, wherein the operation task at least comprises packaging and compiling.
After obtaining the preset version of the application program, the method further comprises: and sending the application program with the preset version to a target server, and releasing the application program with the preset version by using the target server.
The method further comprises the following steps: under the condition that the client code deployment fails, re-executing the operation task of the client code deployment; and under the condition that the failure times of executing the operation tasks of deploying the client codes exceed the preset times, sending a message of failed deployment to the target object.
After the deployed client code is sent to the target server to obtain the application program of the preset version, the method further includes: and sending the message of successful deployment to the target object.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
In a typical configuration, a device includes one or more processors (CPUs), memory, and a bus. The device may also include input/output interfaces, network interfaces, and the like.
The memory may include volatile memory in a computer readable medium, Random Access Memory (RAM) and/or nonvolatile memory such as Read Only Memory (ROM) or flash memory (flash RAM), and the memory includes at least one memory chip. The memory is an example of a computer-readable medium.
Computer-readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), Read Only Memory (ROM), Electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), Digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information that can be accessed by a computing device. As defined herein, a computer readable medium does not include a transitory computer readable medium such as a modulated data signal and a carrier wave.
It should also be noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in the process, method, article, or apparatus that comprises the element.
As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The above are merely examples of the present application and are not intended to limit the present application. Various modifications and changes may occur to those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the scope of the claims of the present application.

Claims (10)

1. A method for deploying code, comprising:
a deployment platform receives a deployment request sent by a code warehouse, wherein the deployment request is used for requesting to deploy a client code of an application program of a preset version in the code warehouse, and the deployment request comprises version information of the application program of the preset version;
the deployment platform analyzes whether the deployment request meets deployment requirements;
and under the condition that the deployment request meets the deployment requirement, deploying the client code to obtain the application program of the preset version.
2. The method of claim 1, wherein the deployment platform analyzing whether the deployment request satisfies deployment requirements comprises:
judging whether the version of the application program corresponding to the client code is the version which is supported to be deployed by the deployment platform;
and determining that the deployment request meets the deployment requirement under the condition that the version of the application program corresponding to the client code is the version which is supported by the deployment platform to be deployed.
3. The method of claim 1, wherein deploying the client code in a case that the deployment request satisfies a deployment requirement, and obtaining the preset version of the application program comprises:
activating a target deployment task on the deployment platform if the deployment request meets a deployment requirement;
and the target deployment task pulls the client codes in the code warehouse to the deployment platform according to a pre-configured script, and deploys the client codes to obtain the application programs with the preset versions.
4. The method of claim 3, wherein the target deployment task deploys the client code, and obtaining the preset version of the application program comprises:
acquiring release configuration information through a file path name of a release file in the client code;
and executing an operation task for deploying the client code based on the release configuration information to obtain the application program of the preset version, wherein the operation task at least comprises packaging and compiling.
5. The method of claim 1, wherein after obtaining the preset version of the application, the method further comprises:
and sending the application program of the preset version to a target server, and releasing the application program of the preset version by using the target server.
6. The method of claim 4, further comprising:
in the case of failure in deploying the client code, re-executing the operation task for deploying the client code;
and under the condition that the failure times of executing the operation task exceed the preset times, sending a message of failed deployment to the target object.
7. The method according to claim 1, wherein in a case that the deployment request satisfies a deployment requirement, deploying the client code to obtain the preset version of the application program, the method further comprises:
and sending the message of successful deployment to the target object.
8. An apparatus for deploying code, comprising:
a receiving unit, configured to receive, by a deployment platform, a deployment request sent by a code repository, where the deployment request is used to request to deploy a client code of an application program in a preset version in the code repository, and the deployment request includes version information of the application program in the preset version;
an analysis unit, configured to analyze, by the deployment platform, whether the deployment request meets a deployment requirement;
and the deployment unit is used for deploying the client code to obtain the application program of the preset version under the condition that the deployment request meets the deployment requirement.
9. A storage medium characterized by comprising a stored program, wherein the program executes the method of deploying code of any one of claims 1 to 7.
10. An electronic device comprising at least one processor, and at least one memory, bus connected to the processor; the processor and the memory complete mutual communication through the bus; the processor is configured to call program instructions in the memory to perform a method of deploying code according to any of claims 1 to 7.
CN201910945786.7A 2019-09-30 2019-09-30 Code deployment method and device, storage medium and electronic equipment Pending CN112579099A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910945786.7A CN112579099A (en) 2019-09-30 2019-09-30 Code deployment method and device, storage medium and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910945786.7A CN112579099A (en) 2019-09-30 2019-09-30 Code deployment method and device, storage medium and electronic equipment

Publications (1)

Publication Number Publication Date
CN112579099A true CN112579099A (en) 2021-03-30

Family

ID=75117032

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910945786.7A Pending CN112579099A (en) 2019-09-30 2019-09-30 Code deployment method and device, storage medium and electronic equipment

Country Status (1)

Country Link
CN (1) CN112579099A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113590142A (en) * 2021-07-29 2021-11-02 智道网联科技(北京)有限公司 Vehicle-mounted environment deployment method and device and electronic equipment
CN115065595A (en) * 2022-08-17 2022-09-16 湖南云畅网络科技有限公司 Automatic release deployment method and system
CN115297096A (en) * 2022-06-28 2022-11-04 青岛海尔科技有限公司 Resource package deployment method and device, storage medium and electronic device

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106066808A (en) * 2016-05-30 2016-11-02 浪潮软件股份有限公司 A kind of ios application build server, cluster and method
US20170339221A1 (en) * 2016-05-20 2017-11-23 Sap Se Compatibility framework for cloud and on-premise application integration
CN107637042A (en) * 2015-05-19 2018-01-26 亚马逊科技公司 Self-defined communication channel for application deployment
CN108958927A (en) * 2018-05-31 2018-12-07 康键信息技术(深圳)有限公司 Dispositions method, device, computer equipment and the storage medium of container application
CN109117143A (en) * 2018-06-11 2019-01-01 阿里巴巴集团控股有限公司 A kind of application dispositions method and system
CN109240669A (en) * 2018-10-26 2019-01-18 苏州浪潮智能软件有限公司 A kind of integrated deployment software development model of automation
CN109408067A (en) * 2018-10-22 2019-03-01 浙江明度智控科技有限公司 A kind of data managing method and server based on monomer applications
CN109614109A (en) * 2018-11-16 2019-04-12 中国银行股份有限公司 Using dispositions method, device and system

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107637042A (en) * 2015-05-19 2018-01-26 亚马逊科技公司 Self-defined communication channel for application deployment
US20170339221A1 (en) * 2016-05-20 2017-11-23 Sap Se Compatibility framework for cloud and on-premise application integration
CN106066808A (en) * 2016-05-30 2016-11-02 浪潮软件股份有限公司 A kind of ios application build server, cluster and method
CN108958927A (en) * 2018-05-31 2018-12-07 康键信息技术(深圳)有限公司 Dispositions method, device, computer equipment and the storage medium of container application
CN109117143A (en) * 2018-06-11 2019-01-01 阿里巴巴集团控股有限公司 A kind of application dispositions method and system
CN109408067A (en) * 2018-10-22 2019-03-01 浙江明度智控科技有限公司 A kind of data managing method and server based on monomer applications
CN109240669A (en) * 2018-10-26 2019-01-18 苏州浪潮智能软件有限公司 A kind of integrated deployment software development model of automation
CN109614109A (en) * 2018-11-16 2019-04-12 中国银行股份有限公司 Using dispositions method, device and system

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113590142A (en) * 2021-07-29 2021-11-02 智道网联科技(北京)有限公司 Vehicle-mounted environment deployment method and device and electronic equipment
CN115297096A (en) * 2022-06-28 2022-11-04 青岛海尔科技有限公司 Resource package deployment method and device, storage medium and electronic device
CN115065595A (en) * 2022-08-17 2022-09-16 湖南云畅网络科技有限公司 Automatic release deployment method and system

Similar Documents

Publication Publication Date Title
CN110532189B (en) Continuous integration system, method and device
CN110187914B (en) Application development method, system and device
KR102354536B1 (en) Hyperledger fabric network creation method, controller and storage medium
US10430172B2 (en) Re-configuration in cloud computing environments
CN112579099A (en) Code deployment method and device, storage medium and electronic equipment
CN111324522A (en) Automatic test system and method
US11113050B2 (en) Application architecture generation
CN108965375B (en) Service call proxy control system, method, server and readable storage medium
CN108733589B (en) Method and device for realizing distributed transaction hot deployment
EP3447635A1 (en) Application architecture generation
CN113687858A (en) Configuration file checking method and device, electronic equipment and storage medium
CN111651169B (en) Block chain intelligent contract operation method and system based on web container
CN109614159B (en) Method and device for distributing and importing planning tasks
CN115904959A (en) Software integration and deployment method and software development management system
CN113064630A (en) Mobile terminal APP automatic packaging method and system, electronic device and storage medium
CN115220863A (en) Operation and maintenance method and device for container application, computer equipment and storage medium
CN111367796B (en) Application program debugging method and device
CN115525545A (en) Docker-based automatic testing method, system, equipment and medium
CN114581241A (en) Intelligent contract processing method and device, processor and electronic equipment
CN112241286A (en) Resource package configuration method and device and storage medium
CN114791884A (en) Test environment construction method and device, storage medium and electronic equipment
CN112579145A (en) Application deployment method and device
CN111913720A (en) Program deployment method and device
CN116360819A (en) Financial service deployment method and device, processor and electronic equipment
CN109508195B (en) Installation method and device of test installation package

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