Creating a Custom Catalog
TOC
OverviewCatalog Directory StructureRequired Repository StructureKey Structure RulesTekton Hub Validation RequirementsCritical Requirements (Resource Ignored if Missing)1. Required Label2. Required Annotations3. Required Spec Field4. File Naming RuleRecommended Annotations (Improves Discoverability)Standard CategoriesComplete Task ExampleComplete Pipeline ExampleSetting Up Your RepositoryInitialize Repository StructureRoot OWNERS FileVersion ManagementSemantic Versioning RulesManaging VersionsUsing Resources from CatalogsUsing Hub Resolver for TasksUsing Hub Resolver for PipelinesHub Resolver ParametersExample: Different CatalogsUsing Hub Resolver in PipelinesNext Steps: Adding to Tekton HubValidation ChecklistCritical Validation (Must Pass)Recommended ValidationTest Your CatalogPublishing Your CatalogNext StepsOverview
This tutorial guides you through creating a catalog repository with Tekton resources (Tasks, Pipelines). You'll learn the structure, metadata standards, and validation requirements that ensure your resources work properly with Tekton Hub.
For configuring an existing catalog in Tekton Hub, see Adding Custom Catalogs.
Catalog Directory Structure
All Tekton catalogs must follow the Tekton Catalog Organization Standard. This standard ensures consistency and compatibility with Tekton Hub.
Required Repository Structure
Key Structure Rules
- Resource Types: Only
task/andpipeline/directories are supported - Versioning: Each resource uses semantic versioning (
0.1,0.2,1.0) - Multiple Versions: Different versions coexist as separate directories
- Required Files: Each version must have
YAMLdefinition.READMEandOWNERSare optional but recommended. - Optional Samples:
samples/directory for usage examples
Tekton Hub Validation Requirements
Tekton Hub has strict validation rules that determine whether your resources will be displayed. Resources that fail validation are ignored completely.
Critical Requirements (Resource Ignored if Missing)
These fields are absolutely mandatory - missing any will cause your resource to be completely ignored:
1. Required Label
2. Required Annotations
3. Required Spec Field
4. File Naming Rule
YAMLfilename MUST match resource name- Example:
Tasknamedbuild-image→ file must bebuild-image.yaml - Pattern enforced:
task/<name>/<version>/<name>.yamlorpipeline/<name>/<version>/<name>.yaml
Recommended Annotations (Improves Discoverability)
Standard Categories
Choose from these standard Tekton Hub categories:
- Automation, Build Tools, CLI, Cloud
- Code Quality, Continuous Integration
- Deployment, Developer Tools
- Image Build, Integration & Delivery
- Git, Kubernetes, Messaging
- Monitoring, Networking, Publishing
- Security, Storage, Testing
Important: Resources with categories not configured in your Tekton Hub instance will not be displayed, even if they use valid category names.
For instructions on adding custom categories to your Hub instance, see Categories Configuration.
Complete Task Example
Here's a complete Task showing all required and recommended fields:
Important: This file must be saved as task/echo-hello/0.1/echo-hello.yaml (filename matches task name).
Complete Pipeline Example
Here's a complete Pipeline showing all required and recommended fields:
Important: This file must be saved as pipeline/hello-pipeline/0.1/hello-pipeline.yaml (filename matches pipeline name).
Setting Up Your Repository
Initialize Repository Structure
Root OWNERS File
Define catalog maintainers:
Version Management
Semantic Versioning Rules
- 0.1 → 0.2: Bug fixes, improvements
- 0.x → 1.0: New features, stable release
- 1.x → 2.0: Breaking changes
Managing Versions
- Each version gets its own directory
- Multiple versions coexist
- Document breaking changes in
README
Using Resources from Catalogs
Once your catalog is configured in Tekton Hub, users can reference your resources using the Hub resolver. Different catalogs have different resolver configurations.
Using Hub Resolver for Tasks
Using Hub Resolver for Pipelines
Hub Resolver Parameters
The Hub resolver supports these parameters:
Note: For custom catalogs, you typically need to specify catalog and type: tekton parameters explicitly.
For Hub resolver configuration and setup, see Hub Resolver Configuration.
Example: Different Catalogs
Using Hub Resolver in Pipelines
You can mix tasks from different catalogs within the same Pipeline:
Next Steps: Adding to Tekton Hub
Once your catalog repository is ready, it needs to be configured in Tekton Hub before users can access it via resolver.
For complete instructions on:
- Adding your catalog to
Tekton Hubconfiguration SSHauthentication for private repositories- Testing and troubleshooting catalog integration
Validation Checklist
Before publishing your catalog, verify each resource meets all Tekton Hub requirements:
Critical Validation (Must Pass)
- File naming:
task/<name>/<version>/<name>.yamlpattern followed exactly - Version label:
app.kubernetes.io/version: "0.1"matches directory version - MinVersion annotation:
tekton.dev/pipelines.minVersion: "0.17.0"present - Description field:
spec.description: "..."is not empty -
YAMLsyntax: Resource validates withkubectl apply --dry-run
Recommended Validation
- Display name:
tekton.dev/displayNameprovided for better UX - Categories: Valid category from standard list
- Tags: Descriptive, comma-separated tags (no spaces after commas)
- Documentation: Complete
README.mdfor each resource - Examples: Working samples in
samples/run.yaml
Test Your Catalog
Publishing Your Catalog
- Push to
Gitrepository (GitHub,GitLab, etc.) - Test locally - Validate structure and
YAMLsyntax - Add to
Tekton Hub- See Adding Custom Catalogs - Share with team - Your resources are now discoverable via
Hub resolver
Next Steps
Now that you understand catalog structure and standards, dive deeper into resource development:
- Writing Custom Tasks - In-depth
Taskcreation guide - Writing Custom Pipelines -
Pipelineorchestration patterns