From a318f262a9977356c9125cbf4b1ff96dc1c55ed5 Mon Sep 17 00:00:00 2001 From: Xe Iaso Date: Mon, 4 May 2026 22:51:58 -0400 Subject: [PATCH] provider/tekton: add tangled metadata as params This allows you to do tests against the individual commit being operated against instead of just the most recent commit on HEAD. These are a no-op when pipelines do not use these parameters. Example usage: ```yaml steps: - name: git-clone image: reg.xeiaso.net/xe/x/git:latest script: | set -euo pipefail git clone $(params.url) /workspace/repo-data/repo cd /workspace/repo-data/repo git checkout $(params.commit) ``` Signed-off-by: Xe Iaso --- provider_tekton.go | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/provider_tekton.go b/provider_tekton.go index 1b8ced1..1476e10 100644 --- a/provider_tekton.go +++ b/provider_tekton.go @@ -245,6 +245,20 @@ func buildTektonPipelineRun( "pipelineRef": map[string]any{ "name": cfg.Pipeline, }, + "params": []any{ + map[string]any{ + "name": "commit", + "value": commit, + }, + map[string]any{ + "name": "branch", + "value": branch, + }, + map[string]any{ + "name": "actor", + "value": actor, + }, + }, }, } spec := obj["spec"].(map[string]any) -- 2.51.2