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

Variable interpolation doesn't work in stepTemplate #4801

Closed
vdemeester opened this issue Apr 27, 2022 · 1 comment · Fixed by #4803
Closed

Variable interpolation doesn't work in stepTemplate #4801

vdemeester opened this issue Apr 27, 2022 · 1 comment · Fixed by #4803
Assignees
Labels
kind/bug Categorizes issue or PR as related to a bug.

Comments

@vdemeester
Copy link
Member

Expected Behavior

Given the following TaskRun (using embedded Task, but it's the same with Task references), it fails with InvalidImageName, as the image name passed to kubernetes is $(params.image)(aka not interpolated).

apiVersion: tekton.dev/v1beta1
kind: TaskRun
metadata:
  generateName: steptemplate-variables-
spec:
  params:
  - name: image
    value: ubuntu
  taskSpec:
    params:
    - name: image
    stepTemplate:
      image: $(params.image)
    steps:
    - name: foo
      script: |
        echo hello from $(params.image)

Actual Behavior

It resolves the param value and "just" work.

Steps to Reproduce the Problem

  1. Create a TaskRun similar to above
  2. Apply it
  3. See it fail

Additional Info

  • Kubernetes version:

    Output of kubectl version:

Server Version: version.Info{Major:"1", Minor:"21", GitVersion:"v1.21.1", GitCommit:"5e58841cce77d4bc13713ad2b91fa0d961e69192", GitTreeState:"clean", BuildDate:"2021-05-21T23:01:33Z", GoVersion:"go1.16.4", Compiler:"gc", Platform:"linux/amd64"}
  • Tekton Pipeline version:

    Output of tkn version or kubectl get pods -n tekton-pipelines -l app=tekton-pipelines-controller -o=jsonpath='{.items[0].metadata.labels.version}'

Pipeline version: v0.35.0
@vdemeester vdemeester added the kind/bug Categorizes issue or PR as related to a bug. label Apr 27, 2022
@vdemeester
Copy link
Member Author

/assign

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
None yet
Development

Successfully merging a pull request may close this issue.

1 participant