Nothing Special   »   [go: up one dir, main page]

CN110543301A - Method and device for generating jenkins code file - Google Patents

Method and device for generating jenkins code file Download PDF

Info

Publication number
CN110543301A
CN110543301A CN201910841679.XA CN201910841679A CN110543301A CN 110543301 A CN110543301 A CN 110543301A CN 201910841679 A CN201910841679 A CN 201910841679A CN 110543301 A CN110543301 A CN 110543301A
Authority
CN
China
Prior art keywords
jenkins
generating
service data
code file
code
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.)
Granted
Application number
CN201910841679.XA
Other languages
Chinese (zh)
Other versions
CN110543301B (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.)
Industrial and Commercial Bank of China Ltd ICBC
Original Assignee
Industrial and Commercial Bank of China Ltd ICBC
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 Industrial and Commercial Bank of China Ltd ICBC filed Critical Industrial and Commercial Bank of China Ltd ICBC
Priority to CN201910841679.XA priority Critical patent/CN110543301B/en
Publication of CN110543301A publication Critical patent/CN110543301A/en
Application granted granted Critical
Publication of CN110543301B publication Critical patent/CN110543301B/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/30Creation or generation of source code

Landscapes

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

Abstract

The invention provides a method and a device for generating jenkins code files, wherein the method comprises the following steps: determining a target flow assembly corresponding to the obtained service data, and analyzing the service data to obtain parameter data; each target flow assembly corresponds to different assembly frames respectively; generating jenkins script flow frames according to the component frames corresponding to the target flow components; and filling the parameter data into the jenkins script flow frame to obtain a jenkins code file. The invention can make the development process of the whole software project smoother, thereby improving the development quality and efficiency of the software project.

Description

