Help Center> CodeArts Pipeline> User Guide> Pipeline Management> Configuring a Pipeline Template
Updated on 2023-11-28 GMT+08:00

Configuring a Pipeline Template

You can configure a pipeline template to quickly generate a pipeline. You can access the template page in the following ways.

  • Homepage: Access CodeArts Pipeline. On the Pipelines tab page that is displayed, switch to the Templates tab page.
  • Project: Access the pipeline of a project and choose More > Templates in the upper right corner.

The template in Templates corresponds to the template selected during pipeline creation.

Template Types

CodeArts Pipeline supports system and custom templates.

The operations on the template list are as follows:

Operation

Description

Click this icon and the Create Pipeline page is displayed.

Click this icon to follow a template. After a template is followed, the icon changes to . You can click to unfollow the template.

  • Click this icon and select Edit. On the Task Orchestration tab page that is displayed, you can edit the template as required.
  • Click this icon and select Copy. On the Task Orchestration tab page that is displayed, you can copy the template as required.
  • Click this icon and select Delete to delete the template as prompted.

System templates are used to copy or generate pipelines. They cannot be edited or deleted.

Creating or Configuring a Template

  1. Access the Templates tab page.
  2. Click Create Pipeline Template. The Task Orchestration tab page is displayed.

    Configure basic template information, template stages/tasks, and template parameters as required.

    • Basic Information: Specify the template name (mandatory), language (Java, Python, Node.js, Go or None (default)), and description (optional).
    • Pipeline Source: You do not need to set this parameter.
    • Stage Entry: Stage entry is not supported during template orchestration.
    • Task Orchestration: Currently, pipeline stages and some extensions can be added to a pipeline template. After tasks such as build, code check, deployment, and API test are configured in the template, corresponding tasks will be created when a pipeline is created using this template.
    • Parameter Configuration: Switch to the Parameter Configuration tab page and add parameters to the template as required. Pipeline template parameters include custom and predefined parameters. Custom parameters include string, enumeration, and auto-increment types. For details about how to configure parameters, see Managing Parameters.

  3. After configuring the information, click Save.

Creating a Pipeline

  1. On the Templates page, search for the target template, and click in the Operation column.
  2. On the Basic Information page, select a project, enter a pipeline name, select a pipeline source as needed, set related parameters, and click OK.
  3. The Task Orchestration page is displayed.
    • You can customize the template content or directly click Save.
    • For the pipeline generated using the template, tasks mounted to it are automatically generated by the system. To mount custom tasks to the pipeline, manually add them after the pipeline is generated.
  4. After configuring the information, click Save.