diff --git a/docs/pipelines.md b/docs/pipelines.md index 63e02e8b46a..ea3fc3b59ad 100644 --- a/docs/pipelines.md +++ b/docs/pipelines.md @@ -279,6 +279,8 @@ tasks: name: build-push ``` +**Note:** Using both `apiVersion` and `kind` will create [CustomRun](customruns.md), don't set `apiVersion` if only referring to [`Task`](tasks.md). + or ```yaml @@ -1537,7 +1539,7 @@ that is responsible for watching and updating `CustomRun`s which reference their ### Specifying the target Custom Task To specify the custom task type you want to execute, the `taskRef` field -must include the custom task's `apiVersion` and `kind` as shown below: +must include the custom task's `apiVersion` and `kind` as shown below, `apiVersion` is only used to create `CustomRun`: ```yaml spec: diff --git a/pkg/reconciler/taskrun/resources/taskref_test.go b/pkg/reconciler/taskrun/resources/taskref_test.go index a739c20a8f1..444103a5475 100644 --- a/pkg/reconciler/taskrun/resources/taskref_test.go +++ b/pkg/reconciler/taskrun/resources/taskref_test.go @@ -396,10 +396,9 @@ func TestGetTaskFunc(t *testing.T) { }, }, ref: &v1beta1.TaskRef{ - Name: "simple", - APIVersion: "tekton.dev/v1beta1", - Kind: v1beta1.ClusterTaskKind, - Bundle: u.Host + "/remote-cluster-task", + Name: "simple", + Kind: v1beta1.ClusterTaskKind, + Bundle: u.Host + "/remote-cluster-task", }, expected: &v1beta1.Task{ ObjectMeta: metav1.ObjectMeta{Name: "simple"},