Disclosure of Invention
The embodiment of the disclosure provides at least one pipeline generation method and device based on low-code visualization, which can help a user to quickly and accurately create and manage a pipeline by standardizing variables and components, visualizing an arranging flow, automatically generating scripts and environment configuration files, reduce the technical threshold of configuration and maintenance, improve the development efficiency and reduce human errors.
The embodiment of the disclosure provides a pipeline generation method based on low-code visualization, which comprises the following steps:
defining standard variables required by pipeline execution, dividing functions required by the pipeline into standardized components and storing the standardized components in a standard component library;
Acquiring a target item type selected by a user, loading the standard component library corresponding to the target item type, and constructing a pipeline flow in response to the arrangement operation of the user on the standardized component;
responding to parameter configuration operation of a user for the standardized components, configuring corresponding component parameters for each standardized component, and generating a pipeline script according to the component parameters and the pipeline flow;
And creating environment resources required by executing the pipeline script, and executing the standardized components in sequence according to the pipeline flow.
In an optional implementation manner, a target item type selected by a user is obtained, the standard component library corresponding to the target item type is loaded, and a pipeline flow is constructed in response to the arrangement operation of the user on the standardized component, specifically including:
determining the target item type in response to item type selection operation executed by a user on a preset interactive interface;
loading the corresponding standard component library according to the target item type, acquiring item basic information input by a user, and executing initialization configuration of the item according to the item basic information;
determining target components selected by a user in the standard component library, and determining the arrangement sequence of the target components in response to the arrangement operation of the user on the target components;
and generating the pipeline flow according to the target component and the corresponding arrangement sequence.
In an alternative embodiment, in response to a parameter configuration operation of a user on the standardized components, configuring corresponding component parameters for each standardized component specifically includes:
Providing the standard variables and the preferred parameters corresponding to each standard variable for a user through a preset interactive interface;
In response to a user's parameter configuration operation for the standard variable, a target component parameter is determined and saved as a parameter configuration file.
In an alternative embodiment, after configuring the corresponding component parameters for each of the standardized components, the method further includes:
determining a construction environment and a deployment environment selected by a user, and generating a corresponding naming space configuration file, wherein the naming space configuration file is used for determining a resource isolation range;
generating a key configuration file, wherein the key configuration file at least comprises a mirror image warehouse key and an access key;
Configuring persistent storage requirements for the construction environment and the deployment environment, and generating a persistent volume declaration configuration file, wherein the persistent volume declaration configuration file is used for meeting data storage requirements in construction and operation;
And packaging the naming space configuration file, the key configuration file and the persistent volume statement configuration file to generate an environment configuration file.
In an alternative embodiment, creating environment resources required for executing the pipeline script, and sequentially executing the standardized components according to the pipeline flow, specifically including:
Creating a name space according to the name space configuration file, and loading the mirror image warehouse key and the access key corresponding to the key configuration file;
initializing persistent storage according to the persistent volume declaration configuration file;
and sequentially executing the standardized components according to the execution sequence indicated by the pipeline flow.
In an alternative embodiment, generating a pipeline script according to the component parameters and the pipeline flow specifically includes:
Analyzing the pipeline flow, and determining the standardized components and the execution sequence among the standardized components arranged in the pipeline flow;
extracting the component parameters corresponding to each standardized component aiming at each standardized component;
And constructing the pipeline script according to all the standardized components and the corresponding component parameters, and adding environment configuration information for the pipeline script.
In an alternative embodiment, the standard variables include at least project basic variables, environment variables, and configuration variables;
The project basic variables at least define project names, code warehouse addresses and branch names and are used for uniformly managing different projects;
the environment variables at least define a build tool version, an operating environment configuration and a resource limit, and are used for ensuring the consistency of the operating environment;
The configuration variables at least define deployment parameters, operation parameters and monitoring parameters, and are used for supporting deployment requirements of the application in different environments.
The embodiment of the disclosure also provides a pipeline generating device based on low-code visualization, which comprises:
The variable definition and component division module is used for defining standard variables required by pipeline execution, dividing functions required by the pipeline into standardized components and storing the standardized components in the standard component library;
The assembly line flow construction module is used for acquiring a target item type selected by a user, loading the standard component library corresponding to the target item type, and constructing an assembly line flow in response to the arrangement operation of the user on the standardized component;
The assembly line script generation module is used for responding to the parameter configuration operation of a user on the standardized assemblies, configuring corresponding assembly parameters for each standardized assembly and generating an assembly line script according to the assembly parameters and the assembly line flow;
and the pipeline execution device is used for creating environment resources required by executing the pipeline script and sequentially executing the standardized components according to the pipeline flow.
The embodiment of the disclosure also provides an electronic device, which comprises a processor, a memory and a bus, wherein the memory stores machine-readable instructions executable by the processor, when the electronic device runs, the processor and the memory are communicated through the bus, and the machine-readable instructions are executed by the processor to execute the steps in any possible implementation mode of the pipeline generation method based on the low-code visualization or the pipeline generation method based on the low-code visualization.
Embodiments of the present disclosure also provide a computer readable storage medium having stored thereon a computer program which, when executed by a processor, performs the steps of any one of the possible implementation of the low code visualization-based pipeline generation method described above, or the low code visualization-based pipeline generation method described above.
Embodiments of the present disclosure also provide a computer program product comprising a computer program/instruction which, when executed by a processor, implements the steps of any one of the possible implementation of the low code visualization-based pipeline generation method described above, or the low code visualization-based pipeline generation method described above.
The embodiment of the disclosure provides a pipeline generation method and device based on low code visualization, which are used for defining standard variables required by pipeline execution, dividing functions required by the pipeline into standardized components and storing the standardized components in a standard component library, acquiring target item types selected by a user, loading the standard component library corresponding to the target item types, constructing a pipeline flow in response to the arrangement operation of the user on the standardized components, configuring corresponding component parameters for each standardized component in response to the parameter configuration operation of the user on the standardized components, generating a pipeline script according to the component parameters and the pipeline flow, creating environment resources required by executing the pipeline script, and sequentially executing the standardized components according to the pipeline flow. The method can help a user to quickly and accurately establish and manage the pipeline by standardizing variables and components, visually arranging a flow, automatically generating scripts and environment configuration files, reduce the technical threshold of configuration and maintenance, improve the development efficiency and reduce human errors.
The embodiment of the disclosure combines the techniques of low codes, standardized component libraries and automatic execution flows, and solves the problems of high complexity, time-consuming environment configuration, inflexible execution flows and the like of the traditional pipeline creation. By introducing and dynamically loading the standardized component library, the functions required by the assembly line are modularized and standardized for different project types to form a reusable component library, and the corresponding standard component library is dynamically loaded according to the target project type selected by a user, so that unnecessary resource waste and configuration errors are avoided. Through dynamic loading, the suitability of a standardized component library is realized, different items can multiplex the same components, and the workload of manually adjusting the components is reduced. And moreover, a developer only needs to select a target project type, and the system can load a standard component matched with the target project type, so that the complicated process of manually searching and configuring the component is avoided. Meanwhile, the user is supported to carry out parameter configuration on the standardized assembly through the visual interface, and a complete assembly line script is automatically generated according to assembly parameters and assembly line flow, so that the user does not need to write complex script codes manually. The visual interface can enable non-technicians to quickly create and configure the pipeline, avoid deep dependence on a scripting language, avoid grammar or logic errors possibly caused by manual script writing of a user, and improve the correctness and stability of pipeline configuration. Further, before the pipeline script is executed, the system automatically creates required environment resources (such as a name space, key configuration, persistent storage and the like) according to component parameters and flow requirements, a user does not need to manually manage the environment resources, and the system automatically processes the whole flow, so that the workload of development and operation and maintenance personnel is reduced.
The foregoing objects, features and advantages of the disclosure will be more readily apparent from the following detailed description of the preferred embodiments taken in conjunction with the accompanying drawings.
Detailed Description
For the purposes of making the objects, technical solutions and advantages of the embodiments of the present disclosure more apparent, the technical solutions in the embodiments of the present disclosure will be clearly and completely described below with reference to the drawings in the embodiments of the present disclosure, and it is apparent that the described embodiments are only some embodiments of the present disclosure, but not all embodiments. The components of the embodiments of the present disclosure, which are 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 disclosure provided in the accompanying drawings is not intended to limit the scope of the disclosure, as claimed, but is merely representative of selected embodiments of the disclosure. All other embodiments, which can be made by those skilled in the art based on the embodiments of this disclosure without making any inventive effort, are intended to be within the scope of this disclosure.
It should be noted that like reference numerals and letters refer to like items in the following figures, and thus once an item is defined in one figure, no further definition or explanation thereof is necessary in the following figures.
The term "and/or" is used herein to describe only one relationship, and means that three relationships may exist, for example, A and/or B, and that three cases exist, A alone, A and B together, and B alone. In addition, the term "at least one" herein means any one of a plurality or any combination of at least two of a plurality, for example, including at least one of A, B, C, may mean including any one or more elements selected from the group consisting of A, B and C.
It has been found that with the popularity of DevOps and continuous integration/continuous delivery (CI/CD) concepts, modern software development is increasingly trending towards automation, rapid iteration. The pipeline technology is taken as an important link in the DevOps and is widely applied to the processes of code construction, test, deployment and the like so as to improve the development efficiency and reduce the manual operation. However, in practical applications, conventional pipeline configuration and management methods write scripts (e.g., jenkinsfile, gitLab CI profiles, etc.) to define the order of tasks, execution logic, and environmental configurations. This approach places high demands on the technical capabilities of the user, and is particularly difficult for developers who do not have the experience of script writing to set up and maintain complex pipelines. In addition, script styles and habits of different developers are inconsistent, so that pipeline scripts lack standardization, and team cooperation and maintenance are not facilitated.
Based on the research, the disclosure provides a pipeline generation method and device based on low-code visualization, which define standard variables required by pipeline execution, divide functions required by the pipeline into standardized components and store the standardized components in a standard component library, acquire target item types selected by users, load the standard component library corresponding to the target item types, construct a pipeline flow in response to the arrangement operation of the standardized components by the users, configure corresponding component parameters for each standardized component in response to the parameter configuration operation of the standardized components by the users, generate a pipeline script according to the component parameters and the pipeline flow, create environment resources required by executing the pipeline script, and execute the standardized components in sequence according to the pipeline flow. The method can help a user to quickly and accurately establish and manage the pipeline by standardizing variables and components, visually arranging a flow, automatically generating scripts and environment configuration files, reduce the technical threshold of configuration and maintenance, improve the development efficiency and reduce human errors.
For the sake of understanding the present embodiment, a pipeline generating method based on low-code visualization disclosed in the present embodiment will be described in detail first, where an execution subject of the pipeline generating method based on low-code visualization provided in the present embodiment is generally a computer device with a certain computing capability, and the computer device includes, for example, a terminal device or a server or other processing device, where the terminal device may be a User Equipment (UE), a mobile device, a User terminal, a cellular phone, a cordless phone, a Personal digital assistant (Personal DIGITAL ASSISTANT, PDA), a handheld device, a computing device, a vehicle-mounted device, a wearable device, or the like. In some possible implementations, the low code visualization-based pipeline generation method may be implemented by way of a processor invoking computer readable instructions stored in memory.
Referring to fig. 1, a flowchart of a pipeline generation method based on low code visualization according to an embodiment of the present disclosure is shown, where the method includes steps S101 to S104, where:
s101, defining standard variables required by pipeline execution, dividing functions required by the pipeline into standardized components, and storing the standardized components in a standard component library.
In a specific implementation, standard variables required for pipeline execution are predefined and stored, functions required for the pipeline are divided into standardized components, and input and output parameters and execution logic are preset for each component.
Here, the standard variable refers to a key parameter repeatedly used in the pipeline execution process. By defining standard variables, uniform variable names and structures can be ensured to be used by different users in different projects, custom operations are reduced, and the consistency of the flow is improved. The standard variables include at least project basic variables, environment variables, and configuration variables.
The project basic variable comprises project level information, a project name identifies a project to which a current pipeline belongs, a code warehouse address identifies a code storage position of the project and is used for pulling and updating codes, and a branch name identifies a code branch appointed to be constructed so as to ensure that construction and test operations are carried out on the correct branch.
The environment variable is used for describing environment configuration of pipeline operation and guaranteeing consistency of an execution environment, and comprises the steps of constructing version information of tools such as Maven, node. Js and the like, guaranteeing operation under a specified version and avoiding problems caused by version differences, operating environment configuration such as an operating system, a JDK version and the like and used for defining basic environments for construction and deployment, and resource limitation, namely defining resources (such as CPU and memory limitation) required by pipeline operation and avoiding resource shortage or waste.
The configuration variables are used for managing specific parameters in construction and deployment, and comprise deployment parameters such as target server addresses, ports and the like, ensuring that the application can be deployed to a target environment correctly, operation parameters such as starting parameters, log levels and the like, controlling the operation states of the application in different environments, and monitoring parameters such as defining some monitoring indexes, and facilitating the follow-up monitoring of the operation states of the pipeline or the application.
Therefore, by standardizing the variables, a user can directly select or fill in the visual interface without custom definition, and the consistency and maintainability of the pipeline are improved.
Further, the functionality of the pipeline typically includes several links, such as building, testing, deploying, packaging, etc., which are divided into standardized components for simplifying the pipeline creation flow and stored in a standard component library.
Each component is used for completing an independent function through component modularization, a compiling class component such as Maven compiling, node compiling and the like is responsible for compiling source codes into executable binary files, a building class component such as Docker mirror image building, product packaging and the like is responsible for generating deployable building products, a deployment class component such as Kubernetes deployment, service release and the like is responsible for releasing the building products to a target environment, and the components can be directly called by a user and placed in a pipeline in a visual arrangement mode without manually writing codes, so that the construction process of the pipeline is accelerated.
Wherein each component contains predefined interfaces and parameters that ensure that different users can obtain the same behavior when using the component. And the component parameter configuration is standardized, including input, output, dependency items and the like, so that unified management and debugging are convenient. All components are stored centrally in a standard component library, from which the user can drag and assemble components directly in the visualization interface to build the pipeline.
Therefore, the script writing requirement can be reduced, the reusability of the functional module is higher through unified component library management, and the maintenance cost is lower.
As a possible implementation mode, necessary software environment and environment configuration templates can be pre-installed to ensure the stability of construction and operation, and the method specifically comprises the steps of pre-installing the software environment, including required compiling tools, construction tools and the like, to ensure the integrity of tools in the pipeline operation process, pre-installing the environment configuration templates, including namespace configuration, key configuration, storage configuration and the like, to help a user to quickly set the construction environment, and software version management mechanism, including system maintenance software version information, automatically updating to related pipelines when the tool version needs to be updated or changed, and ensuring the consistency of the environment.
S102, acquiring a target item type selected by a user, loading the standard component library corresponding to the target item type, and constructing a pipeline flow in response to the arrangement operation of the user on the standardized component.
In specific implementation, the required item types (such as Java items and Node items) selected by a user through an interactive interface are determined, related standard component libraries are automatically loaded according to the selected item types, the user selects required components from the standard component libraries of the system, and the components are dragged to a canvas through a visual interface to construct a pipeline flow.
Specifically, referring to fig. 2, a flowchart of another pipeline generation method based on low-code visualization according to an embodiment of the present disclosure is shown, where the method includes steps S1021 to S1024, where:
s1021, determining the target item type in response to item type selection operation executed by a user on a preset interactive interface.
S1022, loading the corresponding standard component library according to the target item type, acquiring item basic information input by a user, and executing initialization configuration of the item according to the item basic information.
S1023, determining target components selected by a user in the standard component library, and determining the arrangement sequence of the target components in response to the arrangement operation of the user on the target components.
S1024, generating the pipeline flow according to the target component and the corresponding arrangement order.
In implementations, in the visual interface, the user can select the item type. The item type determines the set of components and the specific configuration required by the pipeline, and for example, the item type may include components of a Web application item (e.g., based on Java, python, node. Js, etc.) that typically require compiling, packaging, testing, deployment, etc., micro-service items that typically require building micro-service mirroring, pushing mirroring to a container repository, service registration and discovery, etc., and data processing items that may require data extraction, data processing script execution, result storage, etc. By selecting a target project type, the system can load a corresponding standard component library according to the specific requirements of the type, so that the pipeline generation is more accurate and accords with the project specific construction and deployment requirements.
Here, each item type has a corresponding standard component library, which is a predefined collection of components that contains all the functional modules that the item of that type may use. The system will select the corresponding functional module according to the item type. For example, for Web application projects, the standard component library may contain components for compilation, testing, packaging, deployment, etc., and for machine learning projects, components for data preprocessing, model training, model evaluation, etc.
Wherein, when loading the component library, the system can set default parameters for each component or provide a pre-configured template for the user to quickly adjust in subsequent operations. The content of the standard component library is displayed in the visual interface, so that a user can conveniently drag or select the components. These component modules may be grouped and categorized according to item type, helping the user to quickly find the desired functional module.
Therefore, by loading the corresponding standard component library, the components selected by the user can be ensured to meet the requirements of the current project types, the mixing of irrelevant components is avoided, and the subsequent assembly line construction flow is simplified.
Furthermore, after loading the standard component library of the target item type, a user can arrange the standardized components through a visual interface, and the user can drag the required components from the component library to a pipeline construction area and arrange the components according to the execution flow of the item. For example, a user may add a code compilation component first, then a test component, and finally a deployment component. The order of the arrangement will affect the order of execution of the pipeline.
Alternatively, for some pipeline steps, there is a front-to-back dependency. For example, the test component relies on the results of a successful compilation of code, and only after the compilation is successful can the test continue. The user can thus set the dependencies between the components during the orchestration process so that the pipeline executes in the correct order.
Here, through the orchestration operations above, the system will automatically generate a configuration file or script for the pipeline flow. The assembly parameter configuration comprises that the specific parameter configuration of each assembly is recorded in the flow file, and the assembly can be processed according to parameters set by a user during execution. Dependency relationship the system will save the dependency relationship between components, ensuring that each component is executed in order and conforms to logic.
Therefore, the generated pipeline flow can be directly executed in the system or integrated into other systems for automatic processing, so that the manual configuration process of a user is greatly simplified, and the error probability is reduced.
S103, responding to parameter configuration operation of a user on the standardized components, configuring corresponding component parameters for each standardized component, and generating a pipeline script according to the component parameters and the pipeline flow.
In specific implementation, providing standard variables and preferred parameters corresponding to each standard variable to a user through a preset interactive interface, responding to parameter configuration operation of the user on the standard variables, determining target component parameters and storing the target component parameters as parameter configuration files.
The system automatically associates standard variables and provides selection suggestions for the variables, so that a user can quickly select proper configuration, the system checks the integrity and the legality of parameters in real time, prompts the user to correct potential problems, and accordingly improves the accuracy of configuration, and all the parameters are saved as configuration files to ensure that the consistency of the parameters is maintained in the pipeline execution process.
Specifically, when configuring each standardized component, a user can perform custom configuration on parameters of the component through a visual interface. For example, the compiling component can set parameters such as compiling language (e.g. Java, python), compiling options (e.g. optimization level, target version) and the like by a user. And the testing component is used for enabling a user to select a testing framework (such as JUnit and PyTest), setting a testing path or file, generating a coverage rate report or not and the like. The deployment component comprises an IP address, a port, a deployment catalog, a command for restarting the service and the like of the target server. Build component the user can specify a build tool (e.g., maven, gradle) version, build command (e.g., clean, install), etc.
The parameter configuration items of each component may be different, the system provides corresponding parameter fields and default values according to the types of the components, and a user can adjust according to project requirements.
Further, after the user completes the parameter configuration operation, the system stores the parameter values and generates a corresponding parameter configuration file for each component. In the process, parameters input by a user are checked, so that the parameter is ensured to be in a correct format and the value is in an allowable range. Such as the format of the IP address, the range of port numbers, the validity of the file path, etc.
Here, the parameter values entered by the user are mapped into the internal configuration format of the standardized component. This step is to translate user input in the visual interface into executable code or configuration. For example, "compile options" entered by the user in the interface are mapped into buildOptions variables. The "test framework" entered by the user is mapped into testFramework configuration items. Generating a configuration file, namely generating independent configuration files by the component parameters or storing all parameter sets into one global configuration file. The configuration file may be in JSON, YAML, XML or the like format so that it can be loaded and read while the pipeline is executing.
After the component parameters are configured, the system generates the final pipeline script according to the parameters and the pipeline flow. Analyzing the pipeline flow, determining standardized components arranged in the pipeline flow and an execution sequence among the standardized components, extracting component parameters corresponding to the standardized components for each standardized component, constructing a pipeline script according to all the standardized components and the corresponding component parameters, and adding environment configuration information for the pipeline script.
Here, a flowchart of the user's configuration at the pipeline orchestration stage is analyzed, and the order of execution of the components and their dependencies are determined. The functional codes or commands of each component are gradually combined into a complete pipeline script according to the execution sequence and the dependency relationship. The commands and parameters for each stage are dynamically generated and populated according to the user's configuration.
As a possible implementation manner, after configuring the corresponding component parameters for each standardized component, an environment configuration file may also be generated by a method, specifically referring to fig. 3, which is a flowchart of another pipeline generation method based on low code visualization provided by an embodiment of the disclosure, where the method includes steps S201 to S204, where:
s201, determining a construction environment and a deployment environment selected by a user, and generating a corresponding naming space configuration file, wherein the naming space configuration file is used for determining a resource isolation range.
S202, generating a key configuration file, wherein the key configuration file at least comprises an image warehouse key and an access key.
S203, configuring persistent storage requirements for the construction environment and the deployment environment, and generating a persistent volume declaration configuration file, wherein the persistent volume declaration configuration file is used for meeting the data storage requirements during construction and operation.
S204, packaging the namespace configuration file, the key configuration file and the persistent volume statement configuration file to generate an environment configuration file.
In the implementation, in the environment configuration process, a user selects to construct and deploy an environment according to requirements, a system automatically configures related environment parameters and generates a configuration file, and the method specifically comprises the steps of generating a name space configuration file to determine a resource isolation range, generating a key configuration file comprising a mirror warehouse key, an access key and the like to ensure safety, configuring a persistent storage requirement, and generating a PVC (persistent volume statement) configuration to meet the data storage requirement in the construction and operation.
Here, the pipeline script is generated also taking into account system environment variables or resource configuration information. Such as setting the version and path of the build tool, configuring the persistent storage path, setting the namespace, key file path, etc. of the deployment environment. If the user defines conditional execution logic (such as "execute deployment only when test passes") during parameter configuration, the system will add corresponding judgment conditions to the script. Thus, the next step can be continuously executed only when the specific condition is met, the reliability of the pipeline is ensured, and the finally generated script is saved as an executable file.
The generated pipeline script can be directly applied to the project and executed through a Continuous Integration (CI) or Continuous Delivery (CD) platform. For example, on a CI/CD platform, the generated script can automatically execute a pipeline flow without user intervention, so that efficient completion of compiling, testing and deploying codes is ensured. The pipeline script may be configured to run periodically, automatically triggering construction and release. If a user needs to apply the same pipeline flow on multiple similar items, quick copying and multiplexing of the pipeline can be achieved by loading configuration files and scripts.
S104, creating environment resources required by executing the pipeline script, and executing the standardized components in sequence according to the pipeline flow.
In the implementation, after the pipeline script is generated, the system automatically creates environment resources required by execution, sequentially executes each task component according to the sequence of the pipeline, creates a name space, loads an environment configuration file and a secret key, ensures the isolation and safety of the resources, initializes persistent storage, meets the data requirements of the pipeline in the execution process, automatically executes each component of the pipeline according to the configuration of a user, and finally completes the construction, testing, deployment and release of projects.
Here, namespaces are created primarily for resource isolation. In a complex pipeline environment, different pipelines or items need to run in separate isolation environments to avoid resource conflicts and data pollution, in the previous step of profile generation, the system has generated a namespace profile defining the namespace name of the current pipeline. The system invokes a namespace management command (e.g., kubernetes kubectl CREATE NAMESPACE command) of the platform to generate an independent namespace for the current pipeline based on the information in the namespace profile.
Here, to ensure that secure resources (e.g., mirror libraries, databases, etc.) are accessible during the pipeline process, the system loads the corresponding key configuration in the environment resources, and the pipeline execution may need to pull the required build mirror from the mirror libraries. The key configuration file contains the credential information of the image repository, and the system will load the key into the namespace to ensure that the pipeline can access the image repository. If the pipeline needs to access a particular API or external resource (e.g., cloud storage, database, etc.), the system will load the access key into the environment variable for subsequent component calls. For example, the AWS key or other API key is loaded to allow a particular component to use external services.
Here, in a pipeline, some operations may generate temporary files or intermediate data that need to be stored in persistent storage to ensure data persistence and isolation. The persistent volume declaration configuration file is read, namely, in the configuration file generation stage, the system already generates the persistent volume declaration configuration file, wherein a storage path, an access mode and the like of the persistent storage are defined, and the required persistent volume is initialized through a storage management command according to information in the configuration file. The persistent volume is mounted into the pipeline environment so that different components of the pipeline can access the storage area.
Furthermore, after the configuration of the environment resources is completed, the pipeline flow is started, standardized components are sequentially executed according to a preset sequence, corresponding parameter settings are loaded from the parameter configuration file before each component is executed, in the process of executing the components, corresponding commands or scripts are called according to the types of the components, and after each component is executed, the system records the output result and the state (success or failure) of each component. If execution of a component fails, the system determines whether it is necessary to stall the pipeline or continue execution.
The embodiment of the disclosure provides a pipeline generation method based on low code visualization, which comprises the steps of defining standard variables required by pipeline execution, dividing functions required by the pipeline into standardized components and storing the standardized components in a standard component library, acquiring target item types selected by a user, loading the standard component library corresponding to the target item types, constructing a pipeline flow in response to arrangement operation of the user on the standardized components, configuring corresponding component parameters for each standardized component in response to parameter configuration operation of the user on the standardized components, generating a pipeline script according to the component parameters and the pipeline flow, creating environment resources required by executing the pipeline script, and sequentially executing the standardized components according to the pipeline flow. The method can help a user to quickly and accurately establish and manage the pipeline by standardizing variables and components, visually arranging a flow, automatically generating scripts and environment configuration files, reduce the technical threshold of configuration and maintenance, improve the development efficiency and reduce human errors.
It will be appreciated by those skilled in the art that in the above-described method of the specific embodiments, the written order of steps is not meant to imply a strict order of execution but rather should be construed according to the function and possibly inherent logic of the steps.
Based on the same inventive concept, there is also provided in the embodiments of the present disclosure a pipeline generating apparatus based on low-code visualization corresponding to the pipeline generating method based on low-code visualization, because the principle of the device in the embodiments of the present disclosure to solve the problem is similar to the pipeline generation method based on the low-code visualization in the embodiments of the present disclosure, the implementation of the device may refer to the implementation of the method, and the repetition is not repeated.
Referring to fig. 4, fig. 4 is a schematic diagram of a pipeline generating device based on low-code visualization according to an embodiment of the disclosure. As shown in fig. 4, a pipeline generating apparatus 400 based on low code visualization provided by an embodiment of the present disclosure includes:
The variable definition and component division module 410 is configured to define standard variables required for pipeline execution, divide functions required for the pipeline into standardized components, and store the standardized components in a standard component library.
And the pipeline flow construction module 420 is configured to acquire a target item type selected by a user, load the standard component library corresponding to the target item type, and construct a pipeline flow in response to the arrangement operation of the user on the standardized component.
And the pipeline script generating module 430 is configured to respond to a parameter configuration operation of a user on the standardized components, configure corresponding component parameters for each standardized component, and generate a pipeline script according to the component parameters and the pipeline flow.
And the pipeline execution device 440 is used for creating environment resources required for executing the pipeline script, and executing the standardized components in sequence according to the pipeline flow.
The process flow of each module in the apparatus and the interaction flow between the modules may be described with reference to the related descriptions in the above method embodiments, which are not described in detail herein.
The pipeline generating device based on low-code visualization defines standard variables required by pipeline execution, divides functions required by the pipeline into standardized components and stores the standardized components in a standard component library, obtains target item types selected by a user, loads the standard component library corresponding to the target item types, builds a pipeline flow in response to arrangement operation of the standardized components by the user, configures corresponding component parameters for each standardized component in response to parameter configuration operation of the standardized components by the user, generates a pipeline script according to the component parameters and the pipeline flow, creates environment resources required by executing the pipeline script, and sequentially executes the standardized components according to the pipeline flow. The method can help a user to quickly and accurately establish and manage the pipeline by standardizing variables and components, visually arranging a flow, automatically generating scripts and environment configuration files, reduce the technical threshold of configuration and maintenance, improve the development efficiency and reduce human errors.
Corresponding to the pipeline generation method based on low-code visualization in fig. 1 to 3, the embodiment of the disclosure further provides an electronic device 500, as shown in fig. 5, which is a schematic structural diagram of the electronic device 500 provided by the embodiment of the disclosure, including:
The system comprises a processor 51, a memory 52 and a bus 53, wherein the memory 52 is used for storing execution instructions, and comprises a memory 521 and an external memory 522, the memory 521 is also called an internal memory, the processor 521 is used for temporarily storing operation data in the processor 51 and data exchanged with the external memory 522 such as a hard disk, the processor 51 exchanges data with the external memory 522 through the memory 521, and when the electronic device 500 operates, the processor 51 and the memory 52 are communicated through the bus 53, so that the processor 51 executes the steps of the pipeline generation method based on low code visualization in fig. 1 to 3.
The disclosed embodiments also provide a computer readable storage medium having stored thereon a computer program which, when executed by a processor, performs the steps of the low code visualization based pipeline generation method described in the method embodiments above. Wherein the storage medium may be a volatile or nonvolatile computer readable storage medium.
The embodiments of the present disclosure further provide a computer program product, where the computer program product includes computer instructions, where the computer instructions, when executed by a processor, may perform the steps of the low-code visualization-based pipeline generating method described in the foregoing method embodiments, and specific details of the foregoing method embodiments may be referred to herein and are not described herein in detail.
Wherein the above-mentioned computer program product may be realized in particular by means of hardware, software or a combination thereof. In an alternative embodiment, the computer program product is embodied as a computer storage medium, and in another alternative embodiment, the computer program product is embodied as a software product, such as a software development kit (Software Development Kit, SDK), or the like.
It will be clear to those skilled in the art that, for convenience and brevity of description, reference may be made to the corresponding process in the foregoing method embodiment for the specific working process of the apparatus described above, which is not described herein again. In the several embodiments provided in the present disclosure, it should be understood that the disclosed apparatus and method may be implemented in other manners. The above-described apparatus embodiments are merely illustrative, for example, the division of the units is merely a logical function division, and there may be other manners of division in actual implementation, and for example, multiple units or components may be combined or integrated into another system, or some features may be omitted, or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed with each other may be through some communication interface, device or unit indirect coupling or communication connection, which may be in electrical, mechanical or other form.
The units described as separate units may or may not be physically separate, and units shown as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
In addition, each functional unit in each embodiment of the present disclosure may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit.
The functions, if implemented in the form of software functional units and sold or used as a stand-alone product, may be stored in a non-volatile computer readable storage medium executable by a processor. Based on such understanding, the technical solution of the present disclosure may be embodied in essence or a part contributing to the prior art or a part of the technical solution, or in the form of a software product stored in a storage medium, including several instructions to cause a computer device (which may be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in the embodiments of the present disclosure. The storage medium includes a U disk, a removable hard disk, a Read-Only Memory (ROM), a random access Memory (Random Access Memory, RAM), a magnetic disk, an optical disk, or other various media capable of storing program codes.
It should be noted that the foregoing embodiments are merely specific implementations of the disclosure, and are not intended to limit the scope of the disclosure, and although the disclosure has been described in detail with reference to the foregoing embodiments, it should be understood by those skilled in the art that any modification, variation or substitution of some of the technical features described in the foregoing embodiments may be made or equivalents may be substituted for those within the scope of the disclosure without departing from the spirit and scope of the technical aspects of the embodiments of the disclosure. Therefore, the protection scope of the present disclosure shall be subject to the protection scope of the claims.