Skip to main content
Pipeline Templates define reusable CI/CD configurations including stages, scripts, and trigger rules. Use templates to standardize pipeline behavior across projects and teams.

Key Concepts

Template

A reusable pipeline configuration containing stages, scripts, and trigger rules.

Stage

A pipeline phase (build, test, deploy) with ordering and activation settings.

Script

Reusable code snippets injected into pipeline stages based on provider type.

Trigger Config

YAML-based webhook rules defining when pipelines should run.

Required Permissions

ActionPermission
View templatesiam:project:cicd:templates:read
Create templatesiam:project:cicd:templates:write
Edit templatesiam:project:cicd:templates:write
Delete templatesiam:project:cicd:templates:delete

Template Types

TypeDescriptionActions
SystemPre-built templates provided by the platformView, Duplicate
CustomUser-created templatesView, Edit, Duplicate, Delete
System templates cannot be modified or deleted. Duplicate a system template to create a customizable copy.

Template Requirements

Templates can specify which features a project must have configured:
RequirementDescription
NamespaceProject must belong to a namespace
GitOpsProject must have GitOps configuration
EnvironmentsProject must have deployment environments defined
Helm ChartProject must use Helm for deployments

Deployment Kinds

Templates support different deployment strategies:
KindDescription
kubernetesStandard Kubernetes deployment
helmHelm chart-based deployment
dockerDocker container deployment
serverlessServerless function deployment

How to Create a Template

1

Click Add Template

Click the Add Template button in the header.
2

Configure General Settings

Enter template name, description, select an icon, and choose deployment kind.
3

Set Requirements

Enable required features: Namespace, GitOps, Environments, Helm Chart.
4

Configure Helm Defaults (Optional)

If using Helm, set default repository, tag, and chart path.
5

Add Stages

Navigate to Stages tab and define pipeline stages with order and names.
6

Add Scripts

Navigate to Scripts tab and add reusable script snippets.
7

Configure Triggers

Navigate to Trigger tab and define webhook trigger rules in YAML.
8

Save

Click Save Changes to create the template.

How to View a Template

1

Find the Template

Locate the template in the list. Use filters to show System or Custom templates.
2

Click View

Click on the template row to open the detail page.
3

Browse Tabs

Navigate through General, Stages, Scripts, Trigger, and Preview tabs.

How to Edit a Template

1

Find the Template

Locate a custom template in the list.
2

Open Detail Page

Click on the template row.
3

Modify Settings

Update any configuration across the available tabs.
4

Save

Click Save Changes to apply updates.
System templates cannot be edited. Duplicate the template first to create an editable copy.

How to Duplicate a Template

1

Find the Template

Locate any template (system or custom) in the list.
2

Click Duplicate

Click the duplicate (copy) icon on the template row.
3

Review

A new custom template is created with all settings copied.
4

Rename

Edit the duplicated template to give it a unique name.
Duplicate system templates to create customized versions that you can modify.

How to Delete a Template

1

Find the Template

Locate a custom template to delete.
2

Click Delete

Click the delete (trash) icon on the template row.
3

Confirm

Confirm the deletion. This action cannot be undone.
Deleting a template does not affect existing projects using it, but new projects cannot use the deleted template.

Managing Stages

Adding a Stage

1

Open Stages Tab

Navigate to the Stages tab in the template detail page.
2

Click Add Stage

Click the Add Stage button.
3

Configure Stage

Enter display name, set order number, and toggle active status.
4

Save

Click Save Changes to persist the stage.

Stage Properties

PropertyDescription
Display NameHuman-readable stage name shown in pipelines
OrderExecution sequence (lower numbers run first)
ActiveWhether the stage is enabled in pipelines

Reordering Stages

Change the order value for each stage to control execution sequence. Stages execute in ascending order (1, 2, 3…).

Managing Scripts

Adding a Script

1

Open Scripts Tab

Navigate to the Scripts tab in the template detail page.
2

Click Add Script

