Introducing Catlin 😺
This post will introduce you to Catlin and how to use it…
What is Catlin?
Catlin is a command-line tool that Lints Tekton Resources and Catalogs.
It is currently being developed for Tetkon Catalogs.
You can find it here.
Why Catlin?
Tekton Catalog has a defined structure, how tekton resources should be arranged, and how the resource file should be structured. The structure is evolving with new developments. You can check out the doc defining the structure here.
The Tekton Community Catalog tektoncd/catalog is currently maintained according to the same structure.
./task/
/argocd
/0.1
/README.md
/argocd.yaml
/samples/deploy-to-k8s.yaml
/0.2/...
/OWNERS
/README.md
/golang-build
/0.1
/README.md
/golang-build.yaml
/samples/golang-build.yaml
./pipelines/
/go-release
/0.1
/README.md
/go-release.yaml
/samples/dummy-go-release.yaml
The resource file also has a defined structure where some fields are included which would be helpful in displaying the resource on Tekton Hub. You can find the file structure here.
Tekton Hub provides a central hub for searching and sharing Tekton resources across many distributed Tekton catalogs. The Hub currently displays a curated set of community contributed tasks from the Tekton Community Catalog. It is currently launched as a preview. Know more about hub at tektoncd/hub.
So, to enforce all these rules catlin is being developed which will help the developers while developing the resource for the catalog. This also can be integrated with CI so that it will make sure all new resources added in Catalog are following the structure.
Features
This will validates
- If the resource is in a valid path
- If the resource is a valid Tekton Resource
- If all mandatory fields are added to the resource file
- If all images used in Task Spec are tagged
How to use it?
catlin validate <path-to-the-file-in-catalog>
- Many more features to come… ^.^
Check out the repository to know more about it. Please file any feature request or issue on the repository.
Contributions are Welcome…😺