diff --git a/cmd/triggerrun/testdata/triggertemplate.yaml b/cmd/triggerrun/testdata/triggertemplate.yaml index 87c72e704..b2c2c12b1 100644 --- a/cmd/triggerrun/testdata/triggertemplate.yaml +++ b/cmd/triggerrun/testdata/triggertemplate.yaml @@ -13,7 +13,7 @@ spec: - name: message description: The message to print default: This is the default message - resourcetemplates: + resourceTemplates: - apiVersion: tekton.dev/v1beta1 kind: PipelineRun metadata: diff --git a/docs/getting-started/triggers.yaml b/docs/getting-started/triggers.yaml index f8d7d0a12..6fdbb47c1 100644 --- a/docs/getting-started/triggers.yaml +++ b/docs/getting-started/triggers.yaml @@ -12,7 +12,7 @@ spec: description: The git repository url - name: namespace description: The namespace to create the resources - resourcetemplates: + resourceTemplates: - apiVersion: tekton.dev/v1beta1 kind: PipelineRun metadata: diff --git a/docs/triggers-api.md b/docs/triggers-api.md index 56cdfedd1..a3ad63ad7 100644 --- a/docs/triggers-api.md +++ b/docs/triggers-api.md @@ -2517,7 +2517,7 @@ TriggerTemplateSpec -resourcetemplates
+resourceTemplates
[]TriggerResourceTemplate @@ -2575,7 +2575,7 @@ TriggerTemplateStatus -resourcetemplates
+resourceTemplates
[]TriggerResourceTemplate @@ -4634,7 +4634,7 @@ TriggerTemplateSpec -resourcetemplates
+resourceTemplates
[]TriggerResourceTemplate @@ -4692,7 +4692,7 @@ TriggerTemplateStatus -resourcetemplates
+resourceTemplates
[]TriggerResourceTemplate diff --git a/docs/triggers.md b/docs/triggers.md index 1d5353e64..00aca6889 100644 --- a/docs/triggers.md +++ b/docs/triggers.md @@ -70,7 +70,7 @@ triggers: spec: params: - name: "my-param-name" - resourcetemplates: + resourceTemplates: - apiVersion: "tekton.dev/v1beta1" kind: TaskRun metadata: diff --git a/docs/triggertemplates.md b/docs/triggertemplates.md index f677a0c65..d4577f52d 100644 --- a/docs/triggertemplates.md +++ b/docs/triggertemplates.md @@ -43,7 +43,7 @@ spec: default: This is the default message - name: contenttype description: The Content-Type of the event - resourcetemplates: + resourceTemplates: - apiVersion: tekton.dev/v1beta1 kind: PipelineRun metadata: @@ -96,7 +96,7 @@ A `TriggerTemplate` allows you to declare parameters supplied by the associated * Tekton applies the value of the `default` field for each entry in the `params` array of your `TriggerTemplate` if it can't find a corresponding value in the associated `TriggerBinding` or cannot successfully extract the value from an HTTP header or body payload. -* You can reference `tt.params` in the `resourcetemplates` section of your `TriggerTemplate` to make your `TriggerTemplate` reusable. +* You can reference `tt.params` in the `resourceTemplates` section of your `TriggerTemplate` to make your `TriggerTemplate` reusable. * When you specify parameters in your resource template definitions, Tekton replaces the specified string with the parameter name, for example `$(tt.params.name)`. Therefore, simple string and number value replacements work fine directly in your YAML file. However, if a string has a numerical prefix, such as `123abcd`, diff --git a/examples/v1alpha1/bitbucket-server/triggertemplate.yaml b/examples/v1alpha1/bitbucket-server/triggertemplate.yaml index 1902d62f5..62b56527c 100644 --- a/examples/v1alpha1/bitbucket-server/triggertemplate.yaml +++ b/examples/v1alpha1/bitbucket-server/triggertemplate.yaml @@ -7,7 +7,7 @@ spec: params: - name: gitrevision - name: gitrepositoryurl - resourcetemplates: + resourceTemplates: - apiVersion: tekton.dev/v1beta1 kind: TaskRun metadata: diff --git a/examples/v1alpha1/custom-resource/github-knative-listener-customresource.yaml b/examples/v1alpha1/custom-resource/github-knative-listener-customresource.yaml index a0ea8fefe..48535fc31 100644 --- a/examples/v1alpha1/custom-resource/github-knative-listener-customresource.yaml +++ b/examples/v1alpha1/custom-resource/github-knative-listener-customresource.yaml @@ -63,7 +63,7 @@ spec: params: - name: gitrevision - name: gitrepositoryurl - resourcetemplates: + resourceTemplates: - apiVersion: tekton.dev/v1beta1 kind: TaskRun metadata: diff --git a/examples/v1alpha1/embedded-trigger/triggertemplate.yaml b/examples/v1alpha1/embedded-trigger/triggertemplate.yaml index d294638a1..f58d74536 100644 --- a/examples/v1alpha1/embedded-trigger/triggertemplate.yaml +++ b/examples/v1alpha1/embedded-trigger/triggertemplate.yaml @@ -14,7 +14,7 @@ spec: default: This is the default message - name: contenttype description: The Content-Type of the event - resourcetemplates: + resourceTemplates: - apiVersion: tekton.dev/v1beta1 kind: PipelineRun metadata: diff --git a/examples/v1alpha1/eventlistener-tls-connection/tls-eventlistener-interceptor.yaml b/examples/v1alpha1/eventlistener-tls-connection/tls-eventlistener-interceptor.yaml index c9e242896..2f0bc0271 100644 --- a/examples/v1alpha1/eventlistener-tls-connection/tls-eventlistener-interceptor.yaml +++ b/examples/v1alpha1/eventlistener-tls-connection/tls-eventlistener-interceptor.yaml @@ -65,7 +65,7 @@ spec: params: - name: gitrevision - name: gitrepositoryurl - resourcetemplates: + resourceTemplates: - apiVersion: tekton.dev/v1beta1 kind: TaskRun metadata: diff --git a/examples/v1alpha1/eventlisteners/cel-eventlistener-interceptor.yaml b/examples/v1alpha1/eventlisteners/cel-eventlistener-interceptor.yaml index b403710e8..93aef84ff 100644 --- a/examples/v1alpha1/eventlisteners/cel-eventlistener-interceptor.yaml +++ b/examples/v1alpha1/eventlisteners/cel-eventlistener-interceptor.yaml @@ -23,7 +23,7 @@ spec: spec: params: - name: sha - resourcetemplates: + resourceTemplates: - apiVersion: tekton.dev/v1beta1 kind: TaskRun metadata: diff --git a/examples/v1alpha1/eventlisteners/cel-eventlistener-multiple-overlays.yaml b/examples/v1alpha1/eventlisteners/cel-eventlistener-multiple-overlays.yaml index 23f118eda..23b4f4a07 100644 --- a/examples/v1alpha1/eventlisteners/cel-eventlistener-multiple-overlays.yaml +++ b/examples/v1alpha1/eventlisteners/cel-eventlistener-multiple-overlays.yaml @@ -26,7 +26,7 @@ spec: params: - name: sha - name: branch - resourcetemplates: + resourceTemplates: - apiVersion: tekton.dev/v1beta1 kind: TaskRun metadata: diff --git a/examples/v1alpha1/github/github-eventlistener-interceptor.yaml b/examples/v1alpha1/github/github-eventlistener-interceptor.yaml index cf9e8370a..1f8da48e8 100644 --- a/examples/v1alpha1/github/github-eventlistener-interceptor.yaml +++ b/examples/v1alpha1/github/github-eventlistener-interceptor.yaml @@ -61,7 +61,7 @@ spec: params: - name: gitrevision - name: gitrepositoryurl - resourcetemplates: + resourceTemplates: - apiVersion: tekton.dev/v1beta1 kind: TaskRun metadata: diff --git a/examples/v1alpha1/gitlab/gitlab-push-listener.yaml b/examples/v1alpha1/gitlab/gitlab-push-listener.yaml index eb9b54d2b..b0a1dac73 100644 --- a/examples/v1alpha1/gitlab/gitlab-push-listener.yaml +++ b/examples/v1alpha1/gitlab/gitlab-push-listener.yaml @@ -29,7 +29,7 @@ spec: params: - name: gitrevision - name: gitrepositoryurl - resourcetemplates: + resourceTemplates: - apiVersion: tekton.dev/v1beta1 kind: TaskRun metadata: diff --git a/examples/v1alpha1/label-selector/triggers.yaml b/examples/v1alpha1/label-selector/triggers.yaml index f6c1bb7b3..1683d199d 100644 --- a/examples/v1alpha1/label-selector/triggers.yaml +++ b/examples/v1alpha1/label-selector/triggers.yaml @@ -68,7 +68,7 @@ spec: default: This is the default message - name: contenttype description: The Content-Type of the event - resourcetemplates: + resourceTemplates: - apiVersion: tekton.dev/v1beta1 kind: PipelineRun metadata: diff --git a/examples/v1alpha1/namespace-selector/03_trigger.yaml b/examples/v1alpha1/namespace-selector/03_trigger.yaml index afd5e85c4..8f33fab3e 100644 --- a/examples/v1alpha1/namespace-selector/03_trigger.yaml +++ b/examples/v1alpha1/namespace-selector/03_trigger.yaml @@ -49,7 +49,7 @@ spec: default: This is the default message - name: contenttype description: The Content-Type of the event - resourcetemplates: + resourceTemplates: - apiVersion: tekton.dev/v1beta1 kind: PipelineRun metadata: diff --git a/examples/v1alpha1/namespacedinterceptor/eventlistener.yaml b/examples/v1alpha1/namespacedinterceptor/eventlistener.yaml index 9c3a46bc6..478057885 100644 --- a/examples/v1alpha1/namespacedinterceptor/eventlistener.yaml +++ b/examples/v1alpha1/namespacedinterceptor/eventlistener.yaml @@ -23,7 +23,7 @@ spec: params: - name: gitrevision - name: gitrepositoryurl - resourcetemplates: + resourceTemplates: - apiVersion: tekton.dev/v1beta1 kind: TaskRun metadata: diff --git a/examples/v1alpha1/trigger-ref/triggertemplate.yaml b/examples/v1alpha1/trigger-ref/triggertemplate.yaml index d294638a1..f58d74536 100644 --- a/examples/v1alpha1/trigger-ref/triggertemplate.yaml +++ b/examples/v1alpha1/trigger-ref/triggertemplate.yaml @@ -14,7 +14,7 @@ spec: default: This is the default message - name: contenttype description: The Content-Type of the event - resourcetemplates: + resourceTemplates: - apiVersion: tekton.dev/v1beta1 kind: PipelineRun metadata: diff --git a/examples/v1alpha1/triggertemplates/triggertemplate.yaml b/examples/v1alpha1/triggertemplates/triggertemplate.yaml index d294638a1..f58d74536 100644 --- a/examples/v1alpha1/triggertemplates/triggertemplate.yaml +++ b/examples/v1alpha1/triggertemplates/triggertemplate.yaml @@ -14,7 +14,7 @@ spec: default: This is the default message - name: contenttype description: The Content-Type of the event - resourcetemplates: + resourceTemplates: - apiVersion: tekton.dev/v1beta1 kind: PipelineRun metadata: diff --git a/examples/v1beta1/awscodecommit/push/awscodecommit-push-listener.yaml b/examples/v1beta1/awscodecommit/push/awscodecommit-push-listener.yaml index 4c4981698..5f728bbd1 100644 --- a/examples/v1beta1/awscodecommit/push/awscodecommit-push-listener.yaml +++ b/examples/v1beta1/awscodecommit/push/awscodecommit-push-listener.yaml @@ -50,7 +50,7 @@ spec: - name: aws-codecommit-commit - name: aws-codecommit-branch - name: aws-codecommit-useridentity - resourcetemplates: + resourceTemplates: - apiVersion: tekton.dev/v1beta1 kind: TaskRun metadata: diff --git a/examples/v1beta1/azurerepo/pull/azurerepo-pullrequest-listener.yaml b/examples/v1beta1/azurerepo/pull/azurerepo-pullrequest-listener.yaml index 21ea1105d..cffc57f3a 100644 --- a/examples/v1beta1/azurerepo/pull/azurerepo-pullrequest-listener.yaml +++ b/examples/v1beta1/azurerepo/pull/azurerepo-pullrequest-listener.yaml @@ -67,7 +67,7 @@ spec: - name: azurerepo-pullreq-html-url - name: azurerepo-pullreq-title - name: azurerepo-pullreq-user - resourcetemplates: + resourceTemplates: - apiVersion: tekton.dev/v1beta1 kind: TaskRun metadata: diff --git a/examples/v1beta1/azurerepo/push/azurerepo-push-listener.yaml b/examples/v1beta1/azurerepo/push/azurerepo-push-listener.yaml index f53ef9311..29b20e66f 100644 --- a/examples/v1beta1/azurerepo/push/azurerepo-push-listener.yaml +++ b/examples/v1beta1/azurerepo/push/azurerepo-push-listener.yaml @@ -58,7 +58,7 @@ spec: - name: azurerepo-url - name: azurerepo-name - name: pusher-name - resourcetemplates: + resourceTemplates: - apiVersion: tekton.dev/v1beta1 kind: TaskRun metadata: diff --git a/examples/v1beta1/bitbucket-cloud/triggertemplate.yaml b/examples/v1beta1/bitbucket-cloud/triggertemplate.yaml index c46f96541..d6878e41d 100644 --- a/examples/v1beta1/bitbucket-cloud/triggertemplate.yaml +++ b/examples/v1beta1/bitbucket-cloud/triggertemplate.yaml @@ -9,7 +9,7 @@ spec: - name: gitrepourl - name: gitreponame - name: pushername - resourcetemplates: + resourceTemplates: - apiVersion: tekton.dev/v1beta1 kind: TaskRun metadata: diff --git a/examples/v1beta1/bitbucket-server/triggertemplate.yaml b/examples/v1beta1/bitbucket-server/triggertemplate.yaml index 0ba9a126a..445f52fcc 100644 --- a/examples/v1beta1/bitbucket-server/triggertemplate.yaml +++ b/examples/v1beta1/bitbucket-server/triggertemplate.yaml @@ -7,7 +7,7 @@ spec: params: - name: gitrevision - name: gitrepositoryurl - resourcetemplates: + resourceTemplates: - apiVersion: tekton.dev/v1beta1 kind: TaskRun metadata: diff --git a/examples/v1beta1/custom-resource/github-knative-listener-customresource.yaml b/examples/v1beta1/custom-resource/github-knative-listener-customresource.yaml index 10825c203..4d83f7448 100644 --- a/examples/v1beta1/custom-resource/github-knative-listener-customresource.yaml +++ b/examples/v1beta1/custom-resource/github-knative-listener-customresource.yaml @@ -63,7 +63,7 @@ spec: params: - name: gitrevision - name: gitrepositoryurl - resourcetemplates: + resourceTemplates: - apiVersion: tekton.dev/v1beta1 kind: TaskRun metadata: diff --git a/examples/v1beta1/embedded-trigger/triggertemplate.yaml b/examples/v1beta1/embedded-trigger/triggertemplate.yaml index 2bf25989f..78e814e43 100644 --- a/examples/v1beta1/embedded-trigger/triggertemplate.yaml +++ b/examples/v1beta1/embedded-trigger/triggertemplate.yaml @@ -14,7 +14,7 @@ spec: default: This is the default message - name: contenttype description: The Content-Type of the event - resourcetemplates: + resourceTemplates: - apiVersion: tekton.dev/v1beta1 kind: PipelineRun metadata: diff --git a/examples/v1beta1/eventlistener-tls-connection/tls-eventlistener-interceptor.yaml b/examples/v1beta1/eventlistener-tls-connection/tls-eventlistener-interceptor.yaml index 37330eecd..badd1df1a 100644 --- a/examples/v1beta1/eventlistener-tls-connection/tls-eventlistener-interceptor.yaml +++ b/examples/v1beta1/eventlistener-tls-connection/tls-eventlistener-interceptor.yaml @@ -65,7 +65,7 @@ spec: params: - name: gitrevision - name: gitrepositoryurl - resourcetemplates: + resourceTemplates: - apiVersion: tekton.dev/v1beta1 kind: TaskRun metadata: diff --git a/examples/v1beta1/eventlisteners/cel-eventlistener-interceptor.yaml b/examples/v1beta1/eventlisteners/cel-eventlistener-interceptor.yaml index dedc95c0b..67a81ff51 100644 --- a/examples/v1beta1/eventlisteners/cel-eventlistener-interceptor.yaml +++ b/examples/v1beta1/eventlisteners/cel-eventlistener-interceptor.yaml @@ -23,7 +23,7 @@ spec: spec: params: - name: sha - resourcetemplates: + resourceTemplates: - apiVersion: tekton.dev/v1beta1 kind: TaskRun metadata: diff --git a/examples/v1beta1/eventlisteners/cel-eventlistener-multiple-overlays.yaml b/examples/v1beta1/eventlisteners/cel-eventlistener-multiple-overlays.yaml index e270fdd6c..05ac59732 100644 --- a/examples/v1beta1/eventlisteners/cel-eventlistener-multiple-overlays.yaml +++ b/examples/v1beta1/eventlisteners/cel-eventlistener-multiple-overlays.yaml @@ -26,7 +26,7 @@ spec: params: - name: sha - name: branch - resourcetemplates: + resourceTemplates: - apiVersion: tekton.dev/v1beta1 kind: TaskRun metadata: diff --git a/examples/v1beta1/eventlisteners/eventlistener-gke-autopilot.yaml b/examples/v1beta1/eventlisteners/eventlistener-gke-autopilot.yaml index a95c2880e..7b381aa23 100644 --- a/examples/v1beta1/eventlisteners/eventlistener-gke-autopilot.yaml +++ b/examples/v1beta1/eventlisteners/eventlistener-gke-autopilot.yaml @@ -44,7 +44,7 @@ spec: default: This is the default message - name: contenttype description: The Content-Type of the event - resourcetemplates: + resourceTemplates: - apiVersion: tekton.dev/v1beta1 kind: PipelineRun metadata: diff --git a/examples/v1beta1/github-add-changed-files-pr/github-eventlistener-interceptor.yaml b/examples/v1beta1/github-add-changed-files-pr/github-eventlistener-interceptor.yaml index d95a63691..813843bdb 100644 --- a/examples/v1beta1/github-add-changed-files-pr/github-eventlistener-interceptor.yaml +++ b/examples/v1beta1/github-add-changed-files-pr/github-eventlistener-interceptor.yaml @@ -51,7 +51,7 @@ metadata: spec: params: - name: changedfiles - resourcetemplates: + resourceTemplates: - apiVersion: tekton.dev/v1beta1 kind: TaskRun metadata: diff --git a/examples/v1beta1/github-add-changed-files-push-cel/github-eventlistener-interceptor.yaml b/examples/v1beta1/github-add-changed-files-push-cel/github-eventlistener-interceptor.yaml index 65ff206f2..9820042db 100644 --- a/examples/v1beta1/github-add-changed-files-push-cel/github-eventlistener-interceptor.yaml +++ b/examples/v1beta1/github-add-changed-files-push-cel/github-eventlistener-interceptor.yaml @@ -57,7 +57,7 @@ metadata: spec: params: - name: changedfiles - resourcetemplates: + resourceTemplates: - apiVersion: tekton.dev/v1beta1 kind: TaskRun metadata: diff --git a/examples/v1beta1/github-owners/github-eventlistener-interceptor.yaml b/examples/v1beta1/github-owners/github-eventlistener-interceptor.yaml index 8092f4306..2ec9f059b 100644 --- a/examples/v1beta1/github-owners/github-eventlistener-interceptor.yaml +++ b/examples/v1beta1/github-owners/github-eventlistener-interceptor.yaml @@ -61,7 +61,7 @@ metadata: spec: params: - name: gitrepositoryurl - resourcetemplates: + resourceTemplates: - apiVersion: tekton.dev/v1beta1 kind: TaskRun metadata: diff --git a/examples/v1beta1/github/github-eventlistener-interceptor.yaml b/examples/v1beta1/github/github-eventlistener-interceptor.yaml index 051bd45c5..afdd67890 100644 --- a/examples/v1beta1/github/github-eventlistener-interceptor.yaml +++ b/examples/v1beta1/github/github-eventlistener-interceptor.yaml @@ -61,7 +61,7 @@ spec: params: - name: gitrevision - name: gitrepositoryurl - resourcetemplates: + resourceTemplates: - apiVersion: tekton.dev/v1beta1 kind: TaskRun metadata: diff --git a/examples/v1beta1/gitlab/gitlab-push-listener.yaml b/examples/v1beta1/gitlab/gitlab-push-listener.yaml index 63b17ab48..fdd3ba56f 100644 --- a/examples/v1beta1/gitlab/gitlab-push-listener.yaml +++ b/examples/v1beta1/gitlab/gitlab-push-listener.yaml @@ -29,7 +29,7 @@ spec: params: - name: gitrevision - name: gitrepositoryurl - resourcetemplates: + resourceTemplates: - apiVersion: tekton.dev/v1beta1 kind: TaskRun metadata: diff --git a/examples/v1beta1/label-selector/triggers.yaml b/examples/v1beta1/label-selector/triggers.yaml index 6bef64dbf..b84d483fa 100644 --- a/examples/v1beta1/label-selector/triggers.yaml +++ b/examples/v1beta1/label-selector/triggers.yaml @@ -54,7 +54,7 @@ spec: default: This is the default message - name: contenttype description: The Content-Type of the event - resourcetemplates: + resourceTemplates: - apiVersion: tekton.dev/v1beta1 kind: PipelineRun metadata: diff --git a/examples/v1beta1/namespace-selector/03_trigger.yaml b/examples/v1beta1/namespace-selector/03_trigger.yaml index a8f9af135..f6d875931 100644 --- a/examples/v1beta1/namespace-selector/03_trigger.yaml +++ b/examples/v1beta1/namespace-selector/03_trigger.yaml @@ -42,7 +42,7 @@ spec: default: This is the default message - name: contenttype description: The Content-Type of the event - resourcetemplates: + resourceTemplates: - apiVersion: tekton.dev/v1beta1 kind: PipelineRun metadata: diff --git a/examples/v1beta1/slack/slack-eventlistener-interceptor.yaml b/examples/v1beta1/slack/slack-eventlistener-interceptor.yaml index c06519d26..8d5e1e848 100644 --- a/examples/v1beta1/slack/slack-eventlistener-interceptor.yaml +++ b/examples/v1beta1/slack/slack-eventlistener-interceptor.yaml @@ -35,7 +35,7 @@ spec: spec: params: - name: response - resourcetemplates: + resourceTemplates: - apiVersion: tekton.dev/v1beta1 kind: TaskRun metadata: diff --git a/examples/v1beta1/trigger-ref/triggertemplate.yaml b/examples/v1beta1/trigger-ref/triggertemplate.yaml index 798a7cb4e..6ce873ddb 100644 --- a/examples/v1beta1/trigger-ref/triggertemplate.yaml +++ b/examples/v1beta1/trigger-ref/triggertemplate.yaml @@ -14,7 +14,7 @@ spec: default: This is the default message - name: contenttype description: The Content-Type of the event - resourcetemplates: + resourceTemplates: - apiVersion: tekton.dev/v1beta1 kind: PipelineRun metadata: diff --git a/examples/v1beta1/triggergroups/trigger.yaml b/examples/v1beta1/triggergroups/trigger.yaml index 7658c9421..83c68fb1e 100644 --- a/examples/v1beta1/triggergroups/trigger.yaml +++ b/examples/v1beta1/triggergroups/trigger.yaml @@ -31,7 +31,7 @@ spec: default: This is the default message - name: contenttype description: The Content-Type of the event - resourcetemplates: + resourceTemplates: - apiVersion: tekton.dev/v1beta1 kind: PipelineRun metadata: diff --git a/examples/v1beta1/triggertemplates/triggertemplate.yaml b/examples/v1beta1/triggertemplates/triggertemplate.yaml index 2bf25989f..78e814e43 100644 --- a/examples/v1beta1/triggertemplates/triggertemplate.yaml +++ b/examples/v1beta1/triggertemplates/triggertemplate.yaml @@ -14,7 +14,7 @@ spec: default: This is the default message - name: contenttype description: The Content-Type of the event - resourcetemplates: + resourceTemplates: - apiVersion: tekton.dev/v1beta1 kind: PipelineRun metadata: diff --git a/pkg/apis/triggers/v1alpha1/trigger_template_types.go b/pkg/apis/triggers/v1alpha1/trigger_template_types.go index 0a5fa6113..eedb4b123 100644 --- a/pkg/apis/triggers/v1alpha1/trigger_template_types.go +++ b/pkg/apis/triggers/v1alpha1/trigger_template_types.go @@ -31,7 +31,7 @@ type TriggerTemplateSpec struct { // +listType=atomic Params []ParamSpec `json:"params,omitempty"` // +listType=atomic - ResourceTemplates []TriggerResourceTemplate `json:"resourcetemplates,omitempty"` + ResourceTemplates []TriggerResourceTemplate `json:"resourceTemplates,omitempty"` } // TriggerResourceTemplate describes a resource to create diff --git a/pkg/apis/triggers/v1alpha1/trigger_template_validation.go b/pkg/apis/triggers/v1alpha1/trigger_template_validation.go index ef23af689..18eff34ca 100644 --- a/pkg/apis/triggers/v1alpha1/trigger_template_validation.go +++ b/pkg/apis/triggers/v1alpha1/trigger_template_validation.go @@ -51,10 +51,10 @@ func (s *TriggerTemplateSpec) validate(ctx context.Context) (errs *apis.FieldErr errs = errs.Also(apis.ErrMissingField(apis.CurrentField)) } if len(s.ResourceTemplates) == 0 { - errs = errs.Also(apis.ErrMissingField("resourcetemplates")) + errs = errs.Also(apis.ErrMissingField("resourceTemplates")) } - errs = errs.Also(validateResourceTemplates(s.ResourceTemplates).ViaField("resourcetemplates")) - errs = errs.Also(verifyParamDeclarations(s.Params, s.ResourceTemplates).ViaField("resourcetemplates")) + errs = errs.Also(validateResourceTemplates(s.ResourceTemplates).ViaField("resourceTemplates")) + errs = errs.Also(verifyParamDeclarations(s.Params, s.ResourceTemplates).ViaField("resourceTemplates")) return errs } diff --git a/pkg/apis/triggers/v1alpha1/trigger_template_validation_test.go b/pkg/apis/triggers/v1alpha1/trigger_template_validation_test.go index 8e82e8e9d..fd939af57 100644 --- a/pkg/apis/triggers/v1alpha1/trigger_template_validation_test.go +++ b/pkg/apis/triggers/v1alpha1/trigger_template_validation_test.go @@ -192,7 +192,7 @@ func TestTriggerTemplate_Validate(t *testing.T) { }, want: &apis.FieldError{ Message: "missing field(s)", - Paths: []string{"spec.resourcetemplates"}, + Paths: []string{"spec.resourceTemplates"}, }, }, { name: "resource template missing kind", @@ -218,7 +218,7 @@ func TestTriggerTemplate_Validate(t *testing.T) { }, want: &apis.FieldError{ Message: "missing field(s)", - Paths: []string{"spec.resourcetemplates[0].kind"}, + Paths: []string{"spec.resourceTemplates[0].kind"}, }, }, { name: "resource template missing apiVersion", @@ -244,7 +244,7 @@ func TestTriggerTemplate_Validate(t *testing.T) { }, want: &apis.FieldError{ Message: "missing field(s)", - Paths: []string{"spec.resourcetemplates[0].apiVersion"}, + Paths: []string{"spec.resourceTemplates[0].apiVersion"}, }, }, { name: "resource template invalid apiVersion", @@ -271,7 +271,7 @@ func TestTriggerTemplate_Validate(t *testing.T) { }, want: &apis.FieldError{ Message: `invalid value: no kind "pipelinerun" is registered for version "foobar"`, - Paths: []string{"spec.resourcetemplates[0]"}, + Paths: []string{"spec.resourceTemplates[0]"}, }, }, { name: "resource template invalid kind", @@ -298,7 +298,7 @@ func TestTriggerTemplate_Validate(t *testing.T) { }, want: &apis.FieldError{ Message: `invalid value: no kind "tekton.dev/v1alpha1" is registered for version "foo"`, - Paths: []string{"spec.resourcetemplates[0]"}, + Paths: []string{"spec.resourceTemplates[0]"}, }, }, { name: "tt.params used in resource template are declared", @@ -334,7 +334,7 @@ func TestTriggerTemplate_Validate(t *testing.T) { }, want: &apis.FieldError{ Message: "invalid value: undeclared param '$(tt.params.foo)'", - Paths: []string{"spec.resourcetemplates[0]"}, + Paths: []string{"spec.resourceTemplates[0]"}, Details: "'$(tt.params.foo)' must be declared in spec.params", }, }, { @@ -378,7 +378,7 @@ func TestTriggerTemplate_Validate(t *testing.T) { Namespace: "foo", }, }, - want: apis.ErrMissingField("spec", "spec.resourcetemplates"), + want: apis.ErrMissingField("spec", "spec.resourceTemplates"), }} for _, tc := range tcs { diff --git a/pkg/apis/triggers/v1beta1/openapi_generated.go b/pkg/apis/triggers/v1beta1/openapi_generated.go index 2e42df5a6..1727fe862 100644 --- a/pkg/apis/triggers/v1beta1/openapi_generated.go +++ b/pkg/apis/triggers/v1beta1/openapi_generated.go @@ -1634,7 +1634,7 @@ func schema_pkg_apis_triggers_v1beta1_TriggerTemplateSpec(ref common.ReferenceCa }, }, }, - "resourcetemplates": { + "resourceTemplates": { VendorExtensible: spec.VendorExtensible{ Extensions: spec.Extensions{ "x-kubernetes-list-type": "atomic", diff --git a/pkg/apis/triggers/v1beta1/trigger_template_types.go b/pkg/apis/triggers/v1beta1/trigger_template_types.go index 78689cdb8..98352b3da 100644 --- a/pkg/apis/triggers/v1beta1/trigger_template_types.go +++ b/pkg/apis/triggers/v1beta1/trigger_template_types.go @@ -31,7 +31,7 @@ type TriggerTemplateSpec struct { // +listType=atomic Params []ParamSpec `json:"params,omitempty"` // +listType=atomic - ResourceTemplates []TriggerResourceTemplate `json:"resourcetemplates,omitempty"` + ResourceTemplates []TriggerResourceTemplate `json:"resourceTemplates,omitempty"` } // TriggerResourceTemplate describes a resource to create diff --git a/pkg/apis/triggers/v1beta1/trigger_template_validation.go b/pkg/apis/triggers/v1beta1/trigger_template_validation.go index 6200787c8..1e6bf0cea 100644 --- a/pkg/apis/triggers/v1beta1/trigger_template_validation.go +++ b/pkg/apis/triggers/v1beta1/trigger_template_validation.go @@ -56,10 +56,10 @@ func (s *TriggerTemplateSpec) validate(ctx context.Context) (errs *apis.FieldErr errs = errs.Also(apis.ErrMissingField(apis.CurrentField)) } if len(s.ResourceTemplates) == 0 { - errs = errs.Also(apis.ErrMissingField("resourcetemplates")) + errs = errs.Also(apis.ErrMissingField("resourceTemplates")) } - errs = errs.Also(validateResourceTemplates(s.ResourceTemplates).ViaField("resourcetemplates")) - errs = errs.Also(verifyParamDeclarations(s.Params, s.ResourceTemplates).ViaField("resourcetemplates")) + errs = errs.Also(validateResourceTemplates(s.ResourceTemplates).ViaField("resourceTemplates")) + errs = errs.Also(verifyParamDeclarations(s.Params, s.ResourceTemplates).ViaField("resourceTemplates")) return errs } diff --git a/pkg/apis/triggers/v1beta1/trigger_template_validation_test.go b/pkg/apis/triggers/v1beta1/trigger_template_validation_test.go index eac0781bf..2e4e6ab14 100644 --- a/pkg/apis/triggers/v1beta1/trigger_template_validation_test.go +++ b/pkg/apis/triggers/v1beta1/trigger_template_validation_test.go @@ -183,7 +183,7 @@ func TestTriggerTemplate_Validate(t *testing.T) { }, want: &apis.FieldError{ Message: "missing field(s)", - Paths: []string{"spec.resourcetemplates"}, + Paths: []string{"spec.resourceTemplates"}, }, }, { name: "resource template missing kind", @@ -209,7 +209,7 @@ func TestTriggerTemplate_Validate(t *testing.T) { }, want: &apis.FieldError{ Message: "missing field(s)", - Paths: []string{"spec.resourcetemplates[0].kind"}, + Paths: []string{"spec.resourceTemplates[0].kind"}, }, }, { name: "resource template missing apiVersion", @@ -235,7 +235,7 @@ func TestTriggerTemplate_Validate(t *testing.T) { }, want: &apis.FieldError{ Message: "missing field(s)", - Paths: []string{"spec.resourcetemplates[0].apiVersion"}, + Paths: []string{"spec.resourceTemplates[0].apiVersion"}, }, }, { name: "resource template invalid apiVersion", @@ -262,7 +262,7 @@ func TestTriggerTemplate_Validate(t *testing.T) { }, want: &apis.FieldError{ Message: `invalid value: no kind "pipelinerun" is registered for version "foobar"`, - Paths: []string{"spec.resourcetemplates[0]"}, + Paths: []string{"spec.resourceTemplates[0]"}, }, }, { name: "resource template invalid kind", @@ -289,7 +289,7 @@ func TestTriggerTemplate_Validate(t *testing.T) { }, want: &apis.FieldError{ Message: `invalid value: no kind "tekton.dev/v1beta1" is registered for version "foo"`, - Paths: []string{"spec.resourcetemplates[0]"}, + Paths: []string{"spec.resourceTemplates[0]"}, }, }, { name: "tt.params used in resource template are declared", @@ -325,7 +325,7 @@ func TestTriggerTemplate_Validate(t *testing.T) { }, want: &apis.FieldError{ Message: "invalid value: undeclared param '$(tt.params.foo)'", - Paths: []string{"spec.resourcetemplates[0]"}, + Paths: []string{"spec.resourceTemplates[0]"}, Details: "'$(tt.params.foo)' must be declared in spec.params", }, }, { @@ -369,7 +369,7 @@ func TestTriggerTemplate_Validate(t *testing.T) { Namespace: "foo", }, }, - want: apis.ErrMissingField("spec", "spec.resourcetemplates"), + want: apis.ErrMissingField("spec", "spec.resourceTemplates"), }} for _, tc := range tcs {