CN115061697A - Code deployment method and device, computer equipment and storage medium - Google Patents

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

Info

Publication number
CN115061697A
CN115061697A CN202210762950.2A CN202210762950A CN115061697A CN 115061697 A CN115061697 A CN 115061697A CN 202210762950 A CN202210762950 A CN 202210762950A CN 115061697 A CN115061697 A CN 115061697A
Authority
CN
China
Prior art keywords
code
target
test
deployment
matching
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
CN202210762950.2A
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.)
Douyin Vision Beijing Co Ltd
Original Assignee
Douyin Vision Beijing 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 Douyin Vision Beijing Co Ltd filed Critical Douyin Vision Beijing Co Ltd
Priority to CN202210762950.2A priority Critical patent/CN115061697A/en
Publication of CN115061697A publication Critical patent/CN115061697A/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
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3692Test management for test results analysis
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/50Monitoring users, programs or devices to maintain the integrity of platforms, e.g. of processors, firmware or operating systems
    • G06F21/57Certifying or maintaining trusted computer platforms, e.g. secure boots or power-downs, version controls, system software checks, secure updates or assessing vulnerabilities
    • G06F21/577Assessing vulnerabilities and evaluating computer system security
    • 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)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • Computer Hardware Design (AREA)
  • Computer Security & Cryptography (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computing Systems (AREA)
  • Quality & Reliability (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The disclosure provides a code deployment method, a code deployment device, a computer device and a storage medium, wherein the method comprises the following steps: responding to a code deployment instruction, acquiring a target code corresponding to target deployment version information carried by the code deployment instruction, and acquiring test codes of various historical versions which have been tested in a code test environment; matching the target code with each test code respectively to determine a matching result; and deploying the target code based on the matching result.

Description

Code deployment method and device, computer equipment and storage medium
Technical Field
The present disclosure relates to the field of computer technologies, and in particular, to a code deployment method and apparatus, a computer device, and a storage medium.
Background
With the rapid development of internet technology and the prevalence of internet products, people increasingly use internet products such as websites, APPs, H5, public numbers, applets and the like on each terminal to assist people in working and living, and the iteration of the internet products is more and more frequent.
In the related art, a code with a code bug may cause problems of data abnormal processing, software flash fallback and the like after being deployed, so to avoid the problems, the code is often required to be tested before the code is deployed to test whether the code of a version to be deployed has a bug, and then the code passing the test is deployed. However, since code update may be frequent, how to determine whether code has been tested before deployment becomes an urgent problem to be solved in the field.
Disclosure of Invention
The embodiment of the disclosure at least provides a code deployment method, a code deployment device, computer equipment and a storage medium.
In a first aspect, an embodiment of the present disclosure provides a code deployment method, including:
responding to a code deployment instruction, acquiring a target code corresponding to target deployment version information carried by the code deployment instruction, and acquiring test codes of various historical versions which have been tested in a code test environment;
matching the target code with each test code respectively to determine a matching result;
and deploying the target code based on the matching result.
In a possible embodiment, the matching the target code with each test code respectively includes:
and calling a preset code comparison interface to compare the target code with each test code, and determining whether the target test code same as the target code exists in each test code.
In a possible embodiment, the matching the target code with each test code respectively includes:
and comparing the target code with each test code based on a preset code comparison instruction, and determining whether the target test code identical to the target code exists in each test code.
In a possible embodiment, the deploying the object code based on the matching result includes:
determining that the target code passes the test and deploying the target code under the condition that the matching result is that the matching is passed;
and indicating to test the target code when the matching result is that the matching is not passed.
In a possible embodiment, before matching the target code with each test code, the method further includes:
determining whether the historical version deployment information of each tested historical version contains the target deployment version information;
and if not, respectively matching the target code with each test code, and determining a matching result.
In a second aspect, an embodiment of the present disclosure further provides a code deployment apparatus, including:
the acquisition module is used for responding to a code deployment instruction, acquiring a target code corresponding to target deployment version information carried by the code deployment instruction, and acquiring test codes of various historical versions which have been tested in a code test environment;
the determining module is used for respectively matching the target codes with the test codes and determining a matching result;
and the deployment module is used for deploying the target code based on the matching result.
In one possible implementation, the determining module, when matching the target code with each test code, is configured to:
and calling a preset code comparison interface to compare the target code with each test code, and determining whether the target test code same as the target code exists in each test code.
In a possible implementation, the determining module, when matching the target code with each test code, is configured to:
and comparing the target code with each test code based on a preset code comparison instruction, and determining whether the target test code identical to the target code exists in each test code.
In a possible implementation, the deployment module, when deploying the object code based on the matching result, is configured to:
determining that the target code passes the test and deploying the target code under the condition that the matching result is that the matching is passed;
and indicating to test the target code when the matching result is that the matching is not passed.
In a possible implementation manner, if not, the determining module is further configured to match the target code with each test code, and before determining a matching result, the determining module is further configured to:
determining whether the historical version deployment information of each tested historical version contains the target deployment version information;
and if not, respectively matching the target code with each test code, and determining a matching result.
In a third aspect, an embodiment of the present disclosure further provides a computer device, including: a processor, a memory and a bus, the memory storing machine-readable instructions executable by the processor, the processor and the memory communicating via the bus when the computer device is running, the machine-readable instructions when executed by the processor performing the steps of the first aspect described above, or any possible implementation of the first aspect.
In a fourth aspect, this disclosed embodiment also provides a computer-readable storage medium, on which a computer program is stored, where the computer program is executed by a processor to perform the steps in the first aspect or any one of the possible implementation manners of the first aspect.
The code deployment method, the code deployment device, the computer device and the storage medium provided by the embodiment of the disclosure can respond to a code deployment instruction, match a target code corresponding to target deployment version information carried by the code deployment instruction with test codes of various historical versions which have been tested in a code test environment, so as to determine a matching result in a code level, and deploy the target code according to the matching result. Therefore, the target code to be deployed and the tested code are matched on the code level, and compared with the mode that only the version information of the target code and the version information of the tested code are used for matching, whether the target code is tested or not can be accurately determined, so that misjudgment on whether the code is tested or not can be reduced, and developers can be helped to quickly locate the untested code.
In order to make the aforementioned objects, features and advantages of the present disclosure more comprehensible, preferred embodiments accompanied with figures are described in detail below.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present disclosure, the drawings required for use in the embodiments will be briefly described below, and the drawings herein incorporated in and forming a part of the specification illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the technical solutions of the present disclosure. It is appreciated that the following drawings depict only certain embodiments of the disclosure and are therefore not to be considered limiting of its scope, for those skilled in the art will be able to derive additional related drawings therefrom without the benefit of the inventive faculty.
FIG. 1 is a flow chart illustrating a method for deploying code provided by an embodiment of the present disclosure;
FIG. 2 is a schematic diagram illustrating an architecture of a code deployment apparatus provided by an embodiment of the present disclosure;
fig. 3 shows a schematic structural diagram of a computer device provided by an embodiment of the present disclosure.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present disclosure more clear, the technical solutions of the embodiments of the present disclosure will be described clearly and completely with reference to the drawings in the embodiments of the present disclosure, and it is obvious that the described embodiments are only a part of the embodiments of the present disclosure, not all of the embodiments. The components of the embodiments of the present disclosure, generally described and illustrated in the figures herein, can be arranged and designed in a wide variety of different configurations. Thus, the following detailed description of the embodiments of the present disclosure, presented in the figures, is not intended to limit the scope of the claimed disclosure, but is merely representative of selected embodiments of the disclosure. All other embodiments, which can be derived by a person skilled in the art from the embodiments of the disclosure without making creative efforts, shall fall within the protection scope of the disclosure.
It should be noted that: like reference numbers and letters refer to like items in the following figures, and thus, once an item is defined in one figure, it need not be further defined and explained in subsequent figures.
The term "and/or" herein merely describes an associative relationship, meaning that three relationships may exist, e.g., a and/or B, may mean: a exists alone, A and B exist simultaneously, and B exists alone. In addition, the term "at least one" herein means any one of a plurality or any combination of at least two of a plurality, for example, including at least one of A, B, C, and may mean including any one or more elements selected from the group consisting of A, B and C.
It is understood that before the technical solutions disclosed in the embodiments of the present disclosure are used, the type, the use range, the use scene, etc. of the personal information related to the present disclosure should be informed to the user and obtain the authorization of the user through a proper manner according to the relevant laws and regulations.
For example, in response to receiving an active request from a user, a prompt message is sent to the user to explicitly prompt the user that the requested operation to be performed would require the acquisition and use of personal information to the user. Thus, the user can autonomously select whether to provide personal information to software or hardware such as an electronic device, an application program, a server, or a storage medium that performs the operations of the technical solution of the present disclosure, according to the prompt information.
Research shows that the problems that data cannot be normally processed and software is flashed off can be caused after a code with a code bug is deployed, so that the code is often required to be tested before the code is deployed to test whether the code of a version to be deployed has the bug and then the code passing the test is deployed to avoid the problems. However, since code update may be frequent, how to determine whether code has been tested before deployment becomes an urgent problem to be solved in the field.
In the related art, before code deployment, the code often needs to be tested to test whether a bug exists in the code of a version to be deployed, and the code that passes the test can be deployed. In practical application, due to the fact that development progress of different code branches is different and the like, a tested code may not be deployed immediately, in order to record version information of a code of a current version, submitted version identifiers commit id can be used for recording the version information of the code, and therefore before the code is deployed, whether the commit id corresponding to a target code of the current deployment version is matched with the commit id of each tested historical version code or not can be judged, and whether the current target code is tested or not can be determined.
However, in practical applications, codes corresponding to different commit ids may be the same, and therefore, matching is performed only through the commit ids, and a tested code may be determined to be a code that needs to be tested, so that misjudgment on whether the code is tested or not may be caused, and code development efficiency of developers may be affected.
For example, taking a version management system used in code development as a distributed version management system Git as an example, the Git system may implement operations such as writing, submitting, pushing (also called deploying) and the like on a code, when it is detected that the code is submitted, a submitted version identifier commit id corresponding to the current submitting operation may be generated, and the code submitted in the current submitting operation may be acquired according to the commit id corresponding to the current submitting operation.
In particular, the following may result in the codes corresponding to different commit ids being the same:
case 1, null commit operation
Here, the null commit operation "git commit- -allow-empty-m < message >" may produce 1 new commit id without code change.
Case 2, Merge code operation
Here, the merge code operation "gitmerge- -no-ff-m < message > < source-branch >" may produce 1 new commit id when merging target branch code, but the merged code may not differ from the code before merging.
Case 3, compressed code operation
Here, the compression code operation "gitmerge- -square < anchor-branch >" may perform a compression operation on the target branch code, but the compressed code may not be different from the code before compression.
Based on the above research, the present disclosure provides a code deployment method, apparatus, computer device, and storage medium, which may match, in response to a code deployment instruction, a target code corresponding to target deployment version information carried by the code deployment instruction with test codes of respective historical versions that have been tested in a code test environment, thereby determining a matching result at a code level, and deploying the target code according to the matching result. Therefore, by matching the target code to be deployed and the tested code on the code level, compared with the method of matching only by using the version information of the target code and the test code, whether the target code is tested or not can be determined more accurately, and developers can be helped to quickly locate untested codes.
To facilitate understanding of the present embodiment, first, a code deployment method disclosed in the embodiments of the present disclosure is described in detail, where an execution subject of the code deployment method provided in the embodiments of the present disclosure is generally a computer device with certain computing capability, and the computer device includes, for example: a terminal device, which may be a User Equipment (UE), a mobile device, a User terminal, a Personal Digital Assistant (PDA), a handheld device, a computing device, a vehicle-mounted device, a wearable device, or a server or other processing device. In some possible implementations, the code deployment method may be implemented by a processor calling computer readable instructions stored in a memory.
Referring to fig. 1, a flowchart of a code deployment method provided in the embodiment of the present disclosure is shown, where the method includes S101 to S103, where:
s101: responding to a code deployment instruction, acquiring a target code corresponding to target deployment version information carried by the code deployment instruction, and acquiring test codes of various historical versions which have been tested in a code test environment.
S102: and matching the target code with each test code respectively to determine a matching result.
S103: and deploying the target code based on the matching result.
The following is a detailed description of the above steps.
For S101, the code deployment instruction may be generated after the target code development platform responds to the code deployment operation of the user, and the target code development platform may be a development platform including a version management system Git system, and may implement operations such as writing, submitting, and deploying a code; the code testing environment may be used to test code deployed in the code testing environment to determine whether a code vulnerability exists in the test code.
Specifically, when executing code deployment operation, a code deployment instruction can be generated through a DevOps pipeline, so as to implement a subsequent code automation deployment process according to the DevOps pipeline;
when acquiring a target code corresponding to target deployment version information carried by the code deployment instruction, acquiring the target code corresponding to the target deployment version information from the DevOps pipeline according to the target deployment version information;
when the test codes of the historical versions which have been tested in the code test environment are obtained, the test codes which have been tested can be obtained from a commit id list of the historical version information list in the code test environment and according to the commit ids contained in the commit id list.
S102: and matching the target code with each test code respectively to determine a matching result.
Here, the process of matching the target code with each test code is to determine whether there is a target test code identical to the target code in each test code.
Specifically, when the target code is respectively matched with each test code, any one of the following manners may be used:
mode A, calling a preset code comparison interface to compare the target code with each test code
Here, the preset code comparison interface may be, for example, a compare interface of a gitlab openapi, and when an interface parameter right parameter of the compare interface is true, the function of comparing the target code with each test code may be implemented.
Specifically, the target code is compared with each test code by calling a preset code comparison interface, so that whether the target test code same as the target code exists in each test code can be determined.
Mode B, comparing the target code with each test code based on a preset code comparison instruction
Here, the preset code comparison instruction may be, for example, a git diff instruction, and whether the target code and each test code are different or not may be determined by the git diff instruction.
Specifically, the target code is compared with each test code based on a preset code comparison instruction, and whether the target test code identical to the target code exists in each test code can be determined.
Mode C, comparing the target code with each test code based on a preset text comparison algorithm
Here, the preset text comparison algorithm may be, for example, an edit distance algorithm or the like.
Specifically, the target code is compared with each test code based on a preset text comparison algorithm, and whether the target test code identical to the target code exists in each test code can be determined.
In a possible implementation manner, before comparing the target code with each test code, it may be further determined whether the historical version deployment information of each tested historical version includes the target deployment version information, and if not, the target code is respectively matched with each test code, and a matching result is determined.
For example, taking the commit id corresponding to the historical version deployment information as 1-10 and the commit id corresponding to the target deployment version information as 11, the target code may be respectively matched with each test code according to any one of the above-mentioned modes a-C, so as to determine a matching result.
In addition, when determining whether the historical version deployment information of each tested historical version contains the target deployment version information, if the determination result is that the historical version deployment information contains the target deployment version information, it may be determined that the target code has been tested, and the target code may be directly deployed subsequently; if the determination result is that the historical version deployment information does not include the target deployment version information, the target codes can be matched with the test codes respectively according to the steps, and a matching result is determined.
S103: and deploying the target code based on the matching result.
Here, in deploying the object code, the object code whose matching result satisfies the requirement may be encoded and deployed based on the DevOps pipeline.
Specifically, when the target code is deployed based on the matching result, the following cases may be classified:
case 1, the matching result is matching pass
Specifically, when the matching result is that the matching is passed, the target code is determined to be tested, and the target code is deployed.
Case 2, the matching result is that the match fails
Specifically, when the matching result is that the matching fails, it is determined that the target code has not been tested, at this time, the deployment operation on the target code may be terminated, and test prompt information carrying the target deployment version information is generated to instruct to test the target code.
Further, when the matching result is that the matching fails, the target code may be deployed in a preset code test environment to realize automatic test of the target code, and a test result obtained after the target code is tested is generated.
Therefore, by executing the matching operation of the target code and the test code in the code deployment process, whether the target code to be deployed is tested before deployment can be determined, the target code can be intercepted under the condition that the target code is not tested, and abnormal conditions such as code loopholes and the like caused by the fact that the target code is not tested are avoided.
In the following, a code deployment method provided by the present disclosure will be introduced with reference to a specific embodiment, taking a pipeline used in code deployment as a DevOps pipeline as an example, and when code deployment is performed, the method may include the following steps:
step 1, responding to a target instruction, and determining a target code corresponding to target deployment version information to be deployed.
Here, the target instruction may be, for example, a merged code instruction, and the DevOps pipeline may be triggered to start an automatic code deployment process through the merged code instruction, that is, when the merged code instruction is detected, it may be determined that code deployment needs to be performed at this time, and the merged code is used as a target code to be deployed.
And 2, matching the target codes with the test codes respectively to determine a matching result.
And 3, deploying the target code based on the matching result.
Specifically, the content related to the step 2 and the step 3 may refer to the above related description, and is not repeated herein.
The code deployment method provided by the embodiment of the disclosure can respond to a code deployment instruction, match target codes corresponding to target deployment version information carried by the code deployment instruction with test codes of various historical versions which have been tested in a code test environment, so as to determine a matching result at a code level, and deploy the target codes according to the matching result. Therefore, by matching the target code to be deployed and the tested code on the code level, compared with the method of matching only by using the version information of the target code and the test code, whether the target code is tested or not can be determined more accurately, and developers can be helped to quickly locate untested codes.
It will be understood by those skilled in the art that in the method of the present invention, the order of writing the steps does not imply a strict order of execution and any limitations on the implementation, and the specific order of execution of the steps should be determined by their function and possible inherent logic.
Based on the same inventive concept, a code deployment apparatus corresponding to the code deployment method is also provided in the embodiments of the present disclosure, and since the principle of the apparatus in the embodiments of the present disclosure to solve the problem is similar to the code deployment method described above in the embodiments of the present disclosure, the implementation of the apparatus may refer to the implementation of the method, and repeated details are not described again.
Referring to fig. 2, there is shown an architecture diagram of a code deployment apparatus provided in an embodiment of the present disclosure, where the apparatus includes: an acquisition module 201, a determination module 202 and a deployment module 203; wherein the content of the first and second substances,
an obtaining module 201, configured to, in response to a code deployment instruction, obtain a target code corresponding to target deployment version information carried by the code deployment instruction, and obtain a test code of each historical version that has been tested in a code test environment;
a determining module 202, configured to match the target code with each test code, respectively, and determine a matching result;
a deployment module 203, configured to deploy the object code based on the matching result.
In a possible implementation manner, the determining module 202, when matching the target code with each test code, is configured to:
and calling a preset code comparison interface to compare the target code with each test code, and determining whether the target test code same as the target code exists in each test code.
In a possible implementation manner, the determining module 202, when matching the target code with each test code, is configured to:
and comparing the target code with each test code based on a preset code comparison instruction, and determining whether the target test code identical to the target code exists in each test code.
In a possible implementation, the deployment module 203, when deploying the object code based on the matching result, is configured to:
determining that the target code passes the test and deploying the target code under the condition that the matching result is that the matching is passed;
and indicating to test the target code when the matching result is that the matching is not passed.
In a possible implementation manner, the determining module 202, before matching the target code with each test code, is further configured to:
determining whether the historical version deployment information of each tested historical version contains the target deployment version information;
and if not, respectively matching the target code with each test code, and determining a matching result.
The code deployment device provided by the embodiment of the disclosure can respond to a code deployment instruction, and respectively match target codes corresponding to target deployment version information carried by the code deployment instruction with test codes of various historical versions which have been tested in a code test environment, so as to determine a matching result at a code level, and deploy the target codes according to the matching result. Therefore, by matching the target code to be deployed and the tested code on the code level, compared with the method of matching only by using the version information of the target code and the test code, whether the target code is tested or not can be determined more accurately, and developers can be helped to quickly locate untested codes.
The description of the processing flow of each module in the device and the interaction flow between the modules may refer to the related description in the above method embodiments, and will not be described in detail here.
Based on the same technical concept, the embodiment of the disclosure also provides computer equipment. Referring to fig. 3, a schematic structural diagram of a computer device 300 provided in the embodiment of the present disclosure includes a processor 301, a memory 302, and a bus 303. The memory 302 is used for storing execution instructions and includes a memory 3021 and an external memory 3022; the memory 3021 is also referred to as an internal memory, and is used for temporarily storing operation data in the processor 301 and data exchanged with an external memory 3022 such as a hard disk, the processor 301 exchanges data with the external memory 3022 through the memory 3021, and when the computer device 300 is operated, the processor 301 communicates with the memory 302 through the bus 303, so that the processor 301 executes the following instructions:
responding to a code deployment instruction, acquiring a target code corresponding to target deployment version information carried by the code deployment instruction, and acquiring test codes of various historical versions which have been tested in a code test environment;
matching the target code with each test code respectively to determine a matching result;
and deploying the target code based on the matching result.
In a possible implementation manner, the matching the target code with each test code in the instructions of the processor 301 includes:
and calling a preset code comparison interface to compare the target code with each test code, and determining whether the target test code same as the target code exists in each test code.
In a possible implementation manner, the matching the target code with each test code in the instructions of the processor 301 includes:
and comparing the target code with each test code based on a preset code comparison instruction, and determining whether the target test code identical to the target code exists in each test code.
In a possible implementation, the deploying the object code based on the matching result in the instructions of the processor 301 includes:
determining that the target code passes the test and deploying the target code under the condition that the matching result is that the matching is passed;
and indicating to test the target code when the matching result is that the matching is not passed.
In one possible implementation, before matching the target code with each test code, the instructions of the processor 301 further include:
determining whether the historical version deployment information of each tested historical version contains the target deployment version information;
and if not, respectively matching the target code with each test code, and determining a matching result.
The embodiments of the present disclosure also provide a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the computer program performs the steps of the code deployment method described in the above method embodiments. The storage medium may be a volatile or non-volatile computer-readable storage medium.
The embodiments of the present disclosure also provide a computer program product, where the computer program product carries a program code, and instructions included in the program code may be used to execute the steps of the code deployment method described in the foregoing method embodiments, which may be referred to specifically in the foregoing method embodiments, and are not described herein again.
The computer program product may be implemented by hardware, software or a combination thereof. In an alternative embodiment, the computer program product is embodied in a computer storage medium, and in another alternative embodiment, the computer program product is embodied in a Software product, such as a Software Development Kit (SDK) or the like.
It is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the system and the apparatus described above may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again. In the several embodiments provided in the present disclosure, it should be understood that the disclosed system, apparatus, and method may be implemented in other ways. The above-described embodiments of the apparatus are merely illustrative, and for example, the division of the units is only one logical division, and there may be other divisions when actually implemented, and for example, a plurality of units 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 an indirect coupling or communication connection of devices or units through some communication interfaces, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present disclosure may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit.
The functions, if implemented in the form of software functional units and sold or used as a stand-alone product, may be stored in a non-volatile computer-readable storage medium executable by a processor. Based on such understanding, the technical solutions of the present disclosure, which are essential or part of the technical solutions contributing to the prior art, may be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the methods described in the embodiments of the present disclosure. And the aforementioned storage medium includes: various media capable of storing program codes, such as a usb disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk.
Finally, it should be noted that: the above-mentioned embodiments are merely specific embodiments of the present disclosure, which are used for illustrating the technical solutions of the present disclosure and not for limiting the same, and the scope of the present disclosure is not limited thereto, and although the present disclosure is described in detail with reference to the foregoing embodiments, those skilled in the art should understand that: any person skilled in the art can modify or easily conceive of the technical solutions described in the foregoing embodiments or equivalent technical features thereof within the technical scope of the present disclosure; such modifications, changes and substitutions do not depart from the spirit and scope of the embodiments disclosed herein, and they should be construed as being included therein. Therefore, the protection scope of the present disclosure shall be subject to the protection scope of the claims.

Claims (10)

1. A method for code deployment, comprising:
responding to a code deployment instruction, acquiring a target code corresponding to target deployment version information carried by the code deployment instruction, and acquiring test codes of various historical versions which have been tested in a code test environment;
matching the target code with each test code respectively to determine a matching result;
and deploying the target code based on the matching result.
2. The method of claim 1, wherein matching the object code with each test code comprises:
and calling a preset code comparison interface to compare the target code with each test code, and determining whether the target test code same as the target code exists in each test code.
3. The method of claim 1, wherein matching the object code with each test code comprises:
and comparing the target code with each test code based on a preset code comparison instruction, and determining whether the target test code identical to the target code exists in each test code.
4. The method of claim 1, wherein deploying the object code based on the matching result comprises:
determining that the target code passes the test and deploying the target code under the condition that the matching result is that the matching is passed;
and indicating to test the target code when the matching result is that the matching is not passed.
5. The method of claim 1, wherein prior to matching the target code with each test code, the method further comprises:
determining whether the historical version deployment information of each tested historical version contains the target deployment version information;
and if not, respectively matching the target code with each test code, and determining a matching result.
6. A code deployment apparatus, comprising:
the acquisition module is used for responding to a code deployment instruction, acquiring a target code corresponding to target deployment version information carried by the code deployment instruction, and acquiring test codes of various historical versions which have been tested in a code test environment;
the determining module is used for respectively matching the target codes with the test codes and determining a matching result;
and the deployment module is used for deploying the target code based on the matching result.
7. The apparatus of claim 6, wherein the determining module, when matching the object code with each test code, is configured to:
and calling a preset code comparison interface to compare the target code with each test code, and determining whether the target test code same as the target code exists in each test code.
8. The apparatus of claim 6, wherein the determining module, when matching the object code with each test code, is configured to:
and comparing the target code with each test code based on a preset code comparison instruction, and determining whether the target test code identical to the target code exists in each test code.
9. A computer device, comprising: a processor, a memory and a bus, the memory storing machine-readable instructions executable by the processor, the processor and the memory communicating over the bus when a computer device is running, the machine-readable instructions when executed by the processor performing the steps of the code deployment method of any of claims 1 to 5.
10. A computer-readable storage medium, having stored thereon a computer program which, when being executed by a processor, carries out the steps of the code deployment method according to any one of claims 1 to 5.
CN202210762950.2A 2022-06-30 2022-06-30 Code deployment method and device, computer equipment and storage medium Pending CN115061697A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210762950.2A CN115061697A (en) 2022-06-30 2022-06-30 Code deployment method and device, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210762950.2A CN115061697A (en) 2022-06-30 2022-06-30 Code deployment method and device, computer equipment and storage medium

Publications (1)

Publication Number Publication Date
CN115061697A true CN115061697A (en) 2022-09-16

Family

ID=83204887

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210762950.2A Pending CN115061697A (en) 2022-06-30 2022-06-30 Code deployment method and device, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN115061697A (en)

Similar Documents

Publication Publication Date Title
CN109814524B (en) Vehicle diagnosis method, device and system
CN105988836B (en) Application recommendation method and device
US20150186195A1 (en) Method of analysis application object which computer-executable, server performing the same and storage media storing the same
CN112417461A (en) Fuzzy test method and system for equipment firmware
CN110209520B (en) Method and device for improving SSD (solid State disk) testing efficiency, computer equipment and storage medium
CN112149136A (en) loT device firmware vulnerability detection method and system and electronic device
CN111538523A (en) Differential upgrading method, device and storage medium
CN109815697A (en) Wrong report behavior processing method and processing device
KR101324691B1 (en) System and method for detecting malicious mobile applications
CN109684205B (en) System testing method, device, electronic equipment and storage medium
CN115061697A (en) Code deployment method and device, computer equipment and storage medium
CN111831300A (en) APP updating method and device, electronic equipment and computer readable storage medium
CN115543816A (en) Software regression test result verification method, device, equipment and storage medium
CN115168236A (en) Automatic testing method, electronic device and storage medium
CN114356346A (en) Application program deployment method, device, storage medium and electronic equipment
CN114117434A (en) Detection method and device
CN110377499B (en) Method and device for testing application program
CN113672514A (en) Test method, test device, server and storage medium
CN109560964B (en) Equipment compliance checking method and device
CN113703753A (en) Method and device for product development and product development system
CN113760747A (en) Software testing method, device, equipment, storage medium and program product
CN111797016A (en) Application program testing method, device, storage medium and device
CN110764997B (en) Database interface conformance testing method and device
CN112560035B (en) Application detection method, device, equipment and storage medium
CN116401113B (en) Environment verification method, device and medium for heterogeneous many-core architecture acceleration card

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: 100041 B-0035, 2 floor, 3 building, 30 Shixing street, Shijingshan District, Beijing.

Applicant after: Douyin Vision Co.,Ltd.

Address before: 100041 B-0035, 2 floor, 3 building, 30 Shixing street, Shijingshan District, Beijing.

Applicant before: Tiktok vision (Beijing) Co.,Ltd.

CB02 Change of applicant information