Assembly line arranging method and device and computer equipment

文档序号:189897 发布日期:2021-11-02 浏览:30次 中文

阅读说明:本技术 一种流水线编排方法、装置及计算机设备 (Assembly line arranging method and device and computer equipment ) 是由 沈增亮 叶建林 于 2021-08-12 设计创作,主要内容包括:本申请实施例提供了一种流水线编排方法、装置及计算机设备,其中方法包括:获取应用的流水线上下文信息;在接收到用户输入的构建任务操作,根据所述流水线上下文信息创建对应的构建任务,执行所述构建任务。这样,基于获取应用的流水线上下文信息,用户可以通过极少的操作完成流水线编排,简化编排操作步骤,尽可能简单地实现流水线编排过程。(The embodiment of the application provides a pipeline arranging method, a device and computer equipment, wherein the method comprises the following steps: acquiring the context information of the application pipeline; and after receiving construction task operation input by a user, creating a corresponding construction task according to the pipeline context information, and executing the construction task. Therefore, based on the obtained context information of the application pipeline, a user can complete the pipeline arrangement through few operations, the arrangement operation steps are simplified, and the pipeline arrangement process is realized as simply as possible.)

1. A method for pipelining, the method comprising:

acquiring the context information of the application pipeline;

and after receiving construction task operation input by a user, creating a corresponding construction task according to the pipeline context information, and executing the construction task.

2. The method of claim 1, wherein the pipeline context information comprises: application information, engineering information, and environmental information.

3. The method of claim 2, wherein the application information comprises an application type, a programming language, development framework information, single-test framework information, Sonar platform information, Dockerfile information, parameter configuration, and release configuration.

4. The method of claim 3, further comprising:

judging whether the source code of the application changes or not;

and under the condition that the source code of the application is changed, acquiring changed application information according to the changed source code.

5. The method of claim 4, wherein obtaining changed application information according to the changed source code comprises:

and analyzing the changed source code to obtain changed application information.

6. The method of claim 4, further comprising:

and generating new pipeline context information according to the pre-acquired engineering information, the pre-acquired environmental information and the changed application information.

7. A pipelining apparatus, comprising:

the acquisition module is used for acquiring the context information of the application pipeline;

and the processing module is used for creating a corresponding construction task according to the pipeline context information and executing the construction task after receiving construction task operation input by a user.

8. The apparatus of claim 7, further comprising:

the judging module is used for judging whether the source code of the application changes;

the obtaining module is further configured to obtain, when the source code of the application changes, changed application information according to the changed source code.

9. A computer device comprising a memory for storing a computer program which, when executed by the processor, performs the pipeline orchestration method according to any one of claims 1-6, and a processor.

10. A computer-readable storage medium, characterized in that it stores a computer program which, when run on a processor, performs the pipeline orchestration method according to any one of claims 1-6.

Technical Field

The invention relates to the technical field of computers, in particular to a method and a device for arranging a production line and computer equipment.

Background

Conventional pipelines are often described in scripts or DSL, and need a certain basis. The existing non-pipeline visualization is a technology for reducing the use cost of Continuous Integration (CI) and Continuous interaction (CD), and has great significance for the combination of large-scale Development and Operations (DevOps) in a company. Products of pipeline visualization in the market are various, such as cloud effect, Coding and the like, but the pipeline is relatively isolated, and other concepts are not assisted, so that the number of nodes and the number of parameters are large, and the arrangement is particularly complex for users.

Disclosure of Invention

In order to solve the above technical problem, embodiments of the present invention provide a pipeline arranging method, an apparatus, and a computer device.

In a first aspect, an embodiment of the present invention provides a pipeline arrangement method, including:

acquiring the context information of the application pipeline;

and after receiving construction task operation input by a user, creating a corresponding construction task according to the pipeline context information, and executing the construction task.

Optionally, the pipeline context information includes: application information, engineering information, and environmental information.

Optionally, the application information includes an application type, a programming language, development framework information, single-test framework information, Sonar platform information, Dockerfile information, parameter configuration, and release configuration.

Optionally, the method further includes:

judging whether the source code of the application changes or not;

and under the condition that the source code of the application is changed, acquiring changed application information according to the changed source code.

Optionally, the obtaining of the changed application information according to the changed source code includes:

and analyzing the changed source code to obtain changed application information.

Optionally, the method further includes:

and generating new pipeline context information according to the pre-acquired engineering information, the pre-acquired environmental information and the changed application information.

In a second aspect, an embodiment of the present invention provides a pipeline arranging apparatus, including:

the acquisition module is used for acquiring the context information of the application pipeline;

and the processing module is used for creating a corresponding construction task according to the pipeline context information and executing the construction task after receiving construction task operation input by a user.

