Why does this thing exist? Because I'm tired of finding out about problems with my Pipeline after I run it.
It is written in go because that is the language used by the Tekton code base. It makes us not have to re-invent the wheel to perform certain checks.
It currently supports the following:
- Verify PipelineTasks pass all required parameters to Tasks.
- Verify PipelineTasks pass known parameters to Tasks.
- Verify PipelineTasks pass parameters of expected types to Tasks.
- Verify PipelineTasks use known Task results.
- Resolve remote/local Tasks via PaC resolver, Bundles resolver, and embedded Task definitions.
- Resolve remote Tasks via git resolver.
- Specify runtime parameters that may be used in resolver parameter values
- Resolve missing Tasks from a local directory with
--task-dirwhen aTaskRefnames a Task without a resolver
Validate a Pipeline and search for referenced Tasks in a local directory tree:
tektor validate path/to/pipeline.yaml --task-dir path/to/tasksFuture work:
- Verify workspace usage.
- Verify PipelineRun parameters match parameters from Pipeline definition.
- Verify results are used according to their defined types.
- Remove printf calls and use proper logging.
- Don't fail on first found error.