CN115686640A - Pipeline information processing method, device, equipment and storage medium - Google Patents
Pipeline information processing method, device, equipment and storage medium Download PDFInfo
- Publication number
- CN115686640A CN115686640A CN202211412607.1A CN202211412607A CN115686640A CN 115686640 A CN115686640 A CN 115686640A CN 202211412607 A CN202211412607 A CN 202211412607A CN 115686640 A CN115686640 A CN 115686640A
- Authority
- CN
- China
- Prior art keywords
- target
- mirror image
- pipeline
- construction
- determining
- 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
Links
- 230000010365 information processing Effects 0.000 title claims abstract description 31
- 238000003672 processing method Methods 0.000 title claims abstract description 21
- 238000003860 storage Methods 0.000 title claims description 20
- 238000010276 construction Methods 0.000 claims abstract description 292
- 238000000034 method Methods 0.000 claims abstract description 176
- 230000008569 process Effects 0.000 claims abstract description 153
- 238000004519 manufacturing process Methods 0.000 claims abstract description 51
- 238000004458 analytical method Methods 0.000 claims description 25
- 238000004590 computer program Methods 0.000 claims description 17
- 238000012544 monitoring process Methods 0.000 claims description 4
- 238000004891 communication Methods 0.000 description 9
- 238000012545 processing Methods 0.000 description 8
- 238000010586 diagram Methods 0.000 description 5
- 238000005516 engineering process Methods 0.000 description 3
- 230000006870 function Effects 0.000 description 3
- 230000003287 optical effect Effects 0.000 description 3
- 238000011161 development Methods 0.000 description 2
- 230000003993 interaction Effects 0.000 description 2
- 238000007726 management method Methods 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 238000000275 quality assurance Methods 0.000 description 2
- 238000003491 array Methods 0.000 description 1
- 238000013473 artificial intelligence Methods 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 230000001413 cellular effect Effects 0.000 description 1
- 230000007547 defect Effects 0.000 description 1
- 230000001419 dependent effect Effects 0.000 description 1
- 238000013461 design Methods 0.000 description 1
- 238000009826 distribution Methods 0.000 description 1
- 239000011521 glass Substances 0.000 description 1
- 230000006872 improvement Effects 0.000 description 1
- 230000010354 integration Effects 0.000 description 1
- 239000004973 liquid crystal related substance Substances 0.000 description 1
- 238000010801 machine learning Methods 0.000 description 1
- 238000012423 maintenance Methods 0.000 description 1
- 238000011022 operating instruction Methods 0.000 description 1
- 239000013307 optical fiber Substances 0.000 description 1
- 230000001737 promoting effect Effects 0.000 description 1
- 239000004065 semiconductor Substances 0.000 description 1
- 230000001953 sensory effect Effects 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
- 230000000007 visual effect Effects 0.000 description 1
Images
Landscapes
- Image Generation (AREA)
Abstract
The invention discloses a pipeline information processing method, which comprises the following steps: determining a target identification and a flow line construction operation instruction of a target flow line to be constructed according to the flow line construction command, and determining whether a target construction mirror image corresponding to the target flow line is stored in a mirror image warehouse or not according to the target identification; if not, determining a pipeline compiling language according to the pipeline building command, building a target pipeline according to the pipeline compiling language and the pipeline building operation instruction, calling a target compiling environment mirror image from a mirror image warehouse, and running the target pipeline according to the target compiling environment mirror image; determining a target construction process directory according to the pipeline construction command and first operation cache information generated in the target pipeline operation process; and determining a target construction mirror image corresponding to the target assembly line according to the target identification, the target construction process directory and the target compiling environment mirror image. The compiling and constructing efficiency of the production line can be improved, and the resource utilization rate of the production line construction can be improved.
Description
Technical Field
The embodiment of the invention relates to the field of computers, in particular to a method, a device, equipment and a storage medium for processing pipeline information.
Background
At present, cloud-native technology is widely applied, which is a set of cloud technology product systems established based on technologies such as containers, micro services, and DevOps (Development Operations, software Development and operation and maintenance) and the like based on distributed deployment and unified operation and management, wherein the DevOps is a collective name of a set of processes, methods and systems and is used for promoting communication, cooperation and integration among Development (application/software engineering), technical operation and Quality Assurance (QA) departments. When a DevOps product based on a cloud native system is compiled to construct a pipeline, a container is often adopted to construct the pipeline, the used container needs to be destroyed in the construction mode, and operation cache information in the operation process of the pipeline is deleted after the pipeline is constructed, so that the pipeline is constructed each time, the pipeline is constructed in a long time, the construction efficiency is low, and the resource utilization rate is low. Therefore, how to reasonably utilize the running cache information in the running process of the production line, improve the compiling and constructing efficiency of the production line, save the construction time of the production line, and improve the resource utilization rate of the production line construction is the problem to be solved.
Disclosure of Invention
The invention provides a method, a device, equipment and a storage medium for processing pipeline information, which can improve the compiling and constructing efficiency of a pipeline, save the constructing time of the pipeline and improve the resource utilization rate of the pipeline construction.
According to an aspect of the present invention, there is provided a pipeline information processing method including:
determining a target identification and a pipeline construction operation instruction of a target pipeline to be constructed according to a pipeline construction command, and determining whether a target construction mirror image corresponding to the target pipeline is stored in a mirror image warehouse or not according to the target identification;
if the target construction mirror image corresponding to the target assembly line is not stored in the mirror image warehouse, determining an assembly line compiling language according to an assembly line construction command, and constructing the target assembly line according to the assembly line compiling language and the assembly line construction operation instruction;
calling a target compiling environment mirror image from the mirror image warehouse according to the pipeline compiling language, and operating the target pipeline according to the target compiling environment mirror image;
determining a target construction process directory according to the analysis result of the pipeline construction command and first operation cache information generated in the target pipeline operation process;
and determining a target construction mirror image corresponding to the target assembly line according to the target identification, the target construction process directory and the target compiling environment mirror image, and storing the target construction mirror image in the mirror image warehouse.
According to another aspect of the present invention, there is provided a pipeline information processing apparatus including:
the target construction mirror image query module is used for determining a target identification and a pipeline construction operation instruction of a target pipeline to be constructed according to a pipeline construction command, and determining whether a target construction mirror image corresponding to the target pipeline is stored in a mirror image warehouse or not according to the target identification;
the target pipeline building module is used for determining a pipeline compiling language according to a pipeline building command if the target pipeline building command is not received, and building a target pipeline according to the pipeline compiling language and the pipeline building operation command;
the target pipeline running module is used for calling a target compiling environment mirror image from the mirror image warehouse according to the pipeline compiling language and running the target pipeline according to the target compiling environment mirror image;
the construction process directory determining module is used for determining a target construction process directory according to the analysis result of the assembly line construction command and first operation cache information generated in the target assembly line operation process;
and the target construction mirror image determining module is used for determining a target construction mirror image corresponding to the target assembly line according to the target identification, the target construction process catalog and the target compiling environment mirror image, and storing the target construction mirror image in the mirror image warehouse.
According to another aspect of the present invention, there is provided an electronic apparatus including:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein,
the memory stores a computer program executable by the at least one processor, the computer program being executable by the at least one processor to enable the at least one processor to perform the pipeline information processing method according to any of the embodiments of the present invention.
According to another aspect of the present invention, there is provided a computer-readable storage medium storing computer instructions for causing a processor to implement the pipeline information processing method according to any one of the embodiments of the present invention when the computer instructions are executed.
According to the technical scheme of the embodiment of the invention, the target identification and the assembly line construction operation instruction of the target assembly line to be constructed are determined according to the assembly line construction command, and whether the target construction mirror image corresponding to the target assembly line is stored in the mirror image warehouse or not is determined according to the target identification; if the target construction mirror image corresponding to the target assembly line is not stored in the mirror image warehouse, determining an assembly line compiling language according to the assembly line construction command, and constructing the target assembly line according to the assembly line compiling language and the assembly line construction operation instruction; calling a target compiling environment mirror image from a mirror image warehouse according to a pipeline compiling language, and running a target pipeline according to the target compiling environment mirror image; determining a target construction process directory according to the analysis result of the pipeline construction command and first operation cache information generated in the target pipeline operation process; and determining a target construction mirror image corresponding to the target assembly line according to the target identification, the target construction process directory and the target compiling environment mirror image, and storing the target construction mirror image in a mirror image warehouse. By means of the scheme, the problem that the subsequent query cannot be carried out on the construction process of the target production line due to the fact that the container used for constructing the target production line is destroyed after the construction of the target production line is completed is solved. When a pipeline building command is obtained, a target pipeline is built according to the pipeline building command, a target compiling environment mirror image of the target pipeline is determined according to a pipeline compiling language, a target building process directory is determined according to first running cache information generated in the running process of the target pipeline, a target building mirror image corresponding to the target pipeline is determined according to a target identification, the target building process directory and the target compiling environment mirror image, and the target building mirror image is stored in a mirror image warehouse, so that a target building process directory corresponding to the first running cache information can be obtained according to the target building mirror image in the follow-up process, and the building process of the target pipeline can be read quickly according to the target building process directory. Meanwhile, when the target production line is constructed again in the follow-up process, the target construction mirror image can be called from the mirror image warehouse, so that the target production line is constructed again according to the target construction mirror image, and the construction efficiency of the target production line is improved when the target production line is constructed again.
It should be understood that the statements in this section do not necessarily identify key or critical features of the embodiments of the present invention, nor do they necessarily limit the scope of the invention. Other features of the present invention will become apparent from the following description.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed to be used in the description of the embodiments will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
Fig. 1 is a flowchart of a pipeline information processing method according to an embodiment of the present invention;
fig. 2 is a flowchart of a pipeline information processing method according to a second embodiment of the present invention;
fig. 3 is a flowchart of a pipeline information processing method according to a third embodiment of the present invention;
fig. 4 is a schematic structural diagram of a pipeline information processing apparatus according to a fourth embodiment of the present invention;
fig. 5 is a schematic structural diagram of an electronic device according to a fifth embodiment of the present invention.
Detailed Description
In order to make those skilled in the art better understand the technical solutions of the present invention, 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 only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be obtained by a person skilled in the art without making any creative effort based on the embodiments in the present invention, shall fall within the protection scope of the present invention.
It should be noted that the terms "candidate," "target," "first" and "second" etc. in the description and claims of the invention and the above drawings are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the invention described herein are capable of operation in sequences other than those illustrated or described herein. Furthermore, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
Example one
Fig. 1 is a flowchart of a pipeline information processing method according to an embodiment of the present invention, which is applicable to a case of processing pipeline information, and is particularly applicable to a case of processing pipeline information, constructing a target pipeline, generating a target construction process directory according to operation cache information generated in an operation process of the target pipeline, and constructing a target construction mirror image of the target pipeline according to the target construction process directory and a target compilation environment mirror image of the target pipeline. The method may be performed by a pipeline information processing apparatus, which may be implemented in the form of hardware and/or software, and which may be configured in an electronic device. As shown in fig. 1, the method includes:
s110, determining a target identification and a pipeline construction operation instruction of a target pipeline to be constructed according to the pipeline construction command, and determining whether a target construction mirror image corresponding to the target pipeline is stored in a mirror image warehouse or not according to the target identification.
The pipeline building command refers to a pipeline building instruction sent by a user, and the pipeline is a set of automatic processes. In this embodiment, the pipeline may be a Kubernetes-based continuous integrated pipeline CI or a continuous delivery pipeline CD. Kubernetes is currently the most prevalent cloud-native container orchestration system. The target identification refers to a pipeline identification of the target pipeline, the target identification can be characters used for representing the target pipeline, and the pipeline construction operation instruction refers to instruction codes sent by developers and used for constructing the pipeline. The main role of the mirror repository is to be responsible for storage and distribution of the mirrored content. The mirror image is a file storage form and is a type of redundancy, data on one disk has an identical copy on another disk, namely the mirror image, and a plurality of files can be made into a mirror image file. The target construction mirror image is a mirror image containing running cache information generated in the historical running process of the target pipeline.
Specifically, the candidate identifier of the candidate pipeline and the candidate construction mirror of the candidate pipeline may be stored in the mirror repository in advance. After a production line construction command sent by a developer is obtained, the production line construction command is analyzed, a target identification of a target production line to be constructed by the production line construction command and a production line construction operation command are determined according to an analysis result, and whether a target construction mirror image corresponding to the target production line is stored in a mirror image warehouse or not is determined according to the target identification and the corresponding relation between the candidate identification of the candidate production line and the candidate construction mirror image of the candidate production line stored in the mirror image warehouse. The candidate pipeline may be a pipeline constructed in a historical process, and the candidate constructed mirror image is a mirror image including running cache information generated in the historical running process of the candidate pipeline.
And S120, if the target construction mirror image corresponding to the target pipeline is not stored in the mirror image warehouse, determining a pipeline compiling language according to the pipeline construction command, and constructing the target pipeline according to the pipeline compiling language and the pipeline construction operation command.
Wherein, the pipeline compiling language can be java, go, c + + or js. The pipeline construction operation instruction comprises a mirror operation instruction and a container starting execution instruction which are used for constructing the target pipeline, wherein the container is a container in the program and refers to a software package formed by binding the code for constructing the target pipeline, a related configuration file, a library and dependent items required by running the target pipeline.
Specifically, if the target construction mirror corresponding to the target pipeline is not stored in the mirror image warehouse, the pipeline construction command is further analyzed, a pipeline compiling language for constructing the target pipeline is determined according to a further analysis result, and the pipeline construction operating instruction is executed by adopting the pipeline compiling language to construct the target pipeline.
And S130, calling the target compiling environment mirror image from the mirror image warehouse according to the pipeline compiling language, and operating the target pipeline according to the target compiling environment mirror image.
The target compiling environment mirror image refers to a compiling environment mirror image which is stored in a mirror image warehouse in advance and corresponds to the pipeline compiling language.
Specifically, a target compilation environment image corresponding to the pipeline compilation language may be queried from the image repository and invoked to run the target pipeline based on the target compilation environment image.
For example, according to the pipeline compilation language, the method for calling the target compilation environment image from the image repository may be: and determining a target compiling environment mirror image from the candidate compiling environment mirror images according to the corresponding relation between the pipeline compiling language and the candidate compiling environment mirror images in the mirror image warehouse, and calling the target compiling environment mirror image from the mirror image warehouse.
It can be understood that the target compiling environment mirror image of the target pipeline is determined according to the corresponding relation between the pipeline compiling language and the candidate compiling environment mirror image, and the target compiling environment mirror image is called from the mirror image warehouse, so that the target compiling environment mirror image can be automatically called, and the obtaining efficiency of the target compiling environment mirror image is improved.
S140, determining a target construction process directory according to the analysis result of the pipeline construction command and first operation cache information generated in the target pipeline operation process.
The first operation cache information refers to cache information generated in the operation process of a target pipeline directly constructed according to the pipeline construction command. The target construction process directory is a directory file used for recording cache information in the target pipeline operation process.
Specifically, the target compiling mode of the target pipeline is determined from the candidate compiling modes according to the analysis result of the pipeline building command. Wherein, the candidate compiling manners include but are not limited to mvn compiling, or yann compiling and go compiling. And acquiring first operation cache information generated in the operation process of the target assembly line, and determining a target construction process directory according to the target compiling mode and the first operation cache information.
S150, determining a target construction mirror image corresponding to the target assembly line according to the target identification, the target construction process directory and the target compiling environment mirror image, and storing the target construction mirror image in a mirror image warehouse.
Specifically, according to the target identification of the target pipeline, the target construction process catalog and the target compiling environment mirror image, dockerfile is generated, the dockerfile is used as the target construction mirror image corresponding to the target pipeline, and the target construction mirror image is stored in a mirror image warehouse. The dockerfile is a configuration file in a text format, and a developer can use the dockerfile to quickly create a self-defined mirror image. In general, dockerfile body content is divided into four parts: basic mirror image information, maintainer information, mirror image operation instructions and container execution instructions when starting.
Illustratively, determining the target construction image corresponding to the target pipeline according to the target identifier, the target construction process directory and the target compilation environment image can be realized by the following sub-steps:
s1501, acquiring a construction time stamp of the target assembly line, and determining the version name of the target construction mirror image according to the construction time stamp, the target identification and the target compilation environment mirror image.
Wherein, the construction timestamp of the target pipeline can be a timestamp of completion of construction of the target pipeline.
S1502, marking the target construction process directory by adopting the version name, and taking the marked target construction process directory as a target construction mirror image corresponding to the target pipeline.
Specifically, the version name may be placed before the target build process directory, or the version name may be placed after the target build process directory, so as to complete the marking of the target build process directory. And taking the marked target construction process directory as a target construction mirror image corresponding to the target assembly line.
It can be understood that when the target construction mirror image corresponding to the target pipeline is generated, the version name of the target construction mirror image is determined according to the construction timestamp, the target identifier and the target compiling environment mirror image, so that the target construction mirror image can be conveniently searched or called subsequently, and the query efficiency of the target construction mirror image can be improved.
According to the technical scheme provided by the embodiment, the target identification and the pipeline construction operation instruction of the target pipeline to be constructed are determined according to the pipeline construction command, and whether the target construction mirror image corresponding to the target pipeline is stored in the mirror image warehouse or not is determined according to the target identification; if the target construction mirror image corresponding to the target assembly line is not stored in the mirror image warehouse, determining an assembly line compiling language according to the assembly line construction command, and constructing the target assembly line according to the assembly line compiling language and the assembly line construction operation instruction; calling a target compiling environment mirror image from a mirror image warehouse according to a pipeline compiling language, and running a target pipeline according to the target compiling environment mirror image; determining a target construction process directory according to an analysis result of the pipeline construction command and first operation cache information generated in the target pipeline operation process; and determining a target construction mirror image corresponding to the target assembly line according to the target identification, the target construction process directory and the target compiling environment mirror image, and storing the target construction mirror image in a mirror image warehouse. By means of the scheme, the problem that the subsequent query cannot be performed on the construction process of the target assembly line due to the fact that the container used for constructing the target assembly line is destroyed after the construction of the target assembly line is completed is solved. When a pipeline building command is obtained, a target pipeline is built according to the pipeline building command, a target compiling environment mirror image of the target pipeline is determined according to a pipeline compiling language, a target building process directory is determined according to first running cache information generated in the running process of the target pipeline, a target building mirror image corresponding to the target pipeline is determined according to a target identification, the target building process directory and the target compiling environment mirror image, and the target building mirror image is stored in a mirror image warehouse, so that a target building process directory corresponding to the first running cache information can be obtained according to the target building mirror image in the follow-up process, and the building process of the target pipeline can be read quickly according to the target building process directory. Meanwhile, when the target pipeline is constructed again in the follow-up process, the target construction mirror image can be called from the mirror image warehouse, so that the target pipeline is constructed again according to the target construction mirror image, and the construction efficiency of the target pipeline is improved when the target pipeline is constructed again.
Example two
Fig. 2 is a flowchart of a pipeline information processing method according to a second embodiment of the present invention, which is optimized based on the second embodiment, and this embodiment provides a preferred implementation of constructing a mirror image according to an object corresponding to an object pipeline stored in a mirror image warehouse, so as to construct an object pipeline. Specifically, as shown in fig. 2, the method includes:
s210, according to the pipeline construction command, determining a target identification and a pipeline construction operation instruction of a target pipeline to be constructed, and according to the target identification, determining whether a target construction mirror image corresponding to the target pipeline is stored in a mirror image warehouse.
S220, if the target construction mirror image corresponding to the target production line is stored in the mirror image warehouse, calling the target construction mirror image from the mirror image warehouse, and determining a target construction process catalog and a target compiling environment mirror image of the target production line according to the target construction mirror image.
Specifically, if the target construction mirror image corresponding to the target production line is stored in the mirror image warehouse, the target construction mirror image is called from the mirror image warehouse according to the target identification of the target production line, and the target construction mirror image is analyzed to obtain a target construction process catalog and a target compiling environment mirror image of the target production line.
And S230, constructing a target assembly line according to the target compiling environment mirror image, the assembly line construction operation instruction and the target cache information in the target construction process directory.
Specifically, based on the target compiling environment mirror image, the target pipeline is constructed according to the pipeline construction operation instruction and the target cache information in the target construction process directory.
For example, on the basis of the above steps in this embodiment, in the running process of the target pipeline that is built according to the pipeline compiling language and the pipeline building operation instruction, second running cache information of the target pipeline may be monitored in real time, and if the second running cache information is inconsistent with the target cache information in the target building process directory, an update building mirror image is built for the target pipeline, which may specifically be implemented by the following steps:
1) And in the running process of the target pipeline, monitoring second running cache information of the target pipeline in real time, and determining whether the second running cache information is consistent with the target cache information in the target construction process directory.
The second running cache information refers to running cache information generated in a running procedure of a target production line constructed according to the target construction mirror image.
Specifically, if part of the codes in the pipeline construction operation instruction of the target pipeline are changed, the cache information of the target pipeline is changed accordingly. Therefore, it is further required to monitor second operation cache information of the target pipeline in real time during the operation of the target pipeline, and perform consistency comparison between the second operation cache information and the target cache information in the target construction process directory to determine whether the second operation cache information is consistent with the target cache information in the target construction process directory.
2) And if not, updating the target construction process directory according to the second operation cache information.
Specifically, if the second running cache information is inconsistent with the target cache information in the target building process directory, it is determined that cache information inconsistent with the target cache information in the second running cache information does not update the cache information. And replacing target cache information corresponding to the updated cache information in the target construction process directory by the updated cache information so as to complete the update of the target construction process directory.
3) And determining an updated construction mirror image corresponding to the target production line according to the target identification, the target compiling environment mirror image and the updated target construction process directory, and storing the updated construction mirror image in a mirror image warehouse.
Illustratively, a build timestamp of the target pipeline may be obtained, and a version name of the target build image may be determined according to the build timestamp, the target identification, and the target compilation environment image. And marking the updated target construction process directory by adopting the version name, and taking the marked and updated target construction process directory as a target construction mirror image corresponding to the target production line.
According to the scheme, in the process of running the target production line, consistency comparison is carried out on the second running cache information of the target production line and the target cache information in the target construction process directory in real time, if the second running cache information of the target production line and the target cache information are not consistent, the updated construction mirror image of the target production line is generated according to the second running cache information, the updated construction mirror image is stored in the mirror image warehouse, the construction mirror image of the production line in the mirror image warehouse can be updated in real time, the content in the mirror image warehouse is enriched, and meanwhile, the accuracy of the target construction mirror image called from the mirror image warehouse when the target production line is subsequently constructed again is improved.
S240, if the target construction mirror image corresponding to the target pipeline is not stored in the mirror image warehouse, determining a pipeline compiling language according to the pipeline construction command, and constructing the target pipeline according to the pipeline compiling language and the pipeline construction operation instruction.
And S250, calling a target compiling environment mirror image from the mirror image warehouse according to the pipeline compiling language, and operating the target pipeline according to the target compiling environment mirror image.
And S260, determining a target construction process directory according to the analysis result of the pipeline construction command and first operation cache information generated in the target pipeline operation process.
S270, determining a target construction mirror image corresponding to the target assembly line according to the target identification, the target construction process directory and the target compiling environment mirror image, and storing the target construction mirror image in a mirror image warehouse.
The technical scheme of this embodiment provides a preferred real-time manner for determining a target building process directory and a target compiling environment mirror image of a target pipeline according to a target building mirror image corresponding to the target pipeline stored in a mirror image warehouse when it is determined that the target building mirror image corresponding to the target pipeline is stored in the mirror image warehouse, and building the target pipeline based on the target compiling environment mirror image, a pipeline building operation instruction, and target cache information in the target building process directory. The problems that the construction of the assembly line needs to be completed every time the assembly line is constructed, the construction of the assembly line is long, the construction efficiency is low and the resource utilization rate is low are solved, the compiling and constructing efficiency of the assembly line is improved, the construction time of the assembly line is saved, and the resource utilization rate of the assembly line is improved.
EXAMPLE III
Fig. 3 is a flowchart of a pipeline information processing method according to a third embodiment of the present invention, and this embodiment optimizes the pipeline information processing method based on the above embodiments, and provides a preferred implementation manner for determining a target construction process directory according to an analysis result of a pipeline construction command and first operation cache information generated in a target pipeline operation process. Specifically, as shown in fig. 3, the method includes:
s310, according to the pipeline construction command, determining a target identification and a pipeline construction operation instruction of a target pipeline to be constructed, and according to the target identification, determining whether a target construction mirror image corresponding to the target pipeline is stored in a mirror image warehouse.
S320, if the target construction mirror image corresponding to the target pipeline is not stored in the mirror image warehouse, determining a pipeline compiling language according to the pipeline construction command, and constructing the target pipeline according to the pipeline compiling language and the pipeline construction operation instruction.
And S330, calling the target compiling environment mirror image from the mirror image warehouse according to the pipeline compiling language, and operating the target pipeline according to the target compiling environment mirror image.
S340, calling the analysis construction container to analyze the pipeline construction command, and determining a target compiling mode of the target pipeline according to an analysis result.
Where the analysis build container may be a mirror image of the sidecar container, which is a secondary container that may be used to perform some work independent of the primary container. Illustratively, a sidecar container may be started in each Pod of Kubernetes for performing some of the tasks outside the host process independently of the Pod. A Pod is the smallest unit of operation in kubernets and consists of one or more containers, each of which runs on its corresponding host.
Specifically, the analysis and construction container is called to analyze the pipeline construction command, so that the target compiling mode of the target pipeline is determined according to the analysis result.
And S350, according to the target compiling mode, determining target operation cache information from first operation cache information generated in the operation process of the target pipeline, and writing the target operation cache information into a cache information directory to determine a target construction process directory.
The target operation cache information refers to information that can be written into the cache information directory.
Specifically, the selection criterion of the target running cache information corresponding to the candidate compiling mode may be preset. According to the target compiling mode and the selection standard of the target running cache information corresponding to the target compiling mode, extracting the target running cache information from the first running cache information generated in the running process of the target pipeline, writing the target running cache information into a cache information directory, and taking the cache information directory recorded with the target running cache information as a target construction process directory.
And S360, determining a target construction mirror image corresponding to the target assembly line according to the target identification, the target construction process directory and the target compiling environment mirror image, and storing the target construction mirror image in a mirror image warehouse.
According to the technical scheme of the embodiment, when the target construction process directory is determined according to the first cache information of the target pipeline, the target compiling mode of the target pipeline is determined according to the analysis result of the analysis construction container on the pipeline construction command, the target operation cache information used for constructing the target construction process directory in the first operation cache information is determined according to the target compiling mode, the target operation cache information is written into the cache information directory, and the target construction process directory is determined. According to the scheme, an optional real-time mode for selectively writing the cache information generated in the operation process of the target production line into the cache information directory is provided, the acquisition efficiency of the target construction process directory is improved, the storage space for storing the target construction process directory is reduced, and meanwhile the target construction process directory is convenient to browse subsequently.
Example four
Fig. 4 is a schematic structural diagram of a pipeline information processing apparatus according to a fourth embodiment of the present invention. The present embodiment is applicable to a case where pipeline information is processed. As shown in fig. 4, the pipeline information processing apparatus includes: a target build image query module 410, a target pipeline build module 420, a target pipeline run module 430, a build process catalog determination module 440, and a target build image determination module 450.
The target construction mirror image query module 410 is configured to determine, according to the pipeline construction command, a target identifier and a pipeline construction operation instruction of a target pipeline to be constructed, and determine, according to the target identifier, whether a target construction mirror image corresponding to the target pipeline is stored in the mirror image warehouse;
the target pipeline building module 420 is configured to determine a pipeline compiling language according to the pipeline building command if the target building mirror corresponding to the target pipeline is not stored in the mirror image warehouse, and build the target pipeline according to the pipeline compiling language and the pipeline building operation instruction;
a target pipeline running module 430, configured to invoke a target compilation environment mirror from the mirror warehouse according to the pipeline compilation language, and run the target pipeline according to the target compilation environment mirror;
the construction process directory determining module 440 is configured to determine a target construction process directory according to an analysis result of the pipeline construction command and first operation cache information generated in a target pipeline operation process;
and the target construction mirror image determining module 450 is configured to determine a target construction mirror image corresponding to the target pipeline according to the target identifier, the target construction process directory, and the target compilation environment mirror image, and store the target construction mirror image in the mirror image warehouse.
According to the technical scheme provided by the embodiment, the target identification and the pipeline construction operation instruction of the target pipeline to be constructed are determined according to the pipeline construction command, and whether the target construction mirror image corresponding to the target pipeline is stored in the mirror image warehouse or not is determined according to the target identification; if the target construction mirror image corresponding to the target assembly line is not stored in the mirror image warehouse, determining an assembly line compiling language according to the assembly line construction command, and constructing the target assembly line according to the assembly line compiling language and the assembly line construction operation instruction; calling a target compiling environment mirror image from a mirror image warehouse according to a pipeline compiling language, and running a target pipeline according to the target compiling environment mirror image; determining a target construction process directory according to the analysis result of the pipeline construction command and first operation cache information generated in the target pipeline operation process; and determining a target construction mirror image corresponding to the target assembly line according to the target identification, the target construction process directory and the target compiling environment mirror image, and storing the target construction mirror image in a mirror image warehouse. By means of the scheme, the problem that the subsequent query cannot be carried out on the construction process of the target production line due to the fact that the container used for constructing the target production line is destroyed after the construction of the target production line is completed is solved. When a pipeline building command is obtained, a target pipeline is built according to the pipeline building command, a target compiling environment mirror image of the target pipeline is determined according to a pipeline compiling language, a target building process directory is determined according to first running cache information generated in the running process of the target pipeline, a target building mirror image corresponding to the target pipeline is determined according to a target identification, the target building process directory and the target compiling environment mirror image, and the target building mirror image is stored in a mirror image warehouse, so that a target building process directory corresponding to the first running cache information can be obtained according to the target building mirror image in the following process, and the building process of the target pipeline can be read quickly according to the target building process directory. Meanwhile, when the target production line is constructed again in the follow-up process, the target construction mirror image can be called from the mirror image warehouse, so that the target production line is constructed again according to the target construction mirror image, and the construction efficiency of the target production line is improved when the target production line is constructed again.
Illustratively, the pipeline information processing apparatus further includes:
the target construction mirror image calling module is used for calling a target construction mirror image from the mirror image warehouse if the target construction mirror image corresponding to the target assembly line is stored in the mirror image warehouse, and determining a target construction process catalog and a target compiling environment mirror image of the target assembly line according to the target construction mirror image;
and the target construction mirror image application module is used for constructing the target assembly line according to the target compiling environment mirror image, the assembly line construction operation instruction and the target cache information in the target construction process directory.
Illustratively, the pipeline information processing apparatus further includes:
the cache information monitoring module is used for monitoring second running cache information of the target production line in real time in the running process of the target production line and determining whether the second running cache information is consistent with the target cache information in the target construction process directory;
the directory updating module is used for updating the target construction process directory according to the second operation cache information if the target construction process directory is not updated;
and the update construction mirror image acquisition module is used for determining an update construction mirror image corresponding to the target production line according to the target identification, the target compiling environment mirror image and the updated target construction process directory, and storing the update construction mirror image in the mirror image warehouse.
Illustratively, the build process catalog determination module 440 is specifically configured to:
calling an analysis construction container to analyze the pipeline construction command, and determining a target compiling mode of a target pipeline according to an analysis result;
and according to a target compiling mode, determining target operation cache information from first operation cache information generated in the operation process of a target assembly line, and writing the target operation cache information into a cache information directory to determine a target construction process directory.
Illustratively, target build image determination module 450 is specifically configured to:
acquiring a construction timestamp of a target production line, and determining a version name of a target construction mirror image according to the construction timestamp, a target identifier and the target compiling environment mirror image;
and marking the target construction process directory by adopting the version name, and taking the marked target construction process directory as a target construction mirror image corresponding to the target production line.
Illustratively, the target pipeline run module 430 is specifically configured to:
and determining a target compiling environment mirror image from the candidate compiling environment mirror images according to the corresponding relation between the pipeline compiling language and the candidate compiling environment mirror images in the mirror image warehouse, and calling the target compiling environment mirror image from the mirror image warehouse.
The pipeline information processing device provided by the embodiment can be applied to the pipeline information processing method provided by any of the above embodiments, and has corresponding functions and beneficial effects.
EXAMPLE five
FIG. 5 illustrates a schematic diagram of an electronic device 10 that may be used to implement an embodiment of the invention. Electronic devices are intended to represent various forms of digital computers, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. The electronic device may also represent various forms of mobile devices, such as personal digital assistants, cellular phones, smart phones, wearable devices (e.g., helmets, glasses, watches, etc.), and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are meant to be exemplary only, and are not meant to limit implementations of the inventions described and/or claimed herein.
As shown in fig. 5, the electronic device 10 includes at least one processor 11, and a memory communicatively connected to the at least one processor 11, such as a Read Only Memory (ROM) 12, a Random Access Memory (RAM) 13, and the like, wherein the memory stores a computer program executable by the at least one processor, and the processor 11 can perform various suitable actions and processes according to the computer program stored in the Read Only Memory (ROM) 12 or the computer program loaded from a storage unit 18 into the Random Access Memory (RAM) 13. In the RAM 13, various programs and data necessary for the operation of the electronic apparatus 10 can also be stored. The processor 11, the ROM 12, and the RAM 13 are connected to each other via a bus 14. An input/output (I/O) interface 15 is also connected to bus 14.
A number of components in the electronic device 10 are connected to the I/O interface 15, including: an input unit 16 such as a keyboard, a mouse, or the like; an output unit 17 such as various types of displays, speakers, and the like; a storage unit 18 such as a magnetic disk, an optical disk, or the like; and a communication unit 19 such as a network card, modem, wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information/data with other devices via a computer network, such as the internet, and/or various telecommunication networks.
The processor 11 may be a variety of general and/or special purpose processing components having processing and computing capabilities. Some examples of processor 11 include, but are not limited to, a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), various specialized Artificial Intelligence (AI) computing chips, various processors running machine learning model algorithms, a Digital Signal Processor (DSP), and any suitable processor, controller, microcontroller, or the like. The processor 11 performs the respective methods and processes described above, such as the pipeline information processing method.
In some embodiments, the pipeline information processing method may be implemented as a computer program tangibly embodied in a computer-readable storage medium, such as storage unit 18. In some embodiments, part or all of the computer program may be loaded and/or installed onto the electronic device 10 via the ROM 12 and/or the communication unit 19. When the computer program is loaded into the RAM 13 and executed by the processor 11, one or more steps of the pipeline information processing method described above may be performed. Alternatively, in other embodiments, the processor 11 may be configured to perform the pipeline information processing method by any other suitable means (e.g., by means of firmware).
Various implementations of the systems and techniques described here above may be implemented in digital electronic circuitry, integrated circuitry, field Programmable Gate Arrays (FPGAs), application Specific Integrated Circuits (ASICs), application Specific Standard Products (ASSPs), system on a chip (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may include: implemented in one or more computer programs that are executable and/or interpretable on a programmable system including at least one programmable processor, which may be special or general purpose, receiving data and instructions from, and transmitting data and instructions to, a storage system, at least one input device, and at least one output device.
A computer program for implementing the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general purpose computer, special purpose computer, or other programmable pipelined information processing apparatus, such that the computer programs, when executed by the processor, cause the functions/acts specified in the flowchart and/or block diagram block or blocks to be performed. A computer program can execute entirely on a machine, partly on a machine, as a stand-alone software package partly on a machine and partly on a remote machine or entirely on a remote machine or server.
In the context of the present invention, a computer-readable storage medium may be a tangible medium that can contain, or store a computer program for use by or in connection with an instruction execution system, apparatus, or device. A computer readable storage medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. Alternatively, the computer readable storage medium may be a machine readable signal medium. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
To provide for interaction with a user, the systems and techniques described here can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to a user; and a keyboard and a pointing device (e.g., a mouse or a trackball) by which a user can provide input to the electronic device. Other kinds of devices may also be used to provide for interaction with a user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form, including acoustic, speech, or tactile input.
The systems and techniques described here can be implemented in a computing system that includes a back-end component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front-end component (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such back-end, middleware, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: local Area Networks (LANs), wide Area Networks (WANs), blockchain networks, and the Internet.
The computing system may include clients and servers. A client and server are generally remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other. The server can be a cloud server, also called a cloud computing server or a cloud host, and is a host product in a cloud computing service system, so that the defects of high management difficulty and weak service expansibility in the traditional physical host and VPS service are overcome.
It should be understood that various forms of the flows shown above, reordering, adding or deleting steps, may be used. For example, the steps described in the present invention may be executed in parallel, sequentially, or in different orders, and are not limited herein as long as the desired result of the technical solution of the present invention can be achieved.
The above-described embodiments should not be construed as limiting the scope of the invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions may be made in accordance with 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 pipeline information processing method, comprising:
determining a target identification and a pipeline construction operation instruction of a target pipeline to be constructed according to a pipeline construction command, and determining whether a target construction mirror image corresponding to the target pipeline is stored in a mirror image warehouse or not according to the target identification;
if the target construction mirror image corresponding to the target assembly line is not stored in the mirror image warehouse, determining an assembly line compiling language according to an assembly line construction command, and constructing the target assembly line according to the assembly line compiling language and the assembly line construction operation instruction;
calling a target compiling environment mirror image from the mirror image warehouse according to the pipeline compiling language, and operating the target pipeline according to the target compiling environment mirror image;
determining a target construction process directory according to the analysis result of the pipeline construction command and first operation cache information generated in the target pipeline operation process;
and determining a target construction mirror image corresponding to the target assembly line according to the target identification, the target construction process directory and the target compiling environment mirror image, and storing the target construction mirror image in the mirror image warehouse.
2. The method of claim 1, wherein after determining a target identifier of a target pipeline to be constructed and a pipeline construction operation instruction according to a pipeline construction command, and determining whether a target construction image corresponding to the target pipeline is stored in an image warehouse according to the target identifier, the method further comprises:
if the mirror image warehouse stores a target construction mirror image corresponding to the target production line, calling the target construction mirror image from the mirror image warehouse, and determining a target construction process catalog and a target compiling environment mirror image of the target production line according to the target construction mirror image;
and constructing the target assembly line according to the target compiling environment mirror image, the assembly line construction operation instruction and the target cache information in the target construction process directory.
3. The method of claim 2, comprising:
monitoring second running cache information of the target assembly line in real time in the running process of the target assembly line, and determining whether the second running cache information is consistent with the target cache information in the target construction process directory;
if not, updating the target construction process directory according to the second operation cache information;
and determining an updated construction mirror image corresponding to the target assembly line according to the target identification, the target compiling environment mirror image and the updated target construction process directory, and storing the updated construction mirror image in the mirror image warehouse.
4. The method of claim 1, wherein determining a target building process directory according to the parsing result of the pipeline building command and first running cache information generated in the running process of the target pipeline comprises:
calling an analysis construction container to analyze the pipeline construction command, and determining a target compiling mode of the target pipeline according to an analysis result;
and according to the target compiling mode, determining target operation cache information from first operation cache information generated in the target pipeline operation process, and writing the target operation cache information into a cache information directory to determine a target construction process directory.
5. The method of claim 1, wherein determining the target build image corresponding to the target pipeline according to the target identification, the target build process catalog, and the target compilation environment image comprises:
acquiring a construction timestamp of the target assembly line, and determining a version name of the target construction mirror image according to the construction timestamp, the target identification and the target compilation environment mirror image;
and marking the target construction process directory by adopting the version name, and taking the marked target construction process directory as a target construction mirror image corresponding to the target production line.
6. The method of claim 1, wherein invoking a target compilation environment image from the image repository according to the pipelined compilation language comprises:
and determining a target compiling environment mirror image from the candidate compiling environment mirror images according to the corresponding relation between a pipeline compiling language and the candidate compiling environment mirror images in the mirror image warehouse, and calling the target compiling environment mirror image from the mirror image warehouse.
7. A pipeline information processing apparatus characterized by comprising:
the target construction mirror image query module is used for determining a target identification and a pipeline construction operation instruction of a target pipeline to be constructed according to a pipeline construction command, and determining whether a target construction mirror image corresponding to the target pipeline is stored in a mirror image warehouse or not according to the target identification;
the target assembly line building module is used for determining an assembly line compiling language according to an assembly line building command if the target building mirror image corresponding to the target assembly line is not stored in the mirror image warehouse, and building the target assembly line according to the assembly line compiling language and the assembly line building operation instruction;
the target pipeline running module is used for calling a target compiling environment mirror image from the mirror image warehouse according to the pipeline compiling language and running the target pipeline according to the target compiling environment mirror image;
the construction process directory determining module is used for determining a target construction process directory according to the analysis result of the pipeline construction command and first operation cache information generated in the target pipeline operation process;
and the target construction mirror image determining module is used for determining a target construction mirror image corresponding to the target assembly line according to the target identification, the target construction process catalog and the target compiling environment mirror image, and storing the target construction mirror image in the mirror image warehouse.
8. The apparatus of claim 7, further comprising:
the target construction mirror image calling module is used for calling the target construction mirror image from the mirror image warehouse if the target construction mirror image corresponding to the target assembly line is stored in the mirror image warehouse, and determining a target construction process directory and a target compiling environment mirror image of the target assembly line according to the target construction mirror image;
and the target construction mirror image application module is used for constructing the target assembly line according to the target compiling environment mirror image, the assembly line construction operation instruction and the target cache information in the target construction process directory.
9. An electronic device, characterized in that the electronic device comprises:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein,
the memory stores a computer program executable by the at least one processor, the computer program being executable by the at least one processor to enable the at least one processor to perform the pipeline information processing method of any one of claims 1-6.
10. A computer-readable storage medium storing computer instructions for causing a processor to execute the pipeline information processing method according to any one of claims 1 to 6.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202211412607.1A CN115686640A (en) | 2022-11-11 | 2022-11-11 | Pipeline information processing method, device, equipment and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202211412607.1A CN115686640A (en) | 2022-11-11 | 2022-11-11 | Pipeline information processing method, device, equipment and storage medium |
Publications (1)
Publication Number | Publication Date |
---|---|
CN115686640A true CN115686640A (en) | 2023-02-03 |
Family
ID=85051830
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202211412607.1A Pending CN115686640A (en) | 2022-11-11 | 2022-11-11 | Pipeline information processing method, device, equipment and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN115686640A (en) |
-
2022
- 2022-11-11 CN CN202211412607.1A patent/CN115686640A/en active Pending
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN113342345A (en) | Operator fusion method and device of deep learning framework | |
CN113485781A (en) | Report generation method and device, electronic equipment and computer readable medium | |
CN115509522A (en) | Interface arranging method and system for low-code scene and electronic equipment | |
CN115469849B (en) | Service processing system, method, electronic equipment and storage medium | |
CN115048352B (en) | Log field extraction method, device, equipment and storage medium | |
CN116432624A (en) | Micro-service API document generation method, device, equipment and storage medium | |
CN115454971A (en) | Data migration method and device, electronic equipment and storage medium | |
CN114697398B (en) | Data processing method, device, electronic equipment, storage medium and product | |
CN116009847A (en) | Code generation method, device, electronic equipment and storage medium | |
CN115269431A (en) | Interface testing method and device, electronic equipment and storage medium | |
CN115905322A (en) | Service processing method and device, electronic equipment and storage medium | |
CN115511085A (en) | Model data processing method, device, equipment and storage medium | |
CN115686640A (en) | Pipeline information processing method, device, equipment and storage medium | |
CN115658248A (en) | Task scheduling method and device, electronic equipment and storage medium | |
CN115167855A (en) | Front-end page generation method, device and equipment applied to matching transaction system | |
CN114218313A (en) | Data management method, device, electronic equipment, storage medium and product | |
CN114168119A (en) | Code file editing method and device, electronic equipment and storage medium | |
CN113138760A (en) | Page generation method and device, electronic equipment and medium | |
CN115983222A (en) | EasyExcel-based file data reading method, device, equipment and medium | |
CN116821217A (en) | Data distribution conversion method, device, equipment and storage medium | |
CN115329999A (en) | Operation and maintenance task processing method, device, platform and storage medium | |
CN115600029A (en) | Method, device, system, equipment and storage medium for displaying webpage | |
CN114706578A (en) | Data processing method, device, equipment and medium | |
CN117234509A (en) | Routing management method, device and equipment of front-end page and storage medium | |
CN117371416A (en) | Project document generation method, device, equipment and storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination |