CN112905225A - Method and device for creating continuous integration tool construction task - Google Patents

Method and device for creating continuous integration tool construction task Download PDF

Info

Publication number
CN112905225A
CN112905225A CN201911227784.0A CN201911227784A CN112905225A CN 112905225 A CN112905225 A CN 112905225A CN 201911227784 A CN201911227784 A CN 201911227784A CN 112905225 A CN112905225 A CN 112905225A
Authority
CN
China
Prior art keywords
task
construction
integration tool
configuration
configuration file
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201911227784.0A
Other languages
Chinese (zh)
Inventor
魏振果
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Jingdong Century Trading Co Ltd
Beijing Jingdong Shangke Information Technology Co Ltd
Original Assignee
Beijing Jingdong Century Trading Co Ltd
Beijing Jingdong Shangke Information Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Jingdong Century Trading Co Ltd, Beijing Jingdong Shangke Information Technology Co Ltd filed Critical Beijing Jingdong Century Trading Co Ltd
Priority to CN201911227784.0A priority Critical patent/CN112905225A/en
Publication of CN112905225A publication Critical patent/CN112905225A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/71Version control; Configuration management
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • G06F8/31Programming languages or programming paradigms
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44505Configuring for program initiating, e.g. using registry, configuration files
    • G06F9/4451User profiles; Roaming

Landscapes

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

Abstract

The invention discloses a method and a device for creating a continuous integration tool construction task, and relates to the technical field of computers. One embodiment of the method comprises: reading a configuration template of a construction task; dynamically replacing placeholders of module names in the configuration template with task names of construction tasks to generate a second configuration file; and creating a continuous integration tool construction task according to the second configuration file. According to the implementation mode, the technical means of dynamically replacing the configuration template is adopted, the continuous integration tool building task is built, the problems of large workload and high cost when a large number of continuous integration tool building tasks are built are solved, and the efficiency of building the continuous integration tool building task is improved.

Description

Method and device for creating continuous integration tool construction task
Technical Field
The invention relates to the technical field of computers, in particular to a method and a device for creating a continuous integration tool construction task.
Background
Continuous integration tools (Jenkins) are very important tools in project development, can provide automatic construction and deployment, and provide a convenient way for continuous integration and delivery of software. Using a persistent integration tool typically requires manual creation of a build task (Job) first, configuring the execution parameters on a configuration page, and some execution commands that may be involved in the middle. And then when the packaging is needed, the packaging process can be automatically completed only by clicking the construction. If the packaging requirement of the continuous integration tool changes, the corresponding task needs to be found, and then the configuration page is entered to manually modify the configuration.
In the process of implementing the invention, the inventor finds that at least the following problems exist in the prior art:
when the number of tasks is large, the manual modification and maintenance work is too much and too costly in the existing manner, whether creating the tasks or modifying the configuration of the persistent integration tool.
Disclosure of Invention
In view of this, embodiments of the present invention provide a method and an apparatus for creating persistent integration tool build tasks, which can solve the problems of too large workload and too high cost when creating a large number of persistent integration tool build tasks.
To achieve the above object, according to an aspect of an embodiment of the present invention, there is provided a method of creating a persistent integration tool build task, including: reading a configuration template of a construction task; dynamically replacing placeholders of module names in the configuration template with task names of construction tasks to generate a second configuration file; and creating a continuous integration tool construction task according to the second configuration file.
Optionally, the method further comprises: and creating a continuous integration tool construction task by using a presentation layer state conversion interface of the continuous integration tool.
Optionally, before reading the configuration template of the build task, the method further includes: reading a first configuration file of the construction task; globally replacing the module name in the first configuration file with a placeholder of the module name to generate a configuration template of the construction task;
optionally, the method further comprises: reading all construction tasks in the continuous integration tool to form a construction task array; traversing the construction task array, reading a second configuration file of each construction task, modifying the configuration information in the second configuration file, and updating the configuration information of the construction task according to the modified second configuration file; until all the build task updates are completed.
To achieve the above object, according to an aspect of an embodiment of the present invention, there is provided an apparatus for creating a persistent integration tool build task, including: a reading module to: reading a configuration template of a construction task; a replacement module to: dynamically replacing placeholders of module names in the configuration template with task names of construction tasks to generate a second configuration file; a create task module to: and creating a continuous integration tool construction task according to the second configuration file.
Optionally, the creating task module is further configured to: and creating a continuous integration tool construction task by using a presentation layer state conversion interface of the continuous integration tool.
Optionally, the apparatus further comprises a create template module configured to: reading a first configuration file of the construction task; globally replacing the module name in the first configuration file with a placeholder of the module name to generate the configuration template of the construction task.
Optionally, the apparatus further comprises a modification module configured to: reading all construction tasks in the continuous integration tool to form a construction task array; traversing the construction task array, and aiming at each construction task: reading a second configuration file of the construction task, modifying the configuration information in the second configuration file, and updating the configuration information of the construction task according to the modified second configuration file; until all the build task updates are completed.
To achieve the above object, according to an aspect of an embodiment of the present invention, there is provided an electronic apparatus including: one or more processors; the storage device is used for storing one or more programs, and when the one or more programs are executed by the one or more processors, the one or more processors implement the method for creating the persistent integration tool construction task and/or modifying the configuration of the persistent integration tool, which is provided by the embodiment of the invention.
To achieve the above object, according to an aspect of the embodiments of the present invention, a computer readable medium is provided, on which a computer program is stored, and the program, when executed by a processor, implements the method for creating persistent integration tool build tasks and/or modifying persistent integration tool configuration provided by the embodiments of the present invention.
One embodiment of the above invention has the following advantages or benefits: the technical means of dynamically replacing the configuration template is adopted to realize the establishment of the continuous integration tool construction tasks, solve the problems of too large workload and too high cost when a large number of continuous integration tool construction tasks are established, and improve the efficiency of establishing the continuous integration tool construction tasks.
Further effects of the above-mentioned non-conventional alternatives will be described below in connection with the embodiments.
Drawings
The drawings are included to provide a better understanding of the invention and are not to be construed as unduly limiting the invention. Wherein:
FIG. 1 is a schematic diagram of a basic flow of a method of creating a persistent integration tool build task according to an embodiment of the present invention;
FIG. 2 is a schematic diagram of the basic modules of a device for creating persistent integration tool build tasks according to an embodiment of the present invention;
FIG. 3 is a schematic illustration of a preferred flow of a method of creating a persistent integration tool build task according to an embodiment of the present invention;
FIG. 4 is a schematic diagram of a flow of a method of batch modifying configuration information for a persistent integration tool build task according to an embodiment of the invention;
FIG. 5 is an exemplary system architecture diagram in which embodiments of the present invention may be employed;
fig. 6 is a schematic block diagram of a computer system suitable for use in implementing a terminal device or server of an embodiment of the invention.
Detailed Description
Exemplary embodiments of the present invention are described below with reference to the accompanying drawings, in which various details of embodiments of the invention are included to assist understanding, and which are to be considered as merely exemplary. Accordingly, those of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope and spirit of the invention. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness.
Technical wording is explained as follows:
presentation layer state translation interface (REST API) for persistent integration tools: the continuous integration tool provides a series of interfaces which can acquire information, trigger construction and operate tasks.
Python-Jenkins: a Python library of a presentation layer state conversion interface of a continuous integration tool can be simply and conveniently operated.
ReactNative: the open-source cross-platform mobile application development framework can realize that the same set of JS codes can run on android and IOS.
The specific steps of manually creating the task are as follows: and accessing the home page of the built continuous integration tool server, and clicking 'new'. Inputting the task name, selecting the task type according to project requirements (or selecting to copy from the existing task), and then clicking to determine. And performing detailed configuration on the newly-built task, such as adding a git (git is an open source distributed version control system) warehouse address, specifying operations before and after construction, adding a shell command, specifying an email contact sent after an error and the like. After all the configurations are filled, clicking to save, and the task is successfully created. The "build immediately" button below the task may then be clicked to perform a build operation.
Taking an application program developed by using ReactNative as an example at present, generally, when the function of the application program is complex and the number of modules is large, a mode of packaging modules is adopted to facilitate management and distributed development. When the number of modules of the application program is large, the creation and modification operations of a plurality of continuous integration tool tasks are involved, and the packaged commands of the android and IOS platforms are different, so that each service also creates two tasks of the android and the IOS.
If the number of tasks that need to be created or modified is very large, the labor cost of manually modifying the configuration can be significant.
FIG. 1 is a schematic diagram of a basic flow of a method of creating a persistent integration tool build task according to an embodiment of the present invention. As shown in fig. 1, an embodiment of the present invention provides a method for creating a persistent integration tool build task, including:
s101, reading a configuration template of a construction task;
s102, dynamically replacing placeholders of module names in the configuration template with task names of construction tasks to generate a second configuration file;
and S103, creating a continuous integration tool construction task according to the second configuration file.
When a new task is created by using a script, the replaced configuration template is read out from the configuration template, and then a Python character string place method can be used to dynamically replace a placeholder (for example, "$ MODULE _ NAME") of a MODULE NAME with a task NAME of the constructed task. The invention adopts the technical means of dynamically replacing the configuration template, can realize the establishment of the continuous integration tool construction task, and solves the problems of too large workload and too high cost when a large number of continuous integration tool construction tasks are established, thereby improving the efficiency of establishing the continuous integration tool construction task.
In the embodiment of the present invention, the method further includes: and operating a presentation layer state conversion interface of the continuous integration tool by using Python-Jenkins to create a continuous integration tool construction task. That is, the automatic creation of the persistent integration tool build task with the script can be achieved using the presentation layer state transformation interface of the persistent integration tool. Therefore, the method and the device can solve the problems of too large workload and too high cost when a large number of continuous integration tool construction tasks are created, and improve the efficiency of creating the continuous integration tool construction tasks.
In the embodiment of the present invention, the method further includes: reading a first configuration file of the construction task by using a reading configuration instruction in Python-Jenkins; globally replacing the module name in the first configuration file with a placeholder of the module name to generate the configuration template of the construction task. Global replacement is the replacement of the first configuration file (xml file) read, the effect is to change the content of the configuration file to make a template. It differs from dynamic replacement by: the global replacement is the operation on the file, only needs one time, and the template file is manufactured for subsequent dynamic replacement and reading. Dynamic replacement is an operation on a string (placeholder), which occurs in memory and is performed each time a new task is created. The configuration template is used for reading and dynamically replacing to generate a new configuration file when the task is created, and the task creating function creates a construction task according to the new configuration file. Global replacement is the production of templates, while dynamic replacement is the replacement that needs to be done each time a new task is created.
In an embodiment of the present invention, creating a persistent integration tool construction task according to the second configuration file includes: and creating a construction task of the continuous integration tool according to the second configuration file by using a task creating instruction in Python-Jenkins. Therefore, the embodiment of the invention realizes the automatic establishment of the construction tasks of the continuous integration tools by the scripts, solves the problems of too large workload and too high cost when establishing a large number of construction tasks of the continuous integration tools, and improves the efficiency of establishing the construction tasks of the continuous integration tools.
In the embodiment of the present invention, the method further includes: reading all construction tasks in the continuous integration tool to form a construction task array; traversing the construction task array, and aiming at each construction task: reading a second configuration file of the construction task; and modifying the second configuration file according to the project requirement, and updating the configuration information of the construction task. Therefore, the embodiment of the invention realizes batch modification of the construction tasks by traversing the construction task array, thereby greatly saving the labor cost.
In the embodiment of the present invention, reading all the construction tasks in the persistent integration tool to form a construction task list, including: reading all construction tasks in the continuous integration tool by using a task reading instruction in Python-Jenkins, and forming a construction task array by using the read construction tasks; and/or reading a second configuration file of the construction task, including: reading a second configuration file of the construction task by using a reading configuration instruction in Python-Jenkins; and/or updating configuration information of the construction task, including: and updating the modified second configuration file to the continuous integration tool by using an updating configuration instruction in Python-Jenkins. Through the circulation statement of the Python script, the automatic batch modification of the continuous integrated tool configuration is realized, the labor cost is greatly saved, and the efficiency of modifying the continuous integrated tool configuration is improved.
FIG. 2 is a schematic diagram of the basic modules of a device for creating persistent integration tool build tasks according to an embodiment of the present invention. As shown in fig. 2, an embodiment of the present invention provides an apparatus for creating a persistent integration tool build task, including: a reading module 201, configured to: reading a configuration template of a construction task; a replacement module 202 for: dynamically replacing placeholders of module names in the configuration template with task names of construction tasks to generate a second configuration file; a create task module 203 for: and creating a continuous integration tool construction task according to the second configuration file. The technical means of dynamically replacing the configuration template is adopted to realize the establishment of the continuous integration tool construction task, solve the problems of large workload and high cost when a large number of continuous integration tool construction tasks are established, and improve the efficiency of establishing the continuous integration tool construction task.
In this embodiment of the present invention, the creating task module 203 is further configured to: and operating a presentation layer state conversion interface of the continuous integration tool by using Python-Jenkins to create a continuous integration tool construction task. That is, the automatic creation of the persistent integration tool build task with the script can be achieved using the presentation layer state transformation interface of the persistent integration tool. Therefore, the method and the device can solve the problems of too large workload and too high cost when a large number of continuous integration tool construction tasks are created, and improve the efficiency of creating the continuous integration tool construction tasks.
In this embodiment of the present invention, the apparatus further includes a template creation module, configured to: reading a first configuration file of the construction task by using a reading configuration instruction in Python-Jenkins; globally replacing the module name in the first configuration file with a placeholder of the module name to generate the configuration template of the construction task. Global replacement is the replacement of the first configuration file (xml file) read, the effect is to change the content of the configuration file to make a template. It differs from dynamic replacement by: the global replacement is the operation on the file, only needs one time, and the template file is manufactured for subsequent dynamic replacement and reading. Dynamic replacement is an operation on a character string (placeholder), occurs in a memory, and is executed each time a new task is created.
In this embodiment of the present invention, the creating task module 203 is further configured to: and creating a continuous integration tool construction task according to the second configuration file by using a task creation instruction in Python-Jenkins. Therefore, the embodiment of the invention realizes the automatic establishment of the continuous integration tool construction tasks by the script, solves the problems of large workload and high cost when establishing a large number of continuous integration tool construction tasks, and improves the efficiency of establishing the continuous integration tool construction tasks.
In an embodiment of the present invention, the apparatus further includes a modification module, configured to: reading all construction tasks in the continuous integration tool to form a construction task array; traversing the construction task array, and reading a second configuration file of each construction task; and modifying the second configuration file according to the project requirement, and updating the configuration information of the construction task. Therefore, the embodiment of the invention realizes batch modification of the construction tasks by traversing the construction task array, thereby greatly saving the labor cost.
In the embodiment of the present invention, the modification module is further configured to: reading all construction tasks in the continuous integration tool by using a task reading instruction in Python-Jenkins, and forming a construction task array by using the read construction tasks; and/or reading a configuration instruction by using Python-Jenkins, and reading a second configuration file of the construction task; and/or updating the modified second configuration file to the continuous integration tool by utilizing an updating configuration instruction in Python-Jenkins. Therefore, the method realizes automatic batch modification of the configuration of the continuous integration tool through the circulation statement of the Python script, greatly saves the labor cost and improves the efficiency of modifying the Jenkins configuration of the continuous integration tool.
FIG. 3 is a schematic diagram of a preferred flow of a method of creating a persistent integration tool build task according to an embodiment of the present invention. As shown in FIG. 3, the configuration files of the android and IOS tasks corresponding to the module1 are read from the continuous integration tool server and made into a template. Preferably, the task configuration is read by the get _ jobconfig (jobname) method of Python-Jenkins. Taking the configuration file of the task of the IOS version as an example, the flow is as follows:
reading the build task configuration file for the IOS version of module 1;
opening the template file of the configuration file in a writable mode; (if the template file does not exist, the template file is created).
The script has the function of reading the configuration of the task and making a configuration module file. The second line means that a real _ native _ ios _ template. xml file is opened, and if the file does not exist, the file is created.
The "MODULE 1" in the read xml configuration file is globally replaced with the MODULE NAME placeholder "$ MODULE _ NAME", making the configuration template as shown below.
Figure BDA0002302710320000091
After the configuration template is prepared, a create _ job method is called to sequentially create 2 tasks (creating tasks for android and IOS respectively) corresponding to each service, and before each task is created, "$ MODULE _ NAME" in the configuration template is dynamically replaced by the NAME of the construction task. The process is as follows:
opening the template file in a read-only mode;
and dynamically replacing the placeholders in the template file by using the specific template names, and creating the construction task by using the task creating instruction after the replacement is finished.
The script is a task created after dynamically replacing the template with the required configuration. The template file is opened in a read-only mode, since here only the configuration needs to be read, no operation for writing the file is required.
Compared with the creation of new tasks, the manual workload of batch modification is larger and is in proportion to the number of tasks, so that the automatic implementation is more meaningful. The embodiment of the invention can realize the batch modification of the configuration of the continuous integration tool by using the automatic script. FIG. 4 is a schematic diagram of a flow of a method of batch modifying configuration information for a persistent integration tool build task according to an embodiment of the invention; as shown in FIG. 4, all task lists on the persistent integration tool are fetched using a fetch task instruction. And traversing the task array, reading the current configuration information of each task by reading the configuration instruction, and modifying the read configuration information according to a certain rule according to a specific project requirement (for example, the project needs to switch all npm install commands in the configuration to "yann install", and the read configuration can be replaced by character strings). The example given here is to perform the same modification operation for each task of the entire task array. If the different task modification policies are different, the script can be modified, for example, by performing differentiation processing using if statements, that is, selecting a modification policy for different situations. Task configuration modifications that distinguish between android and IOS may be determined according to project specific requirements, the example here does not distinguish between the two platforms. If the two platforms need to be processed in a distinguishing way, the script can be modified, the platform is judged by using the if statement, and then different processing is carried out.
And finally, calling an update configuration instruction to update the modified configuration information to the continuous integration tool server. The process is as follows:
traversing the task array, and executing the following instructions for each task in the array;
acquiring the name of a task;
reading a configuration file of the task according to the name of the task;
replacing 'npn install' in the configuration file with 'horn install', and replacing the original configuration file with the replaced configuration file;
the name of the output task + 'update success'.
Through the circulation statement of the Python script, the batch modification of the continuous integrated tool task is realized, and the labor cost is greatly saved.
FIG. 5 illustrates an exemplary system architecture 500 for a method of creating a persistent integration tool build task or a device for creating a persistent integration tool build task to which embodiments of the present invention may be applied.
As shown in fig. 5, the system architecture 500 may include a first terminal device 501, a second terminal device 502, a third terminal device 503, a network 504, and a server 506. Network 504 is used to provide a medium for communication links between first terminal device 501, second terminal device 502, third terminal device 503, and server 506. Network 504 may include various connection types, such as wired, wireless communication links, or fiber optic cables, to name a few.
A user may use a first terminal device 501, a second terminal device 502, a third terminal device 503 to interact with a server 506 over a network 504 to receive or send messages, etc. Various communication client applications, such as shopping applications, web browser applications, search applications, instant messaging tools, mailbox clients, social platform software, and the like, may be installed on the first terminal device 501, the second terminal device 502, and the third terminal device 503.
The first terminal device 501, the second terminal device 502, and the third terminal device 503 may be various electronic devices having a display screen and supporting web browsing, including but not limited to a smart phone, a tablet computer, a laptop portable computer, a desktop computer, and the like.
The server 506 may be a server that provides various services, for example, a background management server that supports a shopping website browsed by a user using the first terminal device 501, the second terminal device 502, and the third terminal device 503. The background management server can analyze and process the received data such as the product information inquiry request and feed back the processing result to the terminal equipment.
It should be noted that the method for creating the persistent integration tool build task provided by the embodiment of the present invention is generally executed by the server 506, and accordingly, a device for creating the persistent integration tool build task is generally disposed in the server 506.
It should be understood that the number of terminal devices, networks, and servers in fig. 5 is merely illustrative. There may be any number of terminal devices, networks, and servers, as desired for implementation.
The invention also provides an electronic device and a computer readable medium according to the embodiment of the invention.
The electronic device of the embodiment of the invention comprises: one or more processors; the storage device is used for storing one or more programs, and when the one or more programs are executed by the one or more processors, the one or more processors implement the method for creating the persistent integration tool construction task and/or modifying the configuration of the persistent integration tool, which is provided by the embodiment of the invention.
The computer readable medium of the embodiment of the present invention stores thereon a computer program, which when executed by a processor implements the method for creating the persistent integration tool construction task and/or modifying the configuration of the persistent integration tool provided by the embodiment of the present invention.
Referring now to FIG. 6, a block diagram of a computer system 600 suitable for use with a terminal device implementing an embodiment of the invention is shown. The terminal device shown in fig. 6 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present invention.
As shown in fig. 6, the computer system 600 includes a central processing module (CPU)601 that can perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM)602 or a program loaded from a storage section 608 into a Random Access Memory (RAM) 603. In the RAM603, various programs and data necessary for the operation of the computer system 600 are also stored. The CPU601, ROM602, and RAM603 are connected to each other via a bus 604. An input/output (I/O) interface 605 is also connected to bus 604.
The following components are connected to the I/O interface 605: an input portion 607 including a keyboard, a mouse, and the like; an output portion 607 including a display such as a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and the like, and a speaker; a storage section 608 including a hard disk and the like; and a communication section 609 including a network interface card such as a LAN card, a modem, or the like. The communication section 609 performs communication processing via a network such as the internet. The driver 610 is also connected to the I/O interface 605 as needed. A removable medium 611 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is mounted on the drive 610 as necessary, so that a computer program read out therefrom is mounted in the storage section 608 as necessary.
In particular, according to the embodiments of the present disclosure, the processes described above with reference to the flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising program code for performing the method illustrated in the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network through the communication section 609, and/or installed from the removable medium 611. The computer program performs the above-described functions defined in the system of the present invention when executed by the central processing module (CPU) 601.
It should be noted that the computer readable medium shown in the present invention can be a computer readable signal medium or a computer readable storage medium or any combination of the two. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having 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. In the present invention, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In the present invention, however, a computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, fiber optic cable, RF, etc., or any suitable combination of the foregoing.
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present invention. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams or flowchart illustration, and combinations of blocks in the block diagrams or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The modules described in the embodiments of the present invention may be implemented by software or hardware. The described modules may also be provided in a processor, which may be described as: a processor includes a read module, a replace module, and a create task module. Where the names of these modules do not in some cases constitute a limitation of the module itself, for example, a read module may also be described as a "module for reading a configuration template that constructs a task".
As another aspect, the present invention also provides a computer-readable medium that may be contained in the apparatus described in the above embodiments; or may be separate and not incorporated into the device. The computer readable medium carries one or more programs which, when executed by a device, cause the device to comprise: s101, reading a configuration template of a construction task; s102, dynamically replacing placeholders of module names in the configuration template with task names of construction tasks to generate a second configuration file; and S103, creating a continuous integration tool construction task according to the second configuration file.
According to the technical scheme of the embodiment of the invention, the technical means of dynamically replacing the configuration template is adopted to realize the establishment of the continuous integration tool construction task, so that the problems of too large workload and too high cost when a large number of continuous integration tool construction tasks are established can be solved, and the efficiency of establishing the continuous integration tool construction task is improved.
The above-described embodiments should not be construed as limiting the scope of the invention. Those skilled in the art will appreciate that various modifications, combinations, sub-combinations, and substitutions can occur, depending on design requirements and other factors. Any modification, equivalent replacement, and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims (10)

