Skip to content

chore(runner): First cut on Tekton pipeline detection#2581

Merged
javirln merged 3 commits into
chainloop-dev:mainfrom
javirln:feat/2545
Jan 8, 2026
Merged

chore(runner): First cut on Tekton pipeline detection#2581
javirln merged 3 commits into
chainloop-dev:mainfrom
javirln:feat/2545

Conversation

@javirln

@javirln javirln commented Nov 25, 2025

Copy link
Copy Markdown
Member

This PR adds automatic detection and metadata collection for Tekton Pipelines CI/CD environment.

Changes

  • Added TEKTON_PIPELINE runner type to the protobuf schema
  • Implemented Tekton runner with filesystem-based detection via /tekton/results directory
  • Registered runner in factory for automatic environment discovery

Detection Strategy

The Tekton runner detects execution environments by checking for the presence of Tekton's /tekton/results directory, which is mounted in all TaskRun and PipelineRun containers. This approach works reliably for both standalone TaskRuns and tasks within Pipelines.

Metadata Collection via Kubernetes Downward API

TBD in a separated PR

Tackles issue #2545

@javirln javirln self-assigned this Nov 25, 2025
@javirln javirln requested review from jiparis and migmartri November 25, 2025 11:46

@migmartri migmartri left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ptal at the test error, and the spurious descriptor.ts

So in the end we have access to env vars and dashboards or am I understanding this incorrectly? Do you have a demo of the env?

Comment thread pkg/attestation/crafter/runners/tektonpipeline.go Outdated
Comment thread pkg/attestation/crafter/runners/tektonpipeline.go Outdated
@javirln javirln marked this pull request as draft November 26, 2025 07:08

@waveywaves waveywaves left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tekton doesn't add labels through downward API, so it might be good to use the service account directly.

Comment thread pkg/attestation/crafter/runners/tektonpipeline.go Outdated
Signed-off-by: Javier Rodriguez <javier@chainloop.dev>
Signed-off-by: Javier Rodriguez <javier@chainloop.dev>
@javirln javirln marked this pull request as ready for review January 8, 2026 08:58
@javirln javirln requested a review from migmartri January 8, 2026 09:01
Comment thread pkg/attestation/crafter/runners/tektonpipeline.go Outdated
Comment thread pkg/attestation/crafter/runner.go Outdated
Signed-off-by: Javier Rodriguez <javier@chainloop.dev>
@javirln javirln merged commit c59502b into chainloop-dev:main Jan 8, 2026
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants