Skip to content

Support pipelineRef with resolvers (http, bundles, git) #40

@vdemeester

Description

@vdemeester

Problem

pipelineRef only supports a bare name field, which is looked up as a local YAML file:

PipelineRef *struct {
    Name string `yaml:"name"`
} `yaml:"pipelineRef"`

taskRef already supports all 4 resolvers (http, git, bundles, hub). The same mechanism needs to be extended to pipelineRef.

Why

Real-world CI uses resolvers for pipeline references:

  • Konflux PipelineRuns reference pipelines via PaC annotations or pipelineRef with resolver: bundles pointing to an OCI bundle
  • openshift-pipelines/tektoncd-pipeline release branches use remote pipeline references
  • Without this, mallet can't run any Konflux-style PipelineRun

Implementation

  1. Extend PipelineRef struct to match taskRef resolver pattern:
PipelineRef *struct {
    Name     string          `yaml:"name"`
    Resolver string          `yaml:"resolver"`
    Params   []ResolverParam `yaml:"params"`
} `yaml:"pipelineRef"`
  1. Reuse existing resolver logic from resolveTaskWithResolver() — generalize to resolveWithResolver() for both task and pipeline resolution

  2. (Stretch) Support PaC-style annotation-based pipeline URL resolution

Acceptance Criteria

  • pipelineRef with resolver: http resolves remote Pipeline YAML
  • pipelineRef with resolver: bundles extracts Pipeline from OCI bundle
  • pipelineRef with resolver: git fetches Pipeline from git repo
  • Existing local-name pipelineRef continues working
  • Integration tests with real remote references

Jira: SRVKP-11416

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions