-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Closed
Labels
kind/featureCategorizes issue or PR as related to a new feature.Categorizes issue or PR as related to a new feature.
Description
Expected Behavior
This should work:
apiVersion: tekton.dev/v1beta1
kind: ClusterTask
metadata:
name: tssc-setup
spec:
params:
- name: ciWorkersImageRegesitryURI
type: string
default: quay.io
- name: ciWorkersImageRepositoryName
type: string
default: tssc
- name: ciWorkersImageTag
type: string
default: latest
- name: ciWorkersImagePullPolicy
type: string
default: IfNotPresent
steps:
- name: create-python-venv
image: $(params.ciWorkersImageRegesitryURI)/$(params.ciWorkersImageRepositoryName)/tssc-base:$(params.ciWorkersImageTag)
imagePullPolicy: $(params.ciWorkersImageRegesitryURI)
script: |
#!/usr/bin/env bash
echo hello world
Actual Behavior
Get the following error:
status:
completionTime: '2020-10-21T15:58:44Z'
conditions:
- lastTransitionTime: '2020-10-21T15:58:44Z'
message: TaskRun tssc-tekton-pipeline-maven-8xnhn-tssc-setup-225w4 has failed
reason: Failed
status: 'False'
type: Succeeded
startTime: '2020-10-21T15:58:44Z'
taskRuns:
tssc-tekton-pipeline-maven-8xnhn-tssc-setup-225w4:
pipelineTaskName: tssc-setup
status:
conditions:
- lastTransitionTime: '2020-10-21T15:58:44Z'
message: >-
Missing or invalid Task ian-tekton-test2/tssc-setup: Pod
"tssc-tekton-pipeline-maven-8xnhn-tssc-setup-225w4-pod-sn8w2" is
invalid: spec.containers[0].imagePullPolicy: Unsupported value:
"$(params.ciWorkersImagePullPolicy)": supported values: "Always",
"IfNotPresent", "Never"
reason: CouldntGetTask
status: 'False'
type: Succeeded
podName: ''
startTime: '2020-10-21T15:58:44Z'
It would apear from the error that for some reason variable substitution is not happenin gin the ClusterTask.spec.steps.imagePullPolicy value. I would have assumed that could do variable substitution in anything under ClusterTask.spec.steps.
Steps to Reproduce the Problem
- Create a cluster task with a step defining imagePullPolicy with a avlue from a parameter
- try to run the step
Additional Info
-
Kubernetes version:
Output of
kubectl version:
Client Version: version.Info{Major:"1", Minor:"18", GitVersion:"v1.18.8", GitCommit:"9f2892aab98fe339f3bd70e3c470144299398ace", GitTreeState:"clean", BuildDate:"2020-08-13T16:12:48Z", GoVersion:"go1.13.15", Compiler:"gc", Platform:"darwin/amd64"}
Server Version: version.Info{Major:"1", Minor:"18+", GitVersion:"v1.18.3+012b3ec", GitCommit:"012b3ec", GitTreeState:"clean", BuildDate:"2020-07-24T07:23:10Z", GoVersion:"go1.13.4", Compiler:"gc", Platform:"linux/amd64"}
-
Tekton Pipeline version:
Output of
tkn versionorkubectl get pods -n tekton-pipelines -l app=tekton-pipelines-controller -o=jsonpath='{.items[0].metadata.labels.version}'
Installed via OpenShift Pipelines Operator, can't find a tekton-pipelines-controller
OpenShift Pipelines Operator: 1.1.1
OpenShift-Pipelines: v0.14.3
OpenShift-Pipelines-Triggers: v0.6.1
OpenShift-Pipelines-ClusterTasks: v0.14
rinckm
Metadata
Metadata
Assignees
Labels
kind/featureCategorizes issue or PR as related to a new feature.Categorizes issue or PR as related to a new feature.