Help Center> CodeArts Pipeline> User Guide> Pipelines> Configuring a Pipeline Template
Updated on 2024-05-29 GMT+08:00

Configuring a Pipeline Template

You can quickly generate a pipeline based on a template. The template page can be accessed via:

  • Homepage: Access the Pipeline homepage and switch to the Templates tab page.
  • Project: Access the pipeline list in a project and choose More > Templates in the upper right corner.

The templates in Templates can be selected during pipeline creation.

Template Types

CodeArts Pipeline provides system and custom templates.

You can perform the following operations on templates.

Icon

Description

If you click this icon, you will be redirected to the page where you can quickly create a pipeline using a template.

Click this icon to favorite a template. After a template is favorited, the icon changes to . You can click to unfavorite the template.

  • Click this icon and select Edit. On the displayed Task Orchestration tab page, you can edit the template.
  • Click this icon and select Clone. On the displayed Task Orchestration tab page, you can clone the template.
  • Click this icon and select Delete to delete the template as prompted.

System templates are used to clone 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 information, stages/jobs, and parameters.

    • Basic Information: Specify the template name (mandatory), language (Java, Python, Node.js, Go, .Net, C++, PHP), and description (optional). Language is None by default.
    • Code Source: You do not need to set this parameter.
    • Admission Settings: This function is not supported for template orchestration.
    • Task Orchestration: Pipeline stages and some extensions can be added to a pipeline template. After jobs such as build, code check, deployment, and API test are configured in a template, corresponding jobs will be created when you create a pipeline using this template.
    • Parameter Configuration: Switch to the Parameter Configuration tab page and add parameters to the template. 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 Configuring Pipeline 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 Create Pipeline page, enter a pipeline name, select a project, select a code source, set other parameters, and click OK.
  3. Access the Task Orchestration page.
    • You can customize the template or directly click Save.
    • For the template-generated pipeline, jobs mounted to it are generated by the system. To mount custom jobs to the pipeline, manually add them after the pipeline was generated.
  4. After configuring the information, click Save.