Skip to content

Commit 2f00e03

Browse files
waveywavesclaude
andcommitted
feat(runners): implement Tekton Pipeline runner with native metadata discovery
Add a new TektonPipeline runner that discovers Tekton metadata natively using a two-tier approach: - Tier 1: HOSTNAME env var and ServiceAccount namespace file (always available) - Tier 2: K8s API pod labels for rich tekton.dev/* metadata (best-effort) The runner promotes 7 env vars (2 required, 5 optional) following the Dagger runner pattern. TEKTON_TASK_NAME is optional since inline taskSpec pipelines lack the tekton.dev/task label. TEKTON_TASKRUN_NAME falls back to hostname derivation when K8s API labels are unavailable. context.Context is passed as a function parameter to discoverLabelsFromKubeAPI() rather than stored in the struct, following Go best practices. Includes comprehensive unit tests, e2e test binary with Environment validation, and tekton:// URI scheme for RunURI. Signed-off-by: Vibhav Bobade <vibhav.bobde@gmail.com> Co-Authored-By: Claude <noreply@anthropic.com>
1 parent 3d856a3 commit 2f00e03

4 files changed

Lines changed: 1394 additions & 8 deletions

File tree

pkg/attestation/crafter/runner.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,8 +96,8 @@ var RunnerFactories = map[schemaapi.CraftingSchema_Runner_RunnerType]RunnerFacto
9696
schemaapi.CraftingSchema_Runner_TEAMCITY_PIPELINE: func(_ string, _ *zerolog.Logger) SupportedRunner {
9797
return runners.NewTeamCityPipeline()
9898
},
99-
schemaapi.CraftingSchema_Runner_TEKTON_PIPELINE: func(_ string, _ *zerolog.Logger) SupportedRunner {
100-
return runners.NewTektonPipeline()
99+
schemaapi.CraftingSchema_Runner_TEKTON_PIPELINE: func(_ string, logger *zerolog.Logger) SupportedRunner {
100+
return runners.NewTektonPipeline(timeoutCtx, logger)
101101
},
102102
}
103103

0 commit comments

Comments
 (0)