Optionally, the pipeline context information includes: application information, engineering information, and environmental information.

Optionally, the application information includes an application type, a programming language, development framework information, single-test framework information, Sonar platform information, Dockerfile information, parameter configuration, and release configuration.

Optionally, the pipeline orchestration device further includes:

the judging module is used for judging whether the source code of the application changes;

the obtaining module is further configured to obtain, when the source code of the application changes, changed application information according to the changed source code.

Optionally, the obtaining module is further configured to analyze the changed source code to obtain changed application information.

The pipeline arranging device further comprises:

and the generating module is used for generating new pipeline context information according to the pre-acquired engineering information, the pre-acquired environmental information and the changed application information.

In a third aspect, an embodiment of the present invention provides a computer device, including a memory and a processor, where the memory is used to store a computer program, and the computer program executes the pipeline orchestration method provided in the first aspect when the processor runs.

In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium, which stores a computer program, and when the computer program runs on a processor, the computer program executes the pipeline arranging method provided in the first aspect.

The pipeline arranging method, the pipeline arranging device and the computer equipment obtain the context information of the application pipeline; and after receiving construction task operation input by a user, creating a corresponding construction task according to the pipeline context information, and executing the construction task. Therefore, based on the obtained context information of the application pipeline, a user can complete the pipeline arrangement through few operations, the arrangement operation steps are simplified, and the pipeline arrangement process is realized as simply as possible.

Drawings

In order to more clearly illustrate the technical solution of the present invention, the drawings required to be used in the embodiments will be briefly described below, and it should be understood that the following drawings only illustrate some embodiments of the present invention, and therefore should not be considered as limiting the scope of the present invention. Like components are numbered similarly in the various figures.

FIG. 1 is a flow chart of a pipeline arranging method according to an embodiment of the present disclosure;

FIG. 2 is a schematic flow chart of a pipeline scheduling method according to an embodiment of the present application;

FIG. 3 is a flow chart of a pipeline arranging device according to an embodiment of the present disclosure;

fig. 4 shows another flow chart of a pipeline arranging device according to an embodiment of the present application.

Detailed Description

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.

The components of embodiments of the present invention generally described and illustrated in the figures herein may be arranged and designed in a wide variety of different configurations. Thus, the following detailed description of the embodiments of the present invention, presented in the figures, is not intended to limit the scope of the invention, as claimed, but is merely representative of selected embodiments of the invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments of the present invention without making any creative effort, shall fall within the protection scope of the present invention.

Hereinafter, the terms "including", "having", and their derivatives, which may be used in various embodiments of the present invention, are only intended to indicate specific features, numbers, steps, operations, elements, components, or combinations of the foregoing, and should not be construed as first excluding the existence of, or adding to, one or more other features, numbers, steps, operations, elements, components, or combinations of the foregoing.

Furthermore, the terms "first," "second," "third," and the like are used solely to distinguish one from another and are not to be construed as indicating or implying relative importance.

Unless otherwise defined, all terms (including technical and scientific terms) used herein have the same meaning as commonly understood by one of ordinary skill in the art to which various embodiments of the present invention belong. The terms (such as those defined in commonly used dictionaries) should be interpreted as having a meaning that is consistent with their contextual meaning in the relevant art and will not be interpreted in an idealized or overly formal sense unless expressly so defined herein in various embodiments of the present invention.

Example 1

The embodiment 1 of the application provides a pipeline arranging method.

Specifically, referring to fig. 1, the pipeline arranging method provided in this embodiment includes:

step S101, obtaining context information of an application pipeline;

and S102, when receiving construction task operation input by a user, creating a corresponding construction task according to the pipeline context information, and executing the construction task.

In this embodiment, the pipeline needs to be simplified, and it is very critical to obtain the context information of the pipeline. Pipeline context information refers to the context in which the pipeline is running, from which each node can obtain the required information.

Optionally, the pipeline context information includes: application information, engineering information, and environmental information.

Optionally, the application information includes an application type, a programming language, development framework information, single-test framework information, Sonar platform information, Dockerfile information, parameter configuration, and release configuration.

In this embodiment, before step S101, the method further includes performing processes such as unit testing, static scanning, product building, warehouse pushing, and application publishing through the single-test framework. The application type may be of different types according to application scenarios, for example, the type of mobile e-commerce application may include mobile information services, mobile payment, mobile enterprise applications, and the like. The development framework information includes development framework version information and the like, the development framework can be a Spring Web MVC framework (Spring MVC for short), and the Spring MVC is a rich model view control Web framework.

In this embodiment, the single-test framework may provide functions such as assertion, stub, mock, and the like for the single-test framework Kiwi, so that a unit test with good readability is conveniently developed and written.