1. A method of creating a persistent integration tool build task, comprising:
reading a configuration template of a construction task;
dynamically replacing placeholders of module names in the configuration template with task names of construction tasks to generate a second configuration file;
and creating a continuous integration tool construction task according to the second configuration file.
2. The method of claim 1, further comprising:
and creating a continuous integration tool construction task by using a presentation layer state conversion interface of the continuous integration tool.
3. The method of claim 2, prior to reading the configuration template of the build task, further comprising:
reading a first configuration file of a construction task;
globally replacing the module name in the first configuration file with a placeholder of the module name to generate the configuration template of the construction task.
4. The method of claim 1, further comprising:
reading all construction tasks in the continuous integration tool to form a construction task array;
traversing the construction task array, reading a second configuration file of each construction task, modifying the configuration information in the second configuration file, and updating the configuration information of the construction task according to the modified second configuration file;
until all the build task updates are completed.
5. An apparatus for creating a persistent integration tool build task, comprising:
a reading module to: reading a configuration template of a construction task;
a replacement module to: dynamically replacing placeholders of module names in the configuration template with task names of construction tasks to generate a second configuration file;
a create task module to: and creating a continuous integration tool construction task according to the second configuration file.
6. The apparatus of claim 5, wherein the create task module is further configured to:
and creating a continuous integration tool construction task by using a presentation layer state conversion interface of the continuous integration tool.
7. The apparatus of claim 6, the apparatus further comprising a create template module to:
reading a first configuration file of the construction task;
globally replacing the module name in the first configuration file with a placeholder of the module name to generate the configuration template of the construction task.
8. The apparatus of claim 5, further comprising a modification module to:
reading all construction tasks in the continuous integration tool to form a construction task array;
traversing the construction task array, reading a second configuration file of each construction task, modifying the configuration information in the second configuration file, and updating the configuration information of the construction task according to the modified second configuration file;
until all the build task updates are completed.
9. An electronic device, comprising:
one or more processors;
a storage device for storing one or more programs,
when executed by the one or more processors, cause the one or more processors to implement the method of any one of claims 1-4.
10. A computer-readable medium, on which a computer program is stored, which, when being executed by a processor, carries out the method according to any one of claims 1-4.
CN201911227784.0A 2019-12-04 2019-12-04 Method and device for creating continuous integration tool construction task Pending CN112905225A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911227784.0A CN112905225A (en) 2019-12-04 2019-12-04 Method and device for creating continuous integration tool construction task

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911227784.0A CN112905225A (en) 2019-12-04 2019-12-04 Method and device for creating continuous integration tool construction task

Publications (1)

Publication Number Publication Date
CN112905225A true CN112905225A (en) 2021-06-04

Family

ID=76110998

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911227784.0A Pending CN112905225A (en) 2019-12-04 2019-12-04 Method and device for creating continuous integration tool construction task

Country Status (1)

Country Link
CN (1) CN112905225A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113448591A (en) * 2021-07-17 2021-09-28 绿漫科技有限公司 Method for quickly creating iOS engineering based on python
CN114661339A (en) * 2022-05-26 2022-06-24 浙江所托瑞安科技集团有限公司 Method and device for automatically submitting local data to remote server
CN114996123A (en) * 2022-05-06 2022-09-02 江苏康众汽配有限公司 Application release quality management method and system based on guarantee test

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113448591A (en) * 2021-07-17 2021-09-28 绿漫科技有限公司 Method for quickly creating iOS engineering based on python
CN114996123A (en) * 2022-05-06 2022-09-02 江苏康众汽配有限公司 Application release quality management method and system based on guarantee test
CN114661339A (en) * 2022-05-26 2022-06-24 浙江所托瑞安科技集团有限公司 Method and device for automatically submitting local data to remote server

Similar Documents

Publication Publication Date Title
CN107844324B (en) Client page jump processing method and device
US11797273B2 (en) System and method for enhancing component based development models with auto-wiring
CN110727468A (en) Method and apparatus for managing algorithm models
CN113760324A (en) Method and device for constructing micro front-end application
CN113050940A (en) Method for previewing small program, related device and computer program product
US10725795B2 (en) Systems, methods, and apparatuses for dynamic creation of an external code segment within a cloud based computing environment
CN109960212B (en) Task sending method and device
CN115237436A (en) Application deployment method and device, electronic equipment and readable storage medium
CN112905225A (en) Method and device for creating continuous integration tool construction task
CN113656005B (en) Application component library construction method, application component configuration method and related devices
CN114817146A (en) Method and device for processing data
CN112835568A (en) Project construction method and device
CN113448570A (en) Data processing method and device, electronic equipment and storage medium
US20190171989A1 (en) Dynamic Workflow Control Based on Database Logic
CN110647327B (en) Method and device for dynamic control of user interface based on card
CN112947992A (en) Method and device for managing code version
CN114756228A (en) Page processing method, device, equipment and storage medium
CN109254778B (en) Method and apparatus for deploying an information flow system
CN113779122B (en) Method and device for exporting data
CN113326079A (en) Service version switching method, switching device, electronic equipment and storage medium
CN114661274A (en) Method and device for generating intelligent contract
CN114579120A (en) Application code processing method and device, electronic equipment and storage medium
CN113342450A (en) Page processing method and device, electronic equipment and computer readable medium
US9779387B2 (en) Business-to-business document user interface and integration design
CN113095060A (en) Method, device, equipment and computer readable medium for processing data

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