Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PipelineRef resolver part doesn't support context variable replacement #5475

Closed
vdemeester opened this issue Sep 12, 2022 · 0 comments · Fixed by #5476
Closed

PipelineRef resolver part doesn't support context variable replacement #5475

vdemeester opened this issue Sep 12, 2022 · 0 comments · Fixed by #5476
Assignees
Labels
kind/bug Categorizes issue or PR as related to a bug.

Comments

@vdemeester
Copy link
Member

Expected Behavior

Using the following PipelineRun should create the following ResolutionRequest.

apiVersion: tekton.dev/v1beta1
kind: PipelineRun
metadata:
  name: simple-pipelinerun
spec:
  pipelineRef:
    resolver: foo
    params:
    - name: bar
      value: $(context.pipelinerun.name)
---
apiVersion: resolution.tekton.dev/v1alpha1
kind: ResolutionRequest
metadata:
  labels:
    resolution.tekton.dev/type: foo
  name: foo-bf6f3d56876eb1d6948a50c52c0d1d87
spec:
  params:
    bar: simple-pipelinerun

Actual Behavior

It doesn't resolve the context.* variable, resulting in the following ResolutionRequest.

apiVersion: resolution.tekton.dev/v1alpha1
kind: ResolutionRequest
metadata:
  labels:
    resolution.tekton.dev/type: foo
  name: foo-bf6f3d56876eb1d6948a50c52c0d1d87
spec:
  params:
    bar: $(context.pipelinerun.name)

Steps to Reproduce the Problem

  1. Create the above PipelineRun
  2. See what ResolutionRequest it creates

Additional Info

  • Tekton Pipeline version: main

/assign @abayer

@vdemeester vdemeester added the kind/bug Categorizes issue or PR as related to a bug. label Sep 12, 2022
abayer added a commit to abayer/tektoncd-pipeline that referenced this issue Sep 12, 2022
fixes tektoncd#5475

I did not think of this previously, but now it works.

Signed-off-by: Andrew Bayer <andrew.bayer@gmail.com>
tekton-robot pushed a commit that referenced this issue Sep 13, 2022
fixes #5475

I did not think of this previously, but now it works.

Signed-off-by: Andrew Bayer <andrew.bayer@gmail.com>
Repository owner moved this from Todo to Done in Tekton Community Roadmap Sep 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Categorizes issue or PR as related to a bug.
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

2 participants