CN116107589B - Automatic compiling method, device and equipment of software codes and storage medium - Google Patents

Automatic compiling method, device and equipment of software codes and storage medium Download PDF

Info

Publication number
CN116107589B
CN116107589B CN202310214376.1A CN202310214376A CN116107589B CN 116107589 B CN116107589 B CN 116107589B CN 202310214376 A CN202310214376 A CN 202310214376A CN 116107589 B CN116107589 B CN 116107589B
Authority
CN
China
Prior art keywords
compiling
preset
initial
log
final
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.)
Active
Application number
CN202310214376.1A
Other languages
Chinese (zh)
Other versions
CN116107589A (en
Inventor
黎绵星
徐良春
骆海东
颜嘉梁
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shanghai Juhuotong E Commerce Co ltd
Shanghai Jushuitan Network Technology Co ltd
Original Assignee
Shanghai Juhuotong E Commerce Co ltd
Shanghai Jushuitan Network 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 Shanghai Juhuotong E Commerce Co ltd, Shanghai Jushuitan Network Technology Co ltd filed Critical Shanghai Juhuotong E Commerce Co ltd
Priority to CN202310214376.1A priority Critical patent/CN116107589B/en
Publication of CN116107589A publication Critical patent/CN116107589A/en
Application granted granted Critical
Publication of CN116107589B publication Critical patent/CN116107589B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/40Transformation of program code
    • G06F8/41Compilation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/65Updates
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Security & Cryptography (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The invention discloses an automatic compiling method, device and equipment of a software code and a storage medium. The method comprises the following steps: when the fact that the preset automatic compiling conditions are met is detected, automatically compiling initial software codes through a preset automatic compiling interface to obtain an initial compiling log; analyzing an initial compiling log through a preset log analysis interface to obtain compiling abnormal information, and obtaining an error file identifier according to the compiling abnormal information; inquiring a file history submitting record according to the error file identification so as to obtain a final submitting person of the error code file, and sending compiling abnormal information to the final submitting person; and according to the recompilation instruction of the final submitting personnel, automatically compiling the updated software codes again to obtain an updated compiling log. According to the technical scheme, the compiling abnormal information is sent to corresponding code submitting personnel for processing, and the compiling is triggered again after the processing is completed, so that the communication cost can be effectively reduced, and the compiling efficiency of the software codes can be improved.

Description

Automatic compiling method, device and equipment of software codes and storage medium
Technical Field
The present invention relates to the field of software development technologies, and in particular, to a method, an apparatus, a device, and a storage medium for automatically compiling a software code.
Background
The collaborative development of the software projects gradually becomes a main form of the current software development, and the software development efficiency can be greatly improved through the collaborative development of the software of multiple companies, multiple teams and multiple projects, so that the software development period is shortened. However, in the process of collaborative development of software, conflicts and anomalies often occur in software code merging and compiling, how to automatically locate error detail information and corresponding responsible persons, and automatically send the error detail information to the corresponding responsible persons for processing, so that the technical problem which needs to be solved at present is solved.
At present, an automatic compiling method of software codes is mainly realized based on the existing continuous integration or continuous deployment software. However, for continuous integration or continuous deployment of software, although the output of detailed error information can be achieved, the positioning of specific responsible persons cannot be achieved, and the detailed error information cannot be sent to the specific responsible persons, so that communication cost is increased, and the compiling efficiency of software codes is low.
Disclosure of Invention
The invention provides an automatic compiling method, device and equipment for a software code and a storage medium, which can effectively reduce communication cost and improve compiling efficiency of the software code.
According to an aspect of the present invention, there is provided an automatic compiling method of a software code, including:
when the fact that the preset automatic compiling conditions are met is detected, automatic compiling of initial software codes is conducted through a preset automatic compiling interface, and therefore initial compiling logs are obtained;
analyzing the initial compiling log through a preset log analysis interface to obtain compiling abnormal information, and obtaining an error file identifier according to the compiling abnormal information;
inquiring a file history submitting record according to the error file identification so as to obtain a final submitting person of the error code file, and sending the compiling abnormal information to the final submitting person so that the final submitting person updates the initial software code;
updating the initial software code based on the repair code file submitted by the final submitting personnel to obtain an updated software code, and automatically compiling the updated software code again when receiving a recompilation instruction sent by the final submitting personnel to obtain an updated compiling log.
According to another aspect of the present invention, there is provided an automatic compiling apparatus for a software code, comprising:
the initial compiling log obtaining module is used for automatically compiling initial software codes through a preset automatic compiling interface when the fact that the preset automatic compiling conditions are met is detected, so that an initial compiling log is obtained;
the error file identification acquisition module is used for analyzing the initial compiling log through a preset log analysis interface to acquire compiling abnormal information and acquiring an error file identification according to the compiling abnormal information;
the compiling abnormal information sending module is used for inquiring a file history submitting record according to the error file identification so as to obtain a final submitting person of the error code file, and sending the compiling abnormal information to the final submitting person so that the final submitting person can update the initial software code;
and the updating software code compiling module is used for updating the initial software code based on the repair code file submitted by the final submitting personnel so as to obtain an updating software code, and automatically compiling the updating software code again when receiving a recompilation instruction sent by the final submitting personnel so as to obtain an updating compiling log.
According to another aspect of the present invention, there is provided an electronic apparatus including:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein,
the memory stores a computer program executable by the at least one processor to enable the at least one processor to perform the method of automated compiling of software code according to any one of the embodiments of the invention.
According to another aspect of the present invention, there is provided a computer readable storage medium storing computer instructions for causing a processor to execute an automatic compiling method for software code according to any embodiment of the present invention.
According to the technical scheme, when the fact that the preset automatic compiling condition is met is detected, automatic compiling of initial software codes is conducted through a preset automatic compiling interface, and therefore initial compiling logs are obtained; then, analyzing an initial compiling log through a preset log analysis interface to obtain compiling abnormal information, and obtaining an error file identifier according to the compiling abnormal information; secondly, inquiring a file history submitting record according to the error file identification so as to obtain a final submitting person of the error code file, and sending compiling abnormal information to the final submitting person so that the final submitting person updates the initial software code; and finally, updating the initial software code based on the repair code file submitted by the final submitting personnel to obtain an updated software code, and when receiving a recompilation instruction sent by the final submitting personnel, recompilating the updated software code again to obtain an updated compiling log.
It should be understood that the description in this section is not intended to identify key or critical features of the embodiments of the invention or to delineate the scope of the invention. Other features of the present invention will become apparent from the description that follows.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for the description of the embodiments will be briefly described below, and it is apparent that the drawings in the following description are only some embodiments of the present invention, and other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1A is a flowchart of an automatic compiling method for a software code according to an embodiment of the present invention;
FIG. 1B is a flowchart of another method for automatically compiling software code according to the first embodiment of the present invention;
FIG. 2 is a schematic diagram of an apparatus for automatically compiling software code according to a second embodiment of the present invention;
fig. 3 is a schematic structural diagram of an electronic device implementing an automatic compiling method for software codes according to an embodiment of the invention.
Detailed Description
In order that those skilled in the art will better understand the present invention, a technical solution in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in which it is apparent that the described embodiments are only some embodiments of the present invention, not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the present invention without making any inventive effort, shall fall within the scope of the present invention.
It should be noted that the terms "first," "second," "target," and the like in the description and claims of the present invention and in the above figures are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged where appropriate such that the embodiments of the invention described herein may be implemented in sequences other than those illustrated or otherwise described herein. 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.
Example 1
Fig. 1A is a flowchart of an automatic compiling method for a software code according to an embodiment of the invention, where the method may be applied to a case of performing automatic collaborative compiling of the software code, and the method may be performed by an automatic compiling apparatus for the software code, where the automatic compiling apparatus for the software code may be implemented in the form of hardware and/or software, and the automatic compiling apparatus for the software code may be configured in an electronic device, typically, a computer device or a server. As shown in fig. 1A, the method includes:
and S110, when the fact that the preset automatic compiling condition is met is detected, automatic compiling of the initial software codes is conducted through a preset automatic compiling interface, and therefore an initial compiling log is obtained.
In this embodiment, an automated compiling system may be pre-deployed to be responsible for performing automated merging and compiling operations on software code. The preset automatic compiling condition can be preset condition information for triggering and executing automatic compiling; for example, the user may log into an automated compiling system or may be timed task triggered execution.
The preset automatic compiling interface can be a function interface which is used for being responsible for automatic compiling in a pre-designated automatic compiling system; in this embodiment, through the preset automatic compiling interface, automatic compiling of the software code can be directly implemented according to the set parameters; or, the corresponding compiling engine can be firstly called through a preset automatic compiling interface, and then the automatic compiling operation on the software code is executed through the compiling engine.
Furthermore, the initial software code, which may be program code that is currently in need of compilation, may be developed and submitted in concert by different developers, and may comprise a series of code files. In this embodiment, the automatic compiling process of the initial software code may be recorded to generate a corresponding initial compiling log. The compiling log may include a compiling time, an abnormal error report (for example, an error report code line number, specific error report information, etc.) in a compiling process, a compiling result, and the like.
S120, analyzing the initial compiling log through a preset log analysis interface to obtain compiling abnormal information, and obtaining an error file identification according to the compiling abnormal information.
The preset log analysis interface can be a function interface which is responsible for log analysis in a pre-designated automatic compiling system; specifically, content analysis can be performed on the obtained initial compiling log through a preset log analysis interface based on a preset log analysis rule so as to obtain compiling abnormal information.
Note that when the initial software code is successfully compiled, the content of the compiled exception information is empty; and when the initial software code fails to compile, the content of the compiling exception information is not null. The compiling exception information may include an error file identifier (a character string for identifying a file), an error code line number, specific error information, and the like.
In this embodiment, when the initial software code fails to compile, the error file identifier may be extracted from the compiling exception information according to the data format of the compiling exception information, so as to determine the code file in which the compiling error occurs.
S130, inquiring a file history submitting record according to the error file identification so as to obtain a final submitting person of the error code file, and sending compiling abnormal information to the final submitting person so that the final submitting person can update the initial software code.
The file history submitting record may be record information of the code file submitted by the developer, and may include a correspondence between the developer and the code file identifier. Typically, the file history commit record may be a TFS (Team Foundation Server, team base server) history commit record. In this embodiment, collaborative software development may be implemented based on TFS, that is, different developers submit the codes that are respectively responsible for writing to TFS, and then the TFS performs code merging, so as to obtain a complete project code.
In a specific example, after determining the error file identity, the TFS history commit record may be queried based on the error file identity to determine a final commit person for the error code file, and the compiled exception information may be sent to a corresponding developer via the mobile office client or communication client used to request modification of the error code file to repair the current code exception.
And S140, updating the initial software code based on the repair code file submitted by the final submitting personnel to obtain an updated software code, and automatically compiling the updated software code again when receiving a recompilation instruction sent by the final submitting personnel to obtain an updated compiling log.
In a specific example, after the final submitter completes the repair of the error code file, the final submitter may submit the corresponding repair code file to the automated compiling system, and may reply to repair completion information in the group of mobile office clients, or may click a repair completion button in the group to send a recompilation instruction to the automated compiling system. After receiving the repair code file, the automatic compiling system can merge the repair code file into an initial software code (for example, incremental update or replacement update, etc.) to obtain an updated software code, and after receiving a recompilation instruction, the automatic compiling system can recompilate the repaired updated software code through a preset automatic compiling interface to obtain a corresponding compiling log, namely, an updated compiling log. Wherein the communication link between the mobile office client and the automated compiling system may be pre-established.
According to the technical scheme, when the fact that the preset automatic compiling condition is met is detected, automatic compiling of initial software codes is conducted through a preset automatic compiling interface, and therefore initial compiling logs are obtained; then, analyzing an initial compiling log through a preset log analysis interface to obtain compiling abnormal information, and obtaining an error file identifier according to the compiling abnormal information; secondly, inquiring a file history submitting record according to the error file identification so as to obtain a final submitting person of the error code file, and sending compiling abnormal information to the final submitting person so that the final submitting person updates the initial software code; and finally, updating the initial software code based on the repair code file submitted by the final submitting personnel to obtain an updated software code, and when receiving a recompilation instruction sent by the final submitting personnel, recompilating the updated software code again to obtain an updated compiling log.
In an optional implementation manner of this embodiment, the detecting that the preset automatic compiling condition is met may include:
if the user is detected to be successfully logged in or the current system time is detected to be equal to the preset compiling time, determining that the preset automatic compiling condition is met.
The preset compiling time may be a preset time for triggering automatic compiling by a timing task. In a specific example, when it is detected that the user successfully logs in to the automatic compiling system or when it is detected that the system time reaches the preset compiling time, it may be determined that the preset automatic compiling condition is met, and then execution of automatic compiling may be triggered.
In another optional implementation manner of this embodiment, the automatic compiling of the initial software code through the preset automatic compiling interface to obtain the initial compiling log may include:
and triggering the Jenkins engine to call a preset VS client to automatically compile initial software codes through the preset automatic compiling interface so as to acquire an initial compiling log.
The Jenkins engine is a continuous integration tool and can be used for continuously constructing and testing software projects; second, it may make it easier for developers to integrate changes into projects and for users to obtain new constructs.
In this embodiment, a Jenkins engine may be automatically triggered to call a Visual Studio (VS) client deployed in advance through a preset automatic compiling interface, so that the current initial software code is automatically compiled through the VS client, and a corresponding initial compiling log is obtained. The login information of the Jenkins engine, for example, an identity account number, a password, and the like, may be registered and stored in advance.
In another optional implementation manner of this embodiment, through the preset automatic compiling interface, triggering the Jenkins engine to call the preset VS client to perform automatic compiling of the initial software code, so as to obtain an initial compiling log may include:
judging whether task parameters corresponding to the initial software codes meet preset parameter detection conditions or not through the Jenkins engine;
if yes, when the construction list is determined to be empty, a construction task corresponding to the initial software code is newly constructed;
and carrying out automatic compiling of the initial software code by the Jenkins engine based on the construction task so as to obtain an initial compiling log.
Specifically, in the process of calling a VS client to automatically compile a software code through a Jenkins engine, firstly, parameter verification is carried out on task parameters corresponding to an initial software code to judge whether preset parameter detection conditions are met or not; if the success meeting the preset parameter detection condition is detected, whether the construction list is empty can be further judged.
Then, if the construction list is determined to be empty, the construction task corresponding to the initial software code is not established, and the construction task corresponding to the initial software code can be newly established. Finally, the execution of the build task may be triggered to perform an automatic compilation of the initial software code to obtain a corresponding initial compilation log. Secondly, if the construction list is determined not to be empty, the execution of the construction task in the construction list can be directly triggered.
The preset parameter detection conditions may be that each parameter value is located within a corresponding parameter value range, or that the parameter value is greater than a corresponding parameter threshold.
In another optional implementation manner of this embodiment, sending the compiling abnormal information to the final submitting person may include:
sending the compiling abnormal information to the final submitting personnel through a preset mobile office client;
the preset mobile office client may be pre-designated collaborative office software, for example, may be a nail or the like. In a specific example, the compiling anomaly information may be sent to the final submitter in a project group of a preset mobile office client. Optionally, a development task can be generated based on compiling abnormal information, and the development task is sent to a final submitting person through a preset project group; the compiling exception information can be used as task description information of a development task.
Correspondingly, receiving the recompilation instruction sent by the final submitter may include:
and when detecting the selection operation of the final submitting personnel on the successful repairing button in the preset project group of the preset mobile office client, acquiring a recompilation instruction sent by the final submitting personnel.
The preset project group may be a person group responsible for a current software development task. In this embodiment, after compiling anomaly information is transmitted to the final submitter through the preset item group, a repair success button may be set in the preset item group. After the final submitter completes the repair of the error code file and submits the repair code file to the TFS, a repair success button may be clicked in the preset project group to send a recompilation instruction to the automated compilation system.
The setting has the advantages that the corresponding developer can follow up the code error problem, and other developers can intuitively know the current development progress; meanwhile, after software defect repair is completed, recompilation is triggered directly through a preset mobile office client, so that communication cost can be effectively reduced, and compiling efficiency is improved.
In another optional implementation manner of this embodiment, the analyzing, by the preset log analyzing interface, the initial compiling log to obtain compiling abnormal information may include:
and analyzing the initial compiling log based on the regular expression through a preset log analysis interface so as to acquire compiling abnormal information.
Specifically, after the initial compiling log is obtained, the initial compiling log may be sent to a preset log analysis interface, so that regular expression matching detection is performed on the initial compiling log through the preset log analysis interface, and compiling abnormal information is extracted from the initial compiling log. The regular expression describes a string matching pattern, and can be used to check whether a string contains a certain sub-string, replace the matched sub-string, or take out the sub-string meeting a certain condition from a certain string, etc.
In another optional implementation manner of this embodiment, after the analyzing the initial compiling log through the preset log analyzing interface to obtain the compiling abnormal information, the method may further include:
and if the content of the compiling abnormal information is detected to be empty, sending compiling success information to a preset project group of the preset mobile office client.
In another case, when the initial software code is successfully compiled, the content of the compiling abnormal information extracted from the initial compiling log is empty, and at this time, the compiling success information may be directly sent in a preset project group of the preset mobile office client. For example, a compilation success notification may be sent in a pinned population of items.
In a specific implementation of this embodiment, the flow of the method for automatically compiling software code may be as shown in fig. 1B. Firstly, a user clicks or a timed task triggers automatic compiling, so that a Jenkins engine is triggered to call a VS client to execute a compiling task through a preset automatic compiling interface. Then, if the parameter verification is detected to be successful and the construction list is empty, the Jenkins construction is carried out based on the initial software codes in the database, so that the initial software codes are automatically compiled, and an initial compiling log is obtained.
Further, through a preset log analysis interface, the initial compiling log is analyzed based on the regular expression, compiling abnormal information is extracted, and error file identification is obtained according to the compiling abnormal information. And then, inquiring a TFS history record according to the error file identification to determine a last submitting person, and sending compiling abnormal information to the last submitting person through the nail group. The developer takes the task, repairs the error code file, and submits the repaired code file to the TFS. Finally, the developer clicks a repair success button in the nail group to trigger a preset automatic compiling interface to call Jenkins, and recompilation is performed on the submitted updated software codes to obtain an updated compiling log.
It should be noted that, when the updated software code submitted by the developer still fails to be compiled, the above process may be repeated until the submitted software code is compiled successfully. And secondly, if the content of the compiling abnormal information corresponding to the initial software code is empty, the direct compiling is successful, and the compiling success notification can be directly sent in the nail group.
Example two
Fig. 2 is a schematic structural diagram of an automatic compiling apparatus for software codes according to a second embodiment of the present invention. As shown in fig. 2, the apparatus may include: an initial compilation log acquisition module 210, an error file identification acquisition module 220, a compilation exception information transmission module 230, and an update software code compilation module 240; wherein,
the initial compiling log obtaining module 210 is configured to, when it is detected that the preset automatic compiling condition is met, perform automatic compiling of the initial software code through the preset automatic compiling interface to obtain an initial compiling log;
the error file identification obtaining module 220 is configured to parse the initial compiling log through a preset log parsing interface to obtain compiling abnormal information, and obtain an error file identification according to the compiling abnormal information;
the compiling abnormal information sending module 230 is configured to query a file history submitting record according to the error file identifier, obtain a final submitting person of the error code file, and send the compiling abnormal information to the final submitting person, so that the final submitting person updates the initial software code;
and the update software code compiling module 240 is configured to update the initial software code based on the repair code file submitted by the final submitting person to obtain an update software code, and automatically compile the update software code again when receiving a recompilation instruction sent by the final submitting person to obtain an update compiling log.
According to the technical scheme, when the fact that the preset automatic compiling condition is met is detected, automatic compiling of initial software codes is conducted through a preset automatic compiling interface, and therefore initial compiling logs are obtained; then, analyzing an initial compiling log through a preset log analysis interface to obtain compiling abnormal information, and obtaining an error file identifier according to the compiling abnormal information; secondly, inquiring a file history submitting record according to the error file identification so as to obtain a final submitting person of the error code file, and sending compiling abnormal information to the final submitting person so that the final submitting person updates the initial software code; and finally, updating the initial software code based on the repair code file submitted by the final submitting personnel to obtain an updated software code, and when receiving a recompilation instruction sent by the final submitting personnel, recompilating the updated software code again to obtain an updated compiling log.
Optionally, the initial compiling log obtaining module 210 is specifically configured to determine that the preset automatic compiling condition is met if it is detected that the user successfully logs in, or it is detected that the current system time is equal to the preset compiling time.
Optionally, the initial compiling log obtaining module 210 is further configured to trigger, through the preset automatic compiling interface, the Jenkins engine to call a preset VS client to perform automatic compiling of the initial software code, so as to obtain an initial compiling log.
Optionally, the initial compiling log obtaining module 210 includes:
the task parameter judging unit is used for judging whether the task parameter corresponding to the initial software code meets a preset parameter detection condition or not through the Jenkins engine;
a construction task new construction unit, configured to newly construct a construction task corresponding to the initial software code when it is determined that the construction list is empty;
and the initial compiling log obtaining unit is used for automatically compiling the initial software code based on the construction task through the Jenkins engine so as to obtain an initial compiling log.
Optionally, the compiling abnormal information sending module 230 is specifically configured to send the compiling abnormal information to the final submitter through a preset mobile office client;
the updated software code compiling module 240 is specifically configured to obtain a recompilation instruction sent by the final submitting person when detecting a selection operation of a repair success button in the preset project group of the preset mobile office client by the final submitting person.
Optionally, the error file identification obtaining module 220 is specifically configured to parse the initial compiling log based on a regular expression through a preset log parsing interface to obtain compiling exception information.
Optionally, the automatic compiling device for software codes further includes:
and the compiling success information sending module is used for sending the compiling success information to the preset project group of the preset mobile office client if the compiling abnormal information is detected to be empty.
The automatic compiling device for the software codes provided by the embodiment of the invention can execute the automatic compiling method for the software codes provided by any embodiment of the invention, and has the corresponding functional modules and beneficial effects of the executing method.
It should be noted that, in the technical solution of the present embodiment, the related acquisition, storage, application, etc. of the personal information of the user all conform to the rules of the related laws and regulations, and do not violate the popular regulations of the public order.
Example III
Fig. 3 shows a schematic diagram of an electronic device 30 that may be used to implement an embodiment of the invention. Electronic devices are intended to represent various forms of digital computers, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. Electronic equipment may also represent various forms of mobile devices, such as personal digital processing, cellular telephones, smartphones, wearable devices (e.g., helmets, glasses, watches, etc.), and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are meant to be exemplary only, and are not meant to limit implementations of the inventions described and/or claimed herein.
As shown in fig. 3, the electronic device 30 includes at least one processor 31, and a memory, such as a Read Only Memory (ROM) 32, a Random Access Memory (RAM) 33, etc., communicatively connected to the at least one processor 31, wherein the memory stores a computer program executable by the at least one processor, and the processor 31 can perform various suitable actions and processes according to the computer program stored in the Read Only Memory (ROM) 32 or the computer program loaded from the storage unit 38 into the Random Access Memory (RAM) 33. In the RAM 33, various programs and data required for the operation of the electronic device 30 may also be stored. The processor 31, the ROM 32 and the RAM 33 are connected to each other via a bus 34. An input/output (I/O) interface 35 is also connected to bus 34.
Various components in electronic device 30 are connected to I/O interface 35, including: an input unit 36 such as a keyboard, a mouse, etc.; an output unit 37 such as various types of displays, speakers, and the like; a storage unit 38 such as a magnetic disk, an optical disk, or the like; and a communication unit 39 such as a network card, modem, wireless communication transceiver, etc. The communication unit 39 allows the electronic device 30 to exchange information/data with other devices via a computer network, such as the internet, and/or various telecommunication networks.
The processor 31 may be a variety of general and/or special purpose processing components having processing and computing capabilities. Some examples of processor 31 include, but are not limited to, a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), various specialized Artificial Intelligence (AI) computing chips, various processors running machine learning model algorithms, digital Signal Processors (DSPs), and any suitable processor, controller, microcontroller, etc. The processor 31 performs the various methods and processes described above, such as an automated compilation of software code.
In some embodiments, the automated compiling method of the software code may be implemented as a computer program, which is tangibly embodied on a computer-readable storage medium, such as the storage unit 38. In some embodiments, part or all of the computer program may be loaded and/or installed onto the electronic device 30 via the ROM 32 and/or the communication unit 39. When the computer program is loaded into the RAM 33 and executed by the processor 31, one or more steps of the above-described automatic compiling method of software code may be performed. Alternatively, in other embodiments, the processor 31 may be configured to perform an automated compilation method of software code in any other suitable manner (e.g., by means of firmware).
Various implementations of the systems and techniques described here above may be implemented in digital electronic circuitry, integrated circuit systems, field Programmable Gate Arrays (FPGAs), application Specific Integrated Circuits (ASICs), application Specific Standard Products (ASSPs), systems On Chip (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may include: implemented in one or more computer programs, the one or more computer programs may be executed and/or interpreted on a programmable system including at least one programmable processor, which may be a special purpose or general-purpose programmable processor, that may receive data and instructions from, and transmit data and instructions to, a storage system, at least one input device, and at least one output device.
A computer program for carrying out methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general purpose computer, special purpose computer, or other programmable data processing apparatus, such that the computer programs, when executed by the processor, cause the functions/operations specified in the topology and/or block diagram to be implemented. The computer program may execute entirely on the machine, partly on the machine, as a stand-alone software package, partly on the machine and partly on a remote machine or entirely on the remote machine or server.
In the context of the present invention, a computer-readable storage medium may be a tangible medium that can contain, or store a computer program for use by or in connection with an instruction execution system, apparatus, or device. The computer readable storage medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. Alternatively, the computer readable storage medium may be a machine readable signal medium. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
To provide for interaction with a user, the systems and techniques described here can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to a user; and a keyboard and a pointing device (e.g., a mouse or a trackball) through which a user can provide input to the electronic device. Other kinds of devices may also be used to provide for interaction with a user; for example, feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form, including acoustic input, speech input, or tactile input.
The systems and techniques described here can be implemented in a computing system that includes a background component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front-end component (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such background, middleware, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: local Area Networks (LANs), wide Area Networks (WANs), blockchain networks, and the internet.
The computing system may include clients and servers. The client and server are typically remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other. The server can be a cloud server, also called a cloud computing server or a cloud host, and is a host product in a cloud computing service system, so that the defects of high management difficulty and weak service expansibility in the traditional physical hosts and VPS service are overcome.
It should be appreciated that various forms of the flows shown above may be used to reorder, add, or delete steps. For example, the steps described in the present invention may be performed in parallel, sequentially, or in a different order, so long as the desired results of the technical solution of the present invention are achieved, and the present invention is not limited herein.
The above embodiments do not limit the scope of the present invention. It will be apparent to those skilled in the art that various modifications, combinations, sub-combinations and alternatives are possible, depending on design requirements and other factors. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the scope of the present invention.

Claims (8)

1. An automated compiling method of software code, comprising:
when the fact that the preset automatic compiling conditions are met is detected, automatic compiling of initial software codes is conducted through a preset automatic compiling interface, and therefore initial compiling logs are obtained;
analyzing the initial compiling log through a preset log analysis interface to obtain compiling abnormal information, and obtaining an error file identifier according to the compiling abnormal information;
inquiring a file history submitting record according to the error file identification so as to obtain a final submitting person of the error code file, and sending the compiling abnormal information to the final submitting person so that the final submitting person updates the initial software code;
updating the initial software code based on the repair code file submitted by the final submitting personnel to obtain an updated software code, and automatically compiling the updated software code again when receiving a recompilation instruction sent by the final submitting personnel to obtain an updated compiling log;
analyzing the initial compiling log through a preset log analysis interface to obtain compiling abnormal information, wherein the method comprises the following steps:
analyzing the initial compiling log based on a regular expression through a preset log analysis interface to obtain compiling abnormal information;
sending the compiling exception information to the final submitter, including:
sending the compiling abnormal information to the final submitting personnel through a preset mobile office client;
receiving a recompilation instruction sent by the final submitter, wherein the recompilation instruction comprises the following steps:
and when detecting the selection operation of the final submitting personnel on the successful repairing button in the preset project group of the preset mobile office client, acquiring a recompilation instruction sent by the final submitting personnel.
2. The method of claim 1, wherein detecting that the preset auto-compile condition is met comprises:
if the user is detected to be successfully logged in or the current system time is detected to be equal to the preset compiling time, determining that the preset automatic compiling condition is met.
3. The method of claim 1, wherein automatically compiling the initial software code via the pre-set automatic compiling interface to obtain the initial compiling log comprises:
and triggering the Jenkins engine to call a preset VS client to automatically compile initial software codes through the preset automatic compiling interface so as to acquire an initial compiling log.
4. The method of claim 3, wherein triggering the Jenkins engine to call the preset VS client to perform automatic compilation of the initial software code through the preset automatic compilation interface to obtain an initial compilation log comprises:
judging whether task parameters corresponding to the initial software codes meet preset parameter detection conditions or not through the Jenkins engine;
if yes, when the construction list is determined to be empty, a construction task corresponding to the initial software code is newly constructed;
and carrying out automatic compiling of the initial software code by the Jenkins engine based on the construction task so as to obtain an initial compiling log.
5. The method of claim 1, further comprising, after parsing the initial compilation log via a preset log parsing interface to obtain compilation exception information:
and if the content of the compiling abnormal information is detected to be empty, sending compiling success information to a preset project group of the preset mobile office client.
6. An automatic compiling apparatus for software code, comprising:
the initial compiling log obtaining module is used for automatically compiling initial software codes through a preset automatic compiling interface when the fact that the preset automatic compiling conditions are met is detected, so that an initial compiling log is obtained;
the error file identification acquisition module is used for analyzing the initial compiling log through a preset log analysis interface to acquire compiling abnormal information and acquiring an error file identification according to the compiling abnormal information;
the compiling abnormal information sending module is used for inquiring a file history submitting record according to the error file identification so as to obtain a final submitting person of the error code file, and sending the compiling abnormal information to the final submitting person so that the final submitting person can update the initial software code;
the updating software code compiling module is used for updating the initial software code based on the repair code file submitted by the final submitting personnel to obtain an updating software code, and automatically compiling the updating software code again when a recompilation instruction sent by the final submitting personnel is received to obtain an updating compiling log;
the error file identification acquisition module is specifically configured to analyze the initial compiling log based on a regular expression through a preset log analysis interface to acquire compiling abnormal information;
the compiling abnormal information sending module is specifically used for sending the compiling abnormal information to the final submitting personnel through a preset mobile office client;
and the updating software code compiling module is specifically used for acquiring a recompilation instruction sent by the final submitting personnel when detecting the selection operation of the final submitting personnel on a successful repairing button in the preset project group of the preset mobile office client.
7. An electronic device, the electronic device comprising:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein,
the memory stores a computer program executable by the at least one processor to enable the at least one processor to perform the method of automated compiling of software code according to any one of claims 1 to 5.
8. A computer readable storage medium storing computer instructions for causing a processor to perform the method of automated compiling of software code according to any one of claims 1 to 5.
CN202310214376.1A 2023-03-06 2023-03-06 Automatic compiling method, device and equipment of software codes and storage medium Active CN116107589B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310214376.1A CN116107589B (en) 2023-03-06 2023-03-06 Automatic compiling method, device and equipment of software codes and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310214376.1A CN116107589B (en) 2023-03-06 2023-03-06 Automatic compiling method, device and equipment of software codes and storage medium

Publications (2)

Publication Number Publication Date
CN116107589A CN116107589A (en) 2023-05-12
CN116107589B true CN116107589B (en) 2024-03-19

Family

ID=86259882

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310214376.1A Active CN116107589B (en) 2023-03-06 2023-03-06 Automatic compiling method, device and equipment of software codes and storage medium

Country Status (1)

Country Link
CN (1) CN116107589B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116661758B (en) * 2023-08-01 2023-11-03 青岛蓝图智库信息技术有限公司 Method, device, electronic equipment and medium for optimizing log framework configuration
CN117492760B (en) * 2023-10-27 2024-05-17 浪潮智慧科技有限公司 Code optimization method, device and storage medium based on artificial intelligence

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112506515A (en) * 2019-09-16 2021-03-16 努比亚技术有限公司 Compiling control method, terminal and computer readable storage medium
US11481200B1 (en) * 2021-10-11 2022-10-25 International Business Machines Corporation Checking source code validity at time of code update
CN115509538A (en) * 2022-09-27 2022-12-23 无锡闻泰信息技术有限公司 Compilation control method and device, computer equipment and storage medium

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112506515A (en) * 2019-09-16 2021-03-16 努比亚技术有限公司 Compiling control method, terminal and computer readable storage medium
US11481200B1 (en) * 2021-10-11 2022-10-25 International Business Machines Corporation Checking source code validity at time of code update
CN115509538A (en) * 2022-09-27 2022-12-23 无锡闻泰信息技术有限公司 Compilation control method and device, computer equipment and storage medium

Also Published As

Publication number Publication date
CN116107589A (en) 2023-05-12

Similar Documents

Publication Publication Date Title
CN116107589B (en) Automatic compiling method, device and equipment of software codes and storage medium
CN112199355B (en) Data migration method and device, electronic equipment and storage medium
CN110688305B (en) Test environment synchronization method, device, medium and electronic equipment
CN111865673A (en) Automatic fault management method, device and system
CN111913824A (en) Method for determining data link fault reason and related equipment
CN113656252B (en) Fault positioning method, device, electronic equipment and storage medium
CN111352612A (en) Scheduling method and device for code deployment, electronic equipment and storage medium
CN116627432A (en) Front-end application automatic deployment method, device, equipment and medium
CN111240981A (en) Interface testing method, system and platform
CN116303013A (en) Source code analysis method, device, electronic equipment and storage medium
CN114693116A (en) Method and device for detecting code review validity and electronic equipment
CN114881521A (en) Service evaluation method, device, electronic equipment and storage medium
CN114546799A (en) Point burying log checking method and device, electronic equipment, storage medium and product
TWI735511B (en) Code submission method and equipment
CN111159988A (en) Model processing method and device, computer equipment and storage medium
CN116401113B (en) Environment verification method, device and medium for heterogeneous many-core architecture acceleration card
CN114117181B (en) Website page turning logic acquisition method and device and website page turning control method and device
CN117395071B (en) Abnormality detection method, abnormality detection device, abnormality detection equipment and storage medium
CN116882724B (en) Method, device, equipment and medium for generating business process optimization scheme
CN114528215A (en) Interactive page testing method and element template generating method and device
CN115454800A (en) Log data verification method and device, electronic equipment, storage medium and product
CN114238149A (en) Batch testing method of accounting system, electronic device and storage medium
CN114860614A (en) Data processing method, apparatus, device, medium and product
CN118111720A (en) National standard test system, method, device, equipment and medium for new energy vehicle
CN117634470A (en) Verification method, device, equipment and storage medium

Legal Events

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