In this embodiment, sonar (sonarqube) is an open source platform for managing the quality of source code. The Sonar platform can integrate different testing tools, code analysis tools and continuous integration tools such as pmd-cpd, checkstyle, findbugs and Jenkins through a plug-in mechanism. The result is reprocessed through different plug-ins, and the change of the code quality is measured in a quantification mode, so that the code quality management can be conveniently carried out on projects of different scales and types. Meanwhile, the Sonar platform also provides interface support for a large number of continuous integration tools, and can be conveniently used in continuous integration.

In this embodiment, the Dockerfile information is a text file for constructing an image, and the text file contains a piece of instruction and description required for constructing the image. The docker build command is used to build an image from the Dockerfile. A Dockerfile that points anywhere in the file system may be pointed to using an-f flag in the dockerbiuld command. The information such as parameter configuration, release configuration and the like corresponding to the application can be obtained by analyzing the source code of the application. The environment information may be operating environment information.

In this embodiment, in step S102, based on the pipeline context information, the user operation can be simplified to the utmost. For example, for a user, the user only needs to inform the platform that the application needs to be constructed, information such as a programming language and a development framework of the application is provided in the pipeline context information, and the construction node can judge how to execute the construction task according to the pipeline context information.

Optionally, referring to fig. 2, the pipeline arranging method provided in this embodiment includes:

step S103, judging whether the source code of the application changes;

and step S104, acquiring changed application information according to the changed source code under the condition that the source code of the application is changed.

After the pipeline arrangement process is simplified through steps S101 and S102, the pipeline context information needs to be maintained in real time. Obviously, it is certainly not appropriate to let the user maintain themselves because the application information changes with code change, which is not a one-time job and needs to be updated in real time. The real-time requirement is relatively high, because once the application information is inconsistent with the actual application information, the pipeline construction may fail, so that the work of the user is affected, and if the user needs manual maintenance, the operation difficulty is increased. Thus providing an automated application parsing service.

The automated application parsing service provided by the embodiment has the following characteristics: the method has the advantages of high analysis speed, capability of processing multi-branch complex conditions, high real-time performance, strong analysis capability and capability of analyzing rich application information.

In addition, some information cannot be obtained through the application, such as information of engineering information and environment information, and the engineering information and the operation environment information can be obtained in advance according to input operation of a user.

In this embodiment, the source code may be automatically detected in real time, and if a change in a certain section of the source code is detected, the change in the source code is determined.

In step S103, when the source code of the application is not changed, the source code is not parsed again. Therefore, the calculation amount can be reduced, and the calculation resources can be saved.

Optionally, in step S104, the obtaining of the changed application information according to the changed source code includes:

and analyzing the changed source code to obtain changed application information.

In this embodiment, if the source code changes, the corresponding application information also changes, so after the change of the source code is detected, the changed source code is analyzed to obtain the changed application information. Therefore, the changed application information is acquired in real time, the application information is automatically updated, manual operation of a user is not needed, the labor cost is reduced, and the automation degree of the whole assembly line arrangement is improved.

Optionally, the pipeline arranging method provided in this embodiment further includes:

and generating new pipeline context information according to the pre-acquired engineering information, the pre-acquired environmental information and the changed application information.

In this embodiment, after the engineering information and the environmental information are acquired in advance once, new pipeline context information can be generated only by acquiring the changed application information in real time, and after receiving the construction task operation input by the user, a corresponding new construction task is created according to the new pipeline context information, and the new construction task is executed.

The pipeline arranging method provided by the embodiment of the application acquires context information of an application pipeline; and after receiving construction task operation input by a user, creating a corresponding construction task according to the pipeline context information, and executing the construction task. Therefore, based on the obtained context information of the application pipeline, a user can complete the pipeline arrangement through few operations, the arrangement operation steps are simplified, and the pipeline arrangement process is realized as simply as possible.

Example 2

The embodiment 2 of the application provides a production line arrangement device.

Specifically, referring to fig. 3, the pipeline scheduling apparatus 300 of the present embodiment includes:

an obtaining module 301, configured to obtain pipeline context information of an application;

and the processing module 302 is configured to, after receiving a construction task operation input by a user, create a corresponding construction task according to the pipeline context information, and execute the construction task.

Optionally, the pipeline context information includes: application information, engineering information, and environmental information.

Optionally, the application information includes an application type, a programming language, development framework information, single-test framework information, Sonar platform information, Dockerfile information, parameter configuration, and release configuration.

Optionally, referring to fig. 4, the pipeline arranging apparatus 300 further includes:

a judging module 303, configured to judge whether a source code of the application changes;

the obtaining module 301 is further configured to, when the source code of the application changes, obtain the changed application information according to the changed source code.

