Pipeline Templates define reusable CI/CD configurations including stages, scripts, and trigger rules. Use templates to standardize pipeline behavior across projects and teams.Documentation Index
Fetch the complete documentation index at: https://docs.shiftlabs.dev/llms.txt
Use this file to discover all available pages before exploring further.
Key Concepts
Template
Stage
Script
Trigger Config
Required Permissions
| Action | Permission |
|---|---|
| View templates | iam:project:cicd:templates:read |
| Create templates | iam:project:cicd:templates:write |
| Edit templates | iam:project:cicd:templates:write |
| Delete templates | iam:project:cicd:templates:delete |
Template Types
| Type | Description | Actions |
|---|---|---|
| System | Pre-built templates provided by the platform | View, Duplicate |
| Custom | User-created templates | View, Edit, Duplicate, Delete |
Template Requirements
Templates can specify which features a project must have configured:| Requirement | Description |
|---|---|
| Namespace | Project must belong to a namespace |
| GitOps | Project must have GitOps configuration |
| Environments | Project must have deployment environments defined |
| Helm Chart | Project must use Helm for deployments |
Deployment Kinds
Templates support different deployment strategies:| Kind | Description |
|---|---|
| kubernetes | Standard Kubernetes deployment |
| helm | Helm chart-based deployment |
| docker | Docker container deployment |
| serverless | Serverless function deployment |
How to Create a Template
Configure General Settings
How to View a Template
How to Edit a Template
How to Duplicate a Template
How to Delete a Template
Managing Stages
Adding a Stage
Stage Properties
| Property | Description |
|---|---|
| Display Name | Human-readable stage name shown in pipelines |
| Order | Execution sequence (lower numbers run first) |
| Active | Whether 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
Configure Script
Script Properties
| Property | Description |
|---|---|
| Script Key | Unique identifier for referencing the script |
| Script Type | Category of script (build, test, deploy, etc.) |
| Provider Type | Git provider the script is compatible with (GitHub, GitLab, Bitbucket) |
| Content | The actual script code |
Configuring Trigger Rules
Trigger Configuration Format
Trigger rules are defined in YAML format and control when pipelines are triggered by webhooks.Trigger Events
| Event | Description |
|---|---|
| push | Triggered on commits pushed to matching branches |
| pull_request | Triggered on PR events (opened, synchronize, merged) |
| tag | Triggered when tags matching patterns are created |
Branch Patterns
Use glob patterns for flexible branch matching:| Pattern | Matches |
|---|---|
main | Exact 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.
Troubleshooting
Cannot edit template
Cannot edit template
- System templates cannot be edited; duplicate first
- Verify you have write permission
- Check if another user is editing the template
Cannot delete template
Cannot delete template
- System templates cannot be deleted
- Verify you have delete permission
- Try refreshing the page
Stages not executing in order
Stages not executing in order
- Verify stage order numbers are correct
- Lower numbers execute first
- Check if stages are marked as active
Scripts not applying to pipeline
Scripts not applying to pipeline
- Verify script provider type matches project provider
- Check script key is correctly referenced
- Ensure script is saved
Trigger not firing
Trigger not firing
- 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
Preview not generating
Preview not generating
- All required parameters must be selected
- Template must have at least one stage
- Check for validation errors in other tabs
FAQ
What's the difference between system and custom templates?
What's the difference between system and custom templates?
Can I share templates between projects?
Can I share templates between projects?
How do I create a template from an existing project?
How do I create a template from an existing project?
Can I have multiple trigger configs in one template?
Can I have multiple trigger configs in one template?
What happens if I update a template used by existing projects?
What happens if I update a template used by existing projects?
How do I test a template before using it?
How do I test a template before using it?
Can scripts reference template variables?
Can scripts reference template variables?
What's the maximum number of stages in a template?
What's the maximum number of stages in a template?
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