Writing Pipelines for Tekton Hub
TOC
OverviewHub-Specific MetadataRequired Labels for HubRequired Annotations for HubHub Task ReferencesCatalog Task Reference for HubHub Categories and TagsStandard Pipeline CategoriesEffective Pipeline TaggingHub Parameter StandardsHub-Specific Parameter RequirementsHub Pipeline TemplateHub Best PracticesTask Composition for HubWorkspace Management for HubPipeline Reusability for HubHub Testing RequirementsRequired Pipeline Test FilesHub Pipeline Validation ChecklistSecurity for Hub PipelinesHub Security RequirementsDocumentation RequirementsHub Pipeline Documentation StandardsHub Publishing Checklist✅ Hub Compliance✅ Quality StandardsOverview
This guide covers the specific requirements and best practices for creating Pipelines that work with Tekton Hub catalogs. It focuses on Hub-specific metadata, validation, and composition standards.
Hub-Specific Metadata
Required Labels for Hub
Required Annotations for Hub
Hub Task References
Catalog Task Reference for Hub
Hub Categories and Tags
Standard Pipeline Categories
- Integration & Delivery
- Continuous Integration
- Continuous Deployment
- Testing
- Security
- Build & Package
Effective Pipeline Tagging
- Use workflow-specific tags (
ci,cd,cicd) - Include technology stacks (
nodejs,java,python,golang) - Add deployment targets (
kubernetes,cloud,containers)
Hub Parameter Standards
Hub-Specific Parameter Requirements
Hub Pipeline Template
Hub Best Practices
Task Composition for Hub
- Use Tasks from the same Hub catalog when possible
- Reference specific task versions for stability
- Provide clear parameter mappings
- Document task dependencies
Workspace Management for Hub
- Use descriptive workspace names and descriptions
- Mark optional workspaces as
optional: true - Document workspace data flow between tasks
- Minimize workspace requirements where possible
Pipeline Reusability for Hub
- Design for common use cases
- Provide flexible parameters
- Include reasonable defaults
- Support multiple deployment scenarios
Hub Testing Requirements
Required Pipeline Test Files
- Provide working
samples/directory withPipelineRunexamples - Include
run.yamldemonstrating typical usage - Test with various parameter combinations
- Validate workspace configurations
- Test error handling scenarios
Hub Pipeline Validation Checklist
- Required
Hubmetadata present - Sample
PipelineRunworks correctly - All parameters documented with descriptions
- Workspaces properly described
-
Taskreferences useHubcatalogtasks - Platform compatibility verified
- Finally
tasksincluded for cleanup
Security for Hub Pipelines
Hub Security Requirements
- No hardcoded secrets in
Pipelinedefinitions - Use secure task references
- Document required service account permissions
- Follow principle of least privilege
- Validate input parameters
Documentation Requirements
Hub Pipeline Documentation Standards
- Include comprehensive
README.mdinpipelinedirectory - Document the complete workflow and purpose
- Provide clear parameter descriptions
- Include usage examples and common configurations
- Document prerequisites and dependencies
- Explain workspace requirements
- Include troubleshooting guide
Hub Publishing Checklist
✅ Hub Compliance
- Required Hub metadata (labels and annotations) present
- Version label matches directory structure
- All parameters have clear descriptions
- Workspaces properly documented
- Uses Hub catalog task references
- Platform compatibility specified
- Working sample PipelineRun provided
- Complete README with usage examples
- Passes Hub validation requirements
✅ Quality Standards
- Pipeline is reusable across environments
- Error handling and cleanup implemented
- No hardcoded values or secrets
- Security best practices followed
- Cross-platform compatibility verified
- Documentation is complete and accurate
- Performance optimized with parallel execution where possible