Documentation
¶
Overview ¶
Package cluster implements backend.Backend by submitting PipelineRuns to a real Tekton install on a local Kubernetes cluster (k3d).
Index ¶
- type Backend
- func (b *Backend) BuildPipelineRunObject(in backend.PipelineRunInvocation, namespace string) (any, error)
- func (b *Backend) Cleanup(_ context.Context) error
- func (b *Backend) Prepare(ctx context.Context, _ backend.RunSpec) error
- func (b *Backend) RunPipeline(ctx context.Context, in backend.PipelineRunInvocation) (backend.PipelineRunResult, error)
- func (b *Backend) RunTask(ctx context.Context, inv backend.TaskInvocation) (backend.TaskResult, error)
- type ClientBundle
- type Options
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Backend ¶
type Backend struct {
// contains filtered or unexported fields
}
func New ¶
New is the production constructor: it does not connect — Prepare lazily ensures the cluster, installs Tekton, and builds the kube clients.
func NewWithClients ¶
func NewWithClients(cb ClientBundle) *Backend
NewWithClients is a test constructor that injects a pre-built ClientBundle.
func (*Backend) BuildPipelineRunObject ¶
func (b *Backend) BuildPipelineRunObject(in backend.PipelineRunInvocation, namespace string) (any, error)
BuildPipelineRunObject constructs the PipelineRun unstructured (exposed for unit-test inspection).
func (*Backend) RunPipeline ¶
func (b *Backend) RunPipeline(ctx context.Context, in backend.PipelineRunInvocation) (backend.PipelineRunResult, error)
func (*Backend) RunTask ¶
func (b *Backend) RunTask(ctx context.Context, inv backend.TaskInvocation) (backend.TaskResult, error)
RunTask delegates to RunPipeline by wrapping the single TaskRun call into a trivial one-task pipeline. The engine should prefer RunPipeline directly.
type ClientBundle ¶
type ClientBundle struct {
Dynamic dynamic.Interface
Kube kubernetes.Interface
Apiext apiextclient.Interface
}
Click to show internal directories.
Click to hide internal directories.