Click the Add Script button.
3

Configure Script

Enter script key, select script type and provider type, then add the script content.
4

Save

Click Save Changes to persist the script.

Script Properties

PropertyDescription
Script KeyUnique identifier for referencing the script
Script TypeCategory of script (build, test, deploy, etc.)
Provider TypeGit provider the script is compatible with (GitHub, GitLab, Bitbucket)
ContentThe actual script code

Configuring Trigger Rules

Trigger Configuration Format

Trigger rules are defined in YAML format and control when pipelines are triggered by webhooks.
on:
  push:
    branches:
      - main
      - develop
      - feature/*

  pull_request:
    branches:
      - main
    types:
      - opened
      - synchronize

  tag:
    patterns:
      - v*
      - release-*

environment_mapping:
  main: prod
  develop: staging
  feature/*: dev

Trigger Events

EventDescription
pushTriggered on commits pushed to matching branches
pull_requestTriggered on PR events (opened, synchronize, merged)
tagTriggered when tags matching patterns are created

Branch Patterns

Use glob patterns for flexible branch matching:
PatternMatches
mainExact match for “main” branch
feature/*Any branch starting with “feature/“
release/*Any branch starting with “release/“
*All branches

Using Preview

The Preview tab generates sample .kodeshift configuration files based on the template settings.
1

Open Preview Tab

Navigate to the Preview tab in the template detail page.
2

Configure Parameters

Select Git provider, project name, and environments.
3

Generate Preview

Click Generate to create sample configuration files.
4

Review Output

Examine the generated YAML files to verify template behavior.
Use Preview to validate your template configuration before applying it to projects.

Troubleshooting

  • System templates cannot be edited; duplicate first
  • Verify you have write permission
  • Check if another user is editing the template
  • System templates cannot be deleted
  • Verify you have delete permission
  • Try refreshing the page
  • Verify stage order numbers are correct
  • Lower numbers execute first
  • Check if stages are marked as active
  • Verify script provider type matches project provider
  • Check script key is correctly referenced
  • Ensure script is saved
  • Verify YAML syntax is valid
  • Check branch patterns match your branches
  • Ensure webhook is configured for the repository
  • Verify event type is included in trigger config
  • All required parameters must be selected
  • Template must have at least one stage
  • Check for validation errors in other tabs

FAQ

System templates are provided by the platform and cannot be modified. Custom templates are user-created and fully editable. Duplicate a system template to create a customizable version.
Yes. Templates are available to all projects within your organization. Any project can use any template they have read access to.
Currently, templates must be created manually. Export your project’s pipeline configuration and use it as a reference when creating a new template.
Yes. The trigger YAML can define multiple events (push, pull_request, tag) with different branch patterns and settings.
Existing pipelines continue using their current configuration. Template changes only affect new projects or when a project explicitly re-applies the template.
Use the Preview tab to generate sample configuration files. Review the output to verify the template produces the expected pipeline configuration.
Yes. Scripts can use template variables and environment-specific values. Check the script documentation for available variables.
There is no hard limit on stages. However, keep pipelines focused and consider splitting complex workflows into multiple pipelines.

Best Practices

Template Design

  • Create templates for common workflow patterns
  • Keep templates focused on specific use cases
  • Use descriptive names and descriptions
  • Document template requirements clearly

Stages

  • Order stages logically (build → test → deploy)
  • Use consistent naming across templates
  • Keep stage count manageable (3-5 stages typical)
  • Disable stages instead of deleting when debugging

Scripts

  • Write provider-agnostic scripts when possible
  • Use script keys that describe the action
  • Keep scripts modular and reusable
  • Test scripts independently before adding to templates

Trigger Configuration

  • Use specific branch patterns over wildcards
  • Map environments appropriately for each branch
  • Include only necessary event types
  • Document trigger behavior in template description

Organization

  • Prefix template names with team or purpose
  • Use icons to visually categorize templates
  • Review and update templates periodically
  • Remove unused custom templates