Optionally, the obtaining module 301 is further configured to analyze the changed source code to obtain changed application information.

The pipeline orchestration device 300 further comprises:

and the generating module is used for generating new pipeline context information according to the pre-acquired engineering information, the pre-acquired environmental information and the changed application information.

The pipeline scheduling apparatus 300 of this embodiment can implement the pipeline scheduling method shown in embodiment 1, and is not described herein again to avoid repetition.

The pipeline arranging device provided by the embodiment acquires context information of an application pipeline; and after receiving construction task operation input by a user, creating a corresponding construction task according to the pipeline context information, and executing the construction task. Therefore, based on the obtained context information of the application pipeline, a user can complete the pipeline arrangement through few operations, the arrangement operation steps are simplified, and the pipeline arrangement process is realized as simply as possible.

Example 3

Furthermore, an embodiment of the present disclosure provides a computer device, including a memory and a processor, where the memory is used to store a computer program, and the computer program executes the following steps when the processor runs:

acquiring the context information of the application pipeline;

and after receiving construction task operation input by a user, creating a corresponding construction task according to the pipeline context information, and executing the construction task.

Optionally, the pipeline context information includes: application information, engineering information, and environmental information.

Optionally, the application information includes an application type, a programming language, development framework information, single-test framework information, Sonar platform information, Dockerfile information, parameter configuration, and release configuration.

Optionally, when the processor runs, the computer program further performs the following steps:

judging whether the source code of the application changes or not;

and under the condition that the source code of the application is changed, acquiring changed application information according to the changed source code.

Optionally, when the processor runs, the computer program further performs the following steps:

and analyzing the changed source code to obtain changed application information.

Optionally, when the processor runs, the computer program further performs the following steps:

and generating new pipeline context information according to the pre-acquired engineering information, the pre-acquired environmental information and the changed application information.

The computer device provided in this embodiment may implement the pipeline arrangement method shown in embodiment 1, and details are not described here to avoid repetition.

The computer equipment provided by the embodiment acquires the context information of the application pipeline; and after receiving construction task operation input by a user, creating a corresponding construction task according to the pipeline context information, and executing the construction task. Therefore, based on the obtained context information of the application pipeline, a user can complete the pipeline arrangement through few operations, the arrangement operation steps are simplified, and the pipeline arrangement process is realized as simply as possible.

Example 4

The present embodiments provide a computer-readable storage medium storing a computer program which, when run on a processor, performs the steps of:

acquiring the context information of the application pipeline;

and after receiving construction task operation input by a user, creating a corresponding construction task according to the pipeline context information, and executing the construction task.

Optionally, the pipeline context information includes: application information, engineering information, and environmental information.

Optionally, the application information includes an application type, a programming language, development framework information, single-test framework information, Sonar platform information, Dockerfile information, parameter configuration, and release configuration.

Optionally, when the processor runs, the computer program further performs the following steps:

judging whether the source code of the application changes or not;

and under the condition that the source code of the application is changed, acquiring changed application information according to the changed source code.

Optionally, when the processor runs, the computer program further performs the following steps:

and analyzing the changed source code to obtain changed application information.

Optionally, when the processor runs, the computer program further performs the following steps:

and generating new pipeline context information according to the pre-acquired engineering information, the pre-acquired environmental information and the changed application information.

The computer device provided in this embodiment may implement the pipeline arrangement method shown in embodiment 1, and details are not described here to avoid repetition.

The computer-readable storage medium provided by this embodiment obtains pipeline context information of an application; and after receiving construction task operation input by a user, creating a corresponding construction task according to the pipeline context information, and executing the construction task. Therefore, based on the obtained context information of the application pipeline, a user can complete the pipeline arrangement through few operations, the arrangement operation steps are simplified, and the pipeline arrangement process is realized as simply as possible.

In the embodiments provided in the present application, it should be understood that the disclosed apparatus and method can be implemented in other ways. The apparatus embodiments described above are merely illustrative and, for example, the flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of apparatus, 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 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 and/or flowchart illustration, and combinations of blocks in the block diagrams and/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.

In addition, each functional module or unit in each embodiment of the present invention may be integrated together to form an independent part, or each module may exist separately, or two or more modules may be integrated to form an independent part.

The functions, if implemented in the form of software functional modules and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention or a part of the technical solution that contributes to the prior art in essence can be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a smart phone, a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.

The above description is only for the specific embodiments of the present invention, but the scope of the present invention is not limited thereto, and any person skilled in the art can easily conceive of the changes or substitutions within the technical scope of the present invention, and all the changes or substitutions should be covered within the scope of the present invention.

11页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:一种业务系统代码自动生成方法及装置

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!