Skip to content

feat(devops): add Tekton pipeline engine support - #1074

Open
KreanXie wants to merge 1 commit into
kubesphere:masterfrom
KreanXie:feat/tekton-pipeline-engine
Open

KreanXie wants to merge 1 commit into
kubesphere:masterfrom
KreanXie:feat/tekton-pipeline-engine

Conversation

@KreanXie

Copy link
Copy Markdown

Add an optional Tekton execution engine to KubeSphere DevOps without replacing Jenkins.

What type of PR is this?

/kind feature
/kind api-change

What this PR does / why we need it:

This PR introduces a Tekton PipelineRun adapter for KubeSphere DevOps.

It allows pipelines to opt in to Tekton while preserving Jenkins as the default execution engine, enabling gradual migration without affecting existing Jenkins pipelines.

Key changes:

  • Add spec.engine.type to the KubeSphere Pipeline API.
  • Support jenkins and tekton engine values.
  • Default pipelines without an engine configuration to Jenkins.
  • Preserve compatibility with the legacy pipeline-engine annotation.
  • Snapshot the Pipeline specification into each PipelineRun.
  • Prevent Jenkins controllers from processing Tekton pipelines and runs.
  • Create and manage native tekton.dev/v1 PipelineRuns.
  • Pass parameters, ServiceAccount, timeout, and Workspace configuration to Tekton.
  • Synchronize Tekton status and timestamps back to the KubeSphere PipelineRun.
  • Propagate PipelineRun cancellation to Tekton.
  • Add Tekton RBAC, feature-gate configuration, samples, smoke tests, unit tests, and design documentation.

Engine resolution order:

  1. PipelineRun.spec.pipelineSpec.engine.type
  2. Pipeline.spec.engine.type
  3. Legacy devops.kubesphere.io/pipeline-engine annotation
  4. Jenkins by default

Which issue(s) this PR fixes:

Fixes None

Special notes for reviewers:

  • This PR does not remove or replace Jenkins.
  • Tekton support is optional and disabled by default.
  • Tekton Pipelines must already be installed with stable tekton.dev/v1 APIs.
  • This PR does not install or upgrade Tekton.
  • Helm extension and KubeSphere Console integration are not included and will be handled separately.
  • The current adapter synchronizes overall PipelineRun status; TaskRun details, logs, Results, and Triggers are not included.
  • The Pipeline CRD change is backward compatible because spec.engine is optional.

Validation performed:

go test ./pkg/pipelineengine
go test ./controllers/tekton
go test ./controllers/jenkins/pipeline
go test ./controllers/jenkins/pipelinerun -run TestShouldSkipForTektonSpec
go test ./pkg/kapis/devops/v1alpha3/pipelinerun
go test ./cmd/controller/app/options

Add a Tekton PipelineRun adapter while keeping Jenkins as the backward-compatible default. Formalize engine selection in PipelineSpec, snapshot it into PipelineRuns, and retain legacy annotation support. Include RBAC, samples, smoke coverage, tests, and design documentation.
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.

1 participant