Pipeline Template Use in Application Repos
Understand how pipeline templates integrate with your application repositories to enable automated builds and deployments.
Summary
Pipeline templates provide a one-time application of CI/CD best practices to your repository. Once applied during app registration, your team owns the workflow files and can customize them as needed.
How It Works
The Pipeline Template Concept
- Set up environments first - Define your cluster namespace targets (dev, staging, prod)
- Register your application - Konstruct applies the pipeline template
- Template creates workflow files - Adds
publish.yamlanddeploy.yamlto your repo - Your team owns the workflows - Full control to modify and customize
What Pipeline Templates Provide
Pipeline templates give you a best practice starting point:
- Production-ready GitHub Actions workflows
- Container build and publish automation
- Helm chart generation and versioning
- Multi-stage deployment through environments
The Power of Environments
With Konstruct's environments feature, your pipeline can:
- Deploy dynamically to any set of clusters in an environment
- Abstract infrastructure - Teams don't worry about underlying clusters
- Scale deployments - Add/remove clusters without changing pipelines
- Maintain consistency - Same deployment pattern across all environments
One-Time Application
Important: Pipeline templates are applied once during application registration:
- Template files are copied to your repository
- Workflows are configured for your environments
- Your team has complete ownership
- Future template updates don't affect existing apps
This approach ensures:
- Team autonomy - Modify workflows to fit your needs
- No surprises - Template changes don't break existing apps
- Best practices - Start with proven patterns
- Flexibility - Evolve your CI/CD as requirements change
Example Workflow
When you register an app with environments configured:
# Your app targets these environments (set during registration)
Stage 1: dev-environment → dev namespace → 2 clusters
Stage 2: staging-environment → staging namespace → 1 cluster
Stage 3: prod-environment → prod namespace → 5 clusters
The pipeline template automatically:
- Builds and publishes containers on commits to main
- Deploys to ALL clusters in dev-environment
- Promotes through staging-environment
- Advances to ALL clusters in prod-environment
Your team never manages individual clusters - just environments!
Customizing Your Workflows
After template application, teams commonly:
- Add test stages and quality gates
- Integrate security scanning tools
- Customize deployment strategies
- Add approval workflows
- Integrate with monitoring systems
The workflows are standard GitHub Actions - customize as needed!
What's Next?
- Create environments to define deployment targets
- Register applications to apply pipeline templates
- Learn about custom pipeline templates