Method and device for generating jenkins code file
Technical Field
The invention relates to the technical field of computer software, in particular to a method and a device for generating jenkins code files.
Background
At present, the industries such as internet, finance and the like are all in the practice, research, development and operation integration (DevOps), full process automation such as business requirement, research, development, testing, on-line production, operation and maintenance, monitoring and the like is realized, rapid delivery is realized, market feedback is rapidly obtained, products are rapidly responded and optimized, a greater value is created for enterprises, and the core competitiveness of the enterprises is improved. One important concept in developing integrated operations (DevOps) is pipelining. The pipeline covers each stage of the research and development operation process and can be divided into four stages of source code, construction, test and deployment. The automatic construction, automatic detection and automatic deployment of codes are realized through a production line, so that the development and operation efficiency is comprehensively improved.
development and operators often have different conceptual modes and use different tools to accomplish their respective tasks. Jenkins integrates a large number of various types of tools, so that in the practice of research, development and operation integration, in order to be popular and used by development and operation and maintenance teams, more and more users begin to create a complete task in a pipeline form, but in the traditional mode, a Jenkins task must be created for each stage, and then a task is created to connect the single Jenkins tasks in series. To solve this problem, Jenkins then introduced a new "pipeline" type task. Compared with the traditional mode, the method has the advantages that by using the pipeline, a user only needs to create one task and writes one pipeline code file (Jenkins file) to define the process of the whole pipeline task. The pipeline code can be stored in a source code library, and centralized and versioned management of the pipeline script is realized.
However, the pipeline code is written based on the Groovy language. This requires that pipeline code writers be familiar with Jenkins functions and business characteristics, and also have strong development ability and high requirements for code writers. Therefore, each product on the pipeline needs to be written with the pipeline code with the input of labor cost and time cost, which causes huge resource waste, and errors are easy to occur in the process of writing the pipeline code, which causes difficulty in later maintenance.
disclosure of Invention
aiming at the problems in the prior art, the invention provides a method and a device for generating a jenkins code file, which can make the development process of the whole software project smoother, and further improve the development quality and efficiency of the software project.
In order to solve the technical problems, the invention provides the following technical scheme:
In a first aspect, the present invention provides a method for generating jenkins code files, including:
determining a target flow assembly corresponding to the obtained service data, and analyzing the service data to obtain parameter data; each target flow assembly corresponds to different assembly frames respectively;
Generating jenkins script flow frames according to the component frames corresponding to the target flow components;
And filling the parameter data into the jenkins script flow frame to obtain a jenkins code file.
Further, before determining the target pipeline component corresponding to the pre-acquired service data, the method further includes:
and acquiring service data input by a user through a graphical interface.
Further, before determining the target pipeline component corresponding to the pre-acquired service data, the method further includes:
processing the acquired service data by a preset check rule to obtain service check data;
Correspondingly, the determining the target pipeline component corresponding to the obtained service data and analyzing the service data to obtain parameter data includes:
and determining a target flow assembly corresponding to the service verification data and analyzing the service verification data to obtain parameter data.
Wherein, the preset check rule comprises: a compliance check and/or an integrity check.
The acquiring of the service data input by the user through the graphical interface includes:
and acquiring service data input by a user through a mouse and/or keyboard operation graphical interface.
the acquiring of the service data input by the user through the graphical interface includes:
And acquiring service data input by a user through a touch screen operation graphical interface.
Wherein the type of the preset flowing water assembly comprises: at least one of a source code library type, a compilation type, a deployment type, an automation test type, and a code scan type.
In a second aspect, the present invention provides a device for generating jenkins code files, including:
The analysis unit is used for determining a target pipeline component corresponding to the acquired service data and analyzing the service data to obtain parameter data; each target flow assembly corresponds to different assembly frames respectively;
the flow frame unit is used for generating jenkins script flow frames according to each component frame corresponding to the target flow components;
And the generating unit is used for filling the parameter data into the jenkins script flow frame to obtain a jenkins code file.
Further, the method also comprises the following steps:
and the acquisition unit is used for acquiring the service data input by the user through the graphical interface.
further, the method also comprises the following steps:
The correction unit is used for processing the acquired service data according to the preset check rule to obtain service check data;
Correspondingly, the parsing unit includes:
and the analysis subunit is used for determining the target pipeline component corresponding to the service verification data and analyzing the service verification data to obtain parameter data.
Wherein, the preset check rule comprises: a compliance check and/or an integrity check.
Wherein, the collection unit includes:
And the first acquisition subunit is used for acquiring the service data input by the user through a mouse and/or keyboard operation graphical interface.
Wherein, the collection unit includes:
And the second acquisition subunit is used for acquiring the service data input by the user through the touch screen operation graphical interface.
Wherein the type of the preset flowing water assembly comprises: at least one of a source code library type, a compilation type, a deployment type, an automation test type, and a code scan type.
In a third aspect, the present invention provides an electronic device, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the method for generating jenkins code file when executing the program.
in a fourth aspect, the present invention provides a computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, implements the steps of the method for generating a jenkins code file.
According to the technical scheme, the invention provides a method and a device for generating the jenkins code file, wherein the parameter data is obtained by determining the target pipeline component corresponding to the obtained service data and analyzing the service data; each target flow assembly corresponds to different assembly frames respectively; generating jenkins script flow frames according to the component frames corresponding to the target flow components; the parameter data are filled into the jenkins script flow frame to obtain jenkins code files, so that the workload of a code writer can be greatly reduced, the problem of artificial introduction can be effectively avoided, the development process of the whole software project is smoother, and the later dimension difficulty is reduced; and the development quality and efficiency of the software project can be greatly improved, and the competitiveness of the software product is improved.
drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to these drawings without creative efforts.
Fig. 1 is a first flowchart illustrating a method for generating a jenkins code file according to an embodiment of the present invention.
Fig. 2 is a second flowchart of a method for generating a jenkins code file according to an embodiment of the present invention.
fig. 3 is a third flowchart illustrating a method for generating a jenkins code file according to an embodiment of the present invention.
Fig. 4 is a first structural schematic diagram of a device for generating a jenkins code file in the embodiment of the present invention.
Fig. 5 is a second schematic structural diagram of a device for generating a jenkins code file according to an embodiment of the present invention.
Fig. 6 is a third schematic structural diagram of a device for generating a jenkins code file according to an embodiment of the present invention.
Fig. 7 is a schematic structural diagram of an electronic device in an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The invention provides an embodiment of a method for generating a jenkins code file, which specifically comprises the following contents in reference to fig. 1:
s101: determining a target flow assembly corresponding to the obtained service data, and analyzing the service data to obtain parameter data; each target flow assembly corresponds to different assembly frames respectively;
In this step, the attribute of the acquired service data is determined, and the target pipeline component corresponding to each service data is determined according to the attribute of the service data.
the attributes of the service data include: at least one of a source code library, code compilation, code scanning, construction, and deployment. It should be noted that the type of the preset pipeline component corresponding to the attribute of each service data includes: at least one of a source code library type, a compilation type, a build type, a deployment type, an automation test type, and a code scan type.
it should be noted that, for the service data with the attribute of the source code library, the source code address, the branch user name and the private key information need to be input; for the service data with the attribute of code scanning, the information of a scanned code path and scanning rules needs to be filled; for the business data with the attribute of being constructed, the constructed command information needs to be input; for the service data with the attribute of deployment, command information of the deployment mode needs to be filled in.
it can be understood that the service data is parsed to obtain parameter data, such as: and analyzing the service data to obtain a field carried in the service data, and analyzing the value of the field to obtain corresponding parameter data.
the correspondence between the component framework and the pipeline component needs to be predetermined before acquiring the business data. The component framework is a code framework obtained by writing codes according to the type of the pipeline component, the code framework comprises at least one code statement, and key data parameters are absent in the code statement. By determining the corresponding relation between the component frames and the flow components, the component frames can be directly used and combined according to the selected component frames to obtain the complex frame.
S102: generating jenkins script flow frames according to the component frames corresponding to the target flow components;
In the step, determining each component frame corresponding to the target flow component, and combining the component frames to obtain a jenkins script flow frame; the Jenkins file is used as an executable script and has corresponding grammar and structure requirements, and all component frames are combined according to the grammar and structure requirements to obtain a Jenkins script flow frame.
S103: and filling the parameter data into the jenkins script flow frame to obtain a jenkins code file.
In this step, parameter data obtained by analyzing the service data in step S101 is filled into the jenkins script flow frame generated in step S102, so as to generate a complete jenkins code file.
As can be seen from the above description, in the method for generating a jenkins code file according to the embodiment of the present invention, parameter data is obtained by determining a target pipeline component corresponding to the obtained service data and analyzing the service data; each target flow assembly corresponds to different assembly frames respectively; generating jenkins script flow frames according to the component frames corresponding to the target flow components; the parameter data are filled into the jenkins script flow frame to obtain jenkins code files, so that the workload of a code writer can be greatly reduced, the problem of artificial introduction can be effectively avoided, the development process of the whole software project is smoother, and the later dimension difficulty is reduced; and the development quality and efficiency of the software project can be greatly improved, and the competitiveness of the software product is improved.
In an embodiment of the present invention, referring to fig. 2, before step S101 of the method for generating a jenkins code file, step S100 is further included, which specifically includes the following contents:
S100: and acquiring service data input by a user through a graphical interface.
in this step, when acquiring the service data input by the user through the graphical interface, the service data input by the user through operating the graphical interface by using a mouse and/or a keyboard may be acquired, or the service data input by the user through operating the graphical interface by using a touch screen may be acquired.
It should be noted that, a user inputs service related data through a graphical interface by using a mouse key operation or a touch screen operation, and the interface is divided according to preset pipeline components, wherein the pipeline components can be customized according to different requirements.
by providing the method for inputting service related data and generating the Jenkins file based on the graphical interface, concepts and technical details related to Jenkins and Jenkins file are shielded for users. A user does not need to write any code, and the usable Jenkins file can be obtained through corresponding operation even if the zero development basis is adopted.
In an embodiment of the present invention, referring to fig. 3, step S101 of the method for generating a jenkins code file further includes step S110, which specifically includes the following contents:
S110: processing the acquired service data by a preset check rule to obtain service check data;
Correspondingly, the step S101 of determining a target pipeline component corresponding to the obtained service data and analyzing the service data to obtain parameter data includes: s111: and determining a target flow assembly corresponding to the service verification data and analyzing the service verification data to obtain parameter data.
in the step, the data input by the user is processed by the preset check rule according to the service requirement and the grammar and the characteristics of the production line code, so that the input service data is ensured to be in compliance, and meanwhile, the safety and the robustness of the code writing are prevented from being influenced by some illegal inputs.
Wherein, predetermine the check rule, include: a compliance check and/or an integrity check. For example: in the source code library, source code addresses and branches are required items, and in order to normally download codes, user names and private keys are also required items; the selected filling and the necessary filling can be set according to the actual needs of the service.
As can be seen from the above description, the method for generating a Jenkins code file according to the embodiment of the present invention shields the concept and technical details related to Jenkins and Jenkins file for the user by providing a method for inputting service-related data based on a graphical interface and generating a Jenkins file. A user does not need to write any code, and the usable Jenkins file can be obtained through corresponding operation even if the zero development basis is adopted. The workload of a code writer can be greatly reduced, the problem of artificial introduction is effectively avoided, the development process of the whole software project is smoother, and the later dimension difficulty is reduced; and the development quality and efficiency of the software project can be greatly improved, and the competitiveness of the software product is improved.
An embodiment of the present invention provides a specific implementation manner of a device for generating a jenkins code file, which can implement all the contents in the method for generating a jenkins code file, and with reference to fig. 4, the device for generating a jenkins code file specifically includes the following contents:
the analysis unit 10 is configured to determine a target pipeline component corresponding to the obtained service data, and analyze the service data to obtain parameter data; each target flow assembly corresponds to different assembly frames respectively;
A flow frame unit 20, configured to generate jenkins script flow frames according to each component frame corresponding to the target pipeline component;
And the generating unit 30 is configured to fill the parameter data into the jenkins script flow frame to obtain a jenkins code file.
Wherein, predetermine the check rule, include: a compliance check and/or an integrity check.
Wherein the type of the preset flowing water assembly comprises: at least one of a source code library type, a compilation type, a deployment type, an automation test type, and a code scan type.
in an embodiment of the present invention, referring to fig. 5, the apparatus for generating a jenkins code file further includes:
And the acquisition unit 40 is used for acquiring the service data input by the user through the graphical interface.
Wherein, the collecting unit 40 includes:
and the first acquisition subunit is used for acquiring the service data input by the user through a mouse and/or keyboard operation graphical interface.
Wherein the acquisition unit 40 includes:
And the second acquisition subunit is used for acquiring the service data input by the user through the touch screen operation graphical interface.
In an embodiment of the present invention, referring to fig. 6, the apparatus for generating a jenkins code file further includes:
the correcting unit 50 is configured to perform preset check rule processing on the acquired service data to obtain service check data;
correspondingly, the parsing unit 10 includes:
and the analysis subunit is used for determining the target pipeline component corresponding to the service verification data and analyzing the service verification data to obtain parameter data.
The embodiment of the device for generating a jenkins code file provided by the present invention may be specifically used to execute the processing flow of the embodiment of the method for generating a jenkins code file in the above embodiment, and the functions of the device are not described herein again, and reference may be made to the detailed description of the method embodiment.
as can be seen from the above description, the device for generating a jenkins code file according to the embodiment of the present invention obtains parameter data by determining a target pipeline component corresponding to the obtained service data and analyzing the service data; each target flow assembly corresponds to different assembly frames respectively; generating jenkins script flow frames according to the component frames corresponding to the target flow components; the parameter data are filled into the jenkins script flow frame to obtain jenkins code files, so that the workload of a code writer can be greatly reduced, the problem of artificial introduction can be effectively avoided, the development process of the whole software project is smoother, and the later dimension difficulty is reduced; and the development quality and efficiency of the software project can be greatly improved, and the competitiveness of the software product is improved.
The application provides an embodiment of an electronic device for implementing all or part of contents in the method for generating a jenkins code file, where the electronic device specifically includes the following contents:
a processor (processor), a memory (memory), a communication Interface (Communications Interface), and a bus; the processor, the memory and the communication interface complete mutual communication through the bus; the communication interface is used for realizing information transmission between related devices; the electronic device may be a desktop computer, a tablet computer, a mobile terminal, and the like, but the embodiment is not limited thereto. In this embodiment, the electronic device may be implemented by referring to an embodiment of the method and an embodiment of the apparatus for generating a jenkins code file, which are incorporated herein, and repeated details are not repeated herein.
fig. 7 is a schematic block diagram of a system configuration of an electronic device 9600 according to an embodiment of the present application. As shown in fig. 7, the electronic device 9600 can include a central processor 9100 and a memory 9140; the memory 9140 is coupled to the central processor 9100. Notably, this fig. 7 is exemplary; other types of structures may also be used in addition to or in place of the structure to implement telecommunications or other functions.
In one embodiment, the function of generating jenkins code files may be integrated into the central processor 9100. The central processor 9100 may be configured to control as follows: determining a target flow assembly corresponding to the obtained service data, and analyzing the service data to obtain parameter data; each target flow assembly corresponds to different assembly frames respectively; generating jenkins script flow frames according to the component frames corresponding to the target flow components; and filling the parameter data into the jenkins script flow frame to obtain a jenkins code file.
as can be seen from the above description, in the electronic device provided in the embodiment of the present application, parameter data is obtained by determining a target pipeline component corresponding to acquired service data and analyzing the service data; each target flow assembly corresponds to different assembly frames respectively; generating jenkins script flow frames according to the component frames corresponding to the target flow components; the parameter data are filled into the jenkins script flow frame to obtain jenkins code files, so that the workload of a code writer can be greatly reduced, the problem of artificial introduction can be effectively avoided, the development process of the whole software project is smoother, and the later dimension difficulty is reduced; and the development quality and efficiency of the software project can be greatly improved, and the competitiveness of the software product is improved.
in another embodiment, the jenkins code file generation device may be configured separately from the central processor 9100, for example, the jenkins code file generation device may be configured as a chip connected to the central processor 9100, and the jenkins code file generation function is realized by the control of the central processor.
As shown in fig. 7, the electronic device 9600 may further include: a communication module 9110, an input unit 9120, an audio processor 9130, a display 9160, and a power supply 9170. It is noted that the electronic device 9600 also does not necessarily include all of the components shown in fig. 7; further, the electronic device 9600 may further include components not shown in fig. 7, which may be referred to in the art.
as shown in fig. 7, a central processor 9100, sometimes referred to as a controller or operational control, can include a microprocessor or other processor device and/or logic device, which central processor 9100 receives input and controls the operation of the various components of the electronic device 9600.
The memory 9140 can be, for example, one or more of a buffer, a flash memory, a hard drive, a removable media, a volatile memory, a non-volatile memory, or other suitable device. The information relating to the failure may be stored, and a program for executing the information may be stored. And the central processing unit 9100 can execute the program stored in the memory 9140 to realize information storage or processing, or the like.
the input unit 9120 provides input to the central processor 9100. The input unit 9120 is, for example, a key or a touch input device. Power supply 9170 is used to provide power to electronic device 9600. The display 9160 is used for displaying display objects such as images and characters. The display may be, for example, an LCD display, but is not limited thereto.
The memory 9140 can be a solid state memory, e.g., Read Only Memory (ROM), Random Access Memory (RAM), a SIM card, or the like. There may also be a memory that holds information even when power is off, can be selectively erased, and is provided with more data, an example of which is sometimes called an EPROM or the like. The memory 9140 could also be some other type of device. Memory 9140 includes a buffer memory 9141 (sometimes referred to as a buffer). The memory 9140 may include an application/function storage portion 9142, the application/function storage portion 9142 being used for storing application programs and function programs or for executing a flow of operations of the electronic device 9600 by the central processor 9100.
The memory 9140 can also include a data store 9143, the data store 9143 being used to store data, such as contacts, digital data, pictures, sounds, and/or any other data used by an electronic device. The driver storage portion 9144 of the memory 9140 may include various drivers for the electronic device for communication functions and/or for performing other functions of the electronic device (e.g., messaging applications, contact book applications, etc.).
The communication module 9110 is a transmitter/receiver 9110 that transmits and receives signals via an antenna 9111. The communication module (transmitter/receiver) 9110 is coupled to the central processor 9100 to provide input signals and receive output signals, which may be the same as in the case of a conventional mobile communication terminal.
Based on different communication technologies, a plurality of communication modules 9110, such as a cellular network module, a bluetooth module, and/or a wireless local area network module, may be provided in the same electronic device. The communication module (transmitter/receiver) 9110 is also coupled to a speaker 9131 and a microphone 9132 via an audio processor 9130 to provide audio output via the speaker 9131 and receive audio input from the microphone 9132, thereby implementing ordinary telecommunications functions. The audio processor 9130 may include any suitable buffers, decoders, amplifiers and so forth. In addition, the audio processor 9130 is also coupled to the central processor 9100, thereby enabling recording locally through the microphone 9132 and enabling locally stored sounds to be played through the speaker 9131.
An embodiment of the present invention further provides a computer-readable storage medium capable of implementing all the steps in the method for generating a jenkins code file in the foregoing embodiment, where the computer-readable storage medium stores a computer program, and the computer program implements all the steps of the method for generating a jenkins code file in the foregoing embodiment when being executed by a processor, for example, the processor implements the following steps when executing the computer program: determining a target flow assembly corresponding to the obtained service data, and analyzing the service data to obtain parameter data; each target flow assembly corresponds to different assembly frames respectively; generating jenkins script flow frames according to the component frames corresponding to the target flow components; and filling the parameter data into the jenkins script flow frame to obtain a jenkins code file.
as can be seen from the above description, in the computer-readable storage medium provided in the embodiment of the present invention, parameter data is obtained by determining a target pipeline component corresponding to acquired service data and analyzing the service data; each target flow assembly corresponds to different assembly frames respectively; generating jenkins script flow frames according to the component frames corresponding to the target flow components; the parameter data are filled into the jenkins script flow frame to obtain jenkins code files, so that the workload of a code writer can be greatly reduced, the problem of artificial introduction can be effectively avoided, the development process of the whole software project is smoother, and the later dimension difficulty is reduced; and the development quality and efficiency of the software project can be greatly improved, and the competitiveness of the software product is improved.
Although the present invention provides method steps as described in the examples or flowcharts, more or fewer steps may be included based on routine or non-inventive labor. The order of steps recited in the embodiments is merely one manner of performing the steps in a multitude of orders and does not represent the only order of execution. When an actual apparatus or client product executes, it may execute sequentially or in parallel (e.g., in the context of parallel processors or multi-threaded processing) according to the embodiments or methods shown in the figures.
As will be appreciated by one skilled in the art, embodiments of the present description may be provided as a method, apparatus (system) or computer program product. Accordingly, embodiments of the present description may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
these computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
The embodiments in the present specification are described in a progressive manner, and the same and similar parts among the embodiments are referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, for the system embodiment, since it is substantially similar to the method embodiment, the description is simple, and for the relevant points, reference may be made to the partial description of the method embodiment. In this document, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. The terms "upper", "lower", and the like, indicate orientations or positional relationships based on the orientations or positional relationships shown in the drawings, and are only for convenience in describing the present invention and simplifying the description, but do not indicate or imply that the referred devices or elements must have a specific orientation, be constructed and operated in a specific orientation, and thus, should not be construed as limiting the present invention. Unless expressly stated or limited otherwise, the terms "mounted," "connected," and "connected" are intended to be inclusive and mean, for example, that they may be fixedly connected, detachably connected, or integrally connected; can be mechanically or electrically connected; they may be connected directly or indirectly through intervening media, or they may be interconnected between two elements. The specific meanings of the above terms in the present invention can be understood by those skilled in the art according to specific situations. It should be noted that the embodiments and features of the embodiments may be combined with each other without conflict. The present invention is not limited to any single aspect, nor is it limited to any single embodiment, nor is it limited to any combination and/or permutation of these aspects and/or embodiments. Moreover, each aspect and/or embodiment of the present invention may be utilized alone or in combination with one or more other aspects and/or embodiments thereof.
Finally, it should be noted that: the above embodiments are only used to illustrate the technical solution of the present invention, and not to limit the same; while the invention has been described in detail and with reference to the foregoing embodiments, it will be understood by those skilled in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some or all of the technical features may be equivalently replaced; such modifications and substitutions do not depart from the spirit and scope of the present invention, and they should be construed as being included in the following claims and description.

Claims (16)

1. a method for generating jenkins code files is characterized by comprising the following steps:
determining a target flow assembly corresponding to the obtained service data, and analyzing the service data to obtain parameter data; each target flow assembly corresponds to different assembly frames respectively;
Generating jenkins script flow frames according to the component frames corresponding to the target flow components;
and filling the parameter data into the jenkins script flow frame to obtain a jenkins code file.
2. The method for generating a jenkins code file according to claim 1, wherein before determining the target pipeline component corresponding to the pre-obtained service data, the method further comprises:
And acquiring service data input by a user through a graphical interface.
3. The method for generating a jenkins code file according to claim 1, wherein before determining the target pipeline component corresponding to the pre-obtained service data, the method further comprises:
Processing the acquired service data by a preset check rule to obtain service check data;
correspondingly, the determining the target pipeline component corresponding to the obtained service data and analyzing the service data to obtain parameter data includes:
And determining a target flow assembly corresponding to the service verification data and analyzing the service verification data to obtain parameter data.
4. The method for generating the jenkins code file according to claim 3, wherein the preset check rule comprises: a compliance check and/or an integrity check.
5. the method for generating a jenkins code file according to claim 2, wherein the step of obtaining the service data input by the user through the graphical interface comprises:
and acquiring service data input by a user through a mouse and/or keyboard operation graphical interface.
6. the method for generating a jenkins code file according to claim 2, wherein the step of obtaining the service data input by the user through the graphical interface comprises:
And acquiring service data input by a user through a touch screen operation graphical interface.
7. The method of generating a jenkins code file in accordance with claim 1, wherein the type of said target pipeline component comprises: at least one of a source code library type, a compilation type, a deployment type, an automation test type, and a code scan type.
8. a device for generating jenkins code files is characterized by comprising the following components:
The analysis unit is used for determining a target pipeline component corresponding to the acquired service data and analyzing the service data to obtain parameter data; each target flow assembly corresponds to different assembly frames respectively;
the flow frame unit is used for generating jenkins script flow frames according to each component frame corresponding to the target flow components;
And the generating unit is used for filling the parameter data into the jenkins script flow frame to obtain a jenkins code file.
9. The apparatus for generating jenkins code file according to claim 8, further comprising:
And the acquisition unit is used for acquiring the service data input by the user through the graphical interface.
10. the apparatus for generating jenkins code file according to claim 8, further comprising:
the correction unit is used for processing the acquired service data according to the preset check rule to obtain service check data;
correspondingly, the parsing unit includes:
And the analysis subunit is used for determining the target pipeline component corresponding to the service verification data and analyzing the service verification data to obtain parameter data.
11. The device for generating a jenkins code file according to claim 10, wherein the preset check rule comprises: a compliance check and/or an integrity check.
12. The device for generating the jenkins code file according to claim 9, wherein the collecting unit comprises:
and the first acquisition subunit is used for acquiring the service data input by the user through a mouse and/or keyboard operation graphical interface.
13. The device for generating the jenkins code file according to claim 9, wherein the collecting unit comprises:
and the second acquisition subunit is used for acquiring the service data input by the user through the touch screen operation graphical interface.
14. The apparatus for generating jenkins code file of claim 8, wherein the type of target pipeline component comprises: at least one of a source code library type, a compilation type, a deployment type, an automation test type, and a code scan type.
15. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the steps of the method for generating a jenkins code file according to any one of claims 1 to 7 are implemented by the processor when executing the program.
16. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the method for generating a jenkins code file according to any one of claims 1 to 7.
CN201910841679.XA 2019-09-06 2019-09-06 Method and device for generating jenkins code file Active CN110543301B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910841679.XA CN110543301B (en) 2019-09-06 2019-09-06 Method and device for generating jenkins code file

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910841679.XA CN110543301B (en) 2019-09-06 2019-09-06 Method and device for generating jenkins code file

Publications (2)

Publication Number Publication Date
CN110543301A true CN110543301A (en) 2019-12-06
CN110543301B CN110543301B (en) 2023-04-25

Family

ID=68712729

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910841679.XA Active CN110543301B (en) 2019-09-06 2019-09-06 Method and device for generating jenkins code file

Country Status (1)

Country Link
CN (1) CN110543301B (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111581076A (en) * 2020-03-30 2020-08-25 平安科技(深圳)有限公司 System code testing method and device, computer equipment and storage medium
CN111722842A (en) * 2020-05-29 2020-09-29 北京宝兰德软件股份有限公司 Pipeline arranging method and device, electronic equipment and storage medium
CN111783400A (en) * 2020-06-30 2020-10-16 中国工商银行股份有限公司 Jenkins job generation method and system based on customizable template
CN114047934A (en) * 2021-10-29 2022-02-15 平安养老保险股份有限公司 Code deployment method, device, equipment and medium based on Jenkins
CN115576593A (en) * 2022-12-12 2023-01-06 广州市易鸿智能装备有限公司 Industrial interconnection software operation method and device, electronic equipment and storage medium
CN117555626A (en) * 2023-11-29 2024-02-13 沐曦集成电路(上海)有限公司 Jenkins-based hardware testing method, electronic equipment and medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105608012A (en) * 2016-03-10 2016-05-25 武汉斗鱼网络科技有限公司 Automatic test method and automatic test system
CN106469068A (en) * 2015-08-14 2017-03-01 中国移动通信集团安徽有限公司 The dispositions method of application program and system
CN108279882A (en) * 2018-02-12 2018-07-13 百度在线网络技术(北京)有限公司 Skeleton generating method, device, equipment and computer-readable medium
CN109408400A (en) * 2018-12-25 2019-03-01 欧普照明股份有限公司 A kind of software code automatic test approach and test macro
CN109783084A (en) * 2019-01-18 2019-05-21 广州思坦德计算机信息科技有限公司 A kind of computer code automatic generation method, system, device and storage medium
WO2019113216A1 (en) * 2017-12-05 2019-06-13 Agile Stacks Inc. Machine generated automation code for software development and infrastructure operations

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106469068A (en) * 2015-08-14 2017-03-01 中国移动通信集团安徽有限公司 The dispositions method of application program and system
CN105608012A (en) * 2016-03-10 2016-05-25 武汉斗鱼网络科技有限公司 Automatic test method and automatic test system
WO2019113216A1 (en) * 2017-12-05 2019-06-13 Agile Stacks Inc. Machine generated automation code for software development and infrastructure operations
CN108279882A (en) * 2018-02-12 2018-07-13 百度在线网络技术(北京)有限公司 Skeleton generating method, device, equipment and computer-readable medium
CN109408400A (en) * 2018-12-25 2019-03-01 欧普照明股份有限公司 A kind of software code automatic test approach and test macro
CN109783084A (en) * 2019-01-18 2019-05-21 广州思坦德计算机信息科技有限公司 A kind of computer code automatic generation method, system, device and storage medium

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111581076A (en) * 2020-03-30 2020-08-25 平安科技(深圳)有限公司 System code testing method and device, computer equipment and storage medium
CN111722842A (en) * 2020-05-29 2020-09-29 北京宝兰德软件股份有限公司 Pipeline arranging method and device, electronic equipment and storage medium
CN111783400A (en) * 2020-06-30 2020-10-16 中国工商银行股份有限公司 Jenkins job generation method and system based on customizable template
CN114047934A (en) * 2021-10-29 2022-02-15 平安养老保险股份有限公司 Code deployment method, device, equipment and medium based on Jenkins
CN115576593A (en) * 2022-12-12 2023-01-06 广州市易鸿智能装备有限公司 Industrial interconnection software operation method and device, electronic equipment and storage medium
CN117555626A (en) * 2023-11-29 2024-02-13 沐曦集成电路(上海)有限公司 Jenkins-based hardware testing method, electronic equipment and medium

Also Published As

Publication number Publication date
CN110543301B (en) 2023-04-25

Similar Documents

Publication Publication Date Title
CN110543301B (en) Method and device for generating jenkins code file
US8533691B2 (en) Managing non-common features for program code translation
CN101383871B (en) Network element configuration implementing method and apparatus
CN112783793B (en) Automatic interface test system and method
CN111414302A (en) Static code quality analysis method and computing device for continuous integration process
CN107451112B (en) Form tool data checking method, device, terminal equipment and storage medium
CN112988601A (en) Test script development method and device
CN110990274B (en) Data processing method, device and system for generating test cases
CN113139373B (en) Method, system and equipment for generating financial evidence based on dynamic modeling
US20180275957A1 (en) Assistive technology for code generation using voice and virtual reality
CN107341106A (en) Application compatibility detection method, exploitation terminal and storage medium
CN110990222B (en) Cross-platform graphical operation monitoring method and device based on mainframe
CN101136780A (en) Method, system to obtain user command information, and user command registered device
CN112328257A (en) Code conversion method and device
CN111625294A (en) Server project execution method, device and related equipment
CN105022635A (en) Algorithm file generating method and apparatus based on cloud platform and cloud platform
CN115630835A (en) Activity-based workflow general parameter configuration method and system
CN113746840A (en) JSON format message generation method and device
CN113190229A (en) Method and device for generating government affair page
CN110874316B (en) Method, device and system for scanning codes
CN110737426A (en) Program block creating method, program block creating device, computer equipment and storage medium
US8615744B2 (en) Methods and system for managing assets in programming code translation
CN113157590B (en) Test case generation method and device
CN116150029A (en) Automatic overdue batch testing method and device for loan system
CN116107557A (en) Page visual development method and device, storage medium and electronic equipment

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