diff --git a/config/crds/pipeline_v1beta1_pipeline.yaml b/config/crds/pipeline_v1beta1_pipeline.yaml index fadd8df190e..b9d3cfbb8da 100644 --- a/config/crds/pipeline_v1beta1_pipeline.yaml +++ b/config/crds/pipeline_v1beta1_pipeline.yaml @@ -47,29 +47,29 @@ spec: clusterBindings: items: properties: - clusterName: - type: string inputName: type: string + key: + type: string required: - - clusterName + - key - inputName type: object type: array inputSourceBindings: items: properties: + key: + type: string name: type: string passedConstraints: items: type: string type: array - sourceKey: - type: string required: - name - - sourceKey + - key type: object type: array name: @@ -77,17 +77,17 @@ spec: outputSourceBindings: items: properties: + key: + type: string name: type: string passedConstraints: items: type: string type: array - sourceKey: - type: string required: - name - - sourceKey + - key type: object type: array params: diff --git a/config/samples/pipeline_v1beta1_pipeline.yaml b/config/samples/pipeline_v1beta1_pipeline.yaml index 7936d8f83e4..6e0d26d85ea 100644 --- a/config/samples/pipeline_v1beta1_pipeline.yaml +++ b/config/samples/pipeline_v1beta1_pipeline.yaml @@ -10,17 +10,17 @@ spec: name: test-wizzbang-task inputsourceBindings: - name: repoUnderTest - sourceKey: wizzbang + key: wizzbang - name: 'buildPush' taskRef: name: build-push-task inputSourceBindings: - name: 'workspace' - sourceKey: 'wizzbang' + key: 'wizzbang' passedConstraint: [test-wizzbang-task] outputSourceBindings: - name: registry - sourceKey: wizzbangStagingImage + key: wizzbangStagingImage params: - name: pathToDockerfile value: build/Dockerfile @@ -29,11 +29,11 @@ spec: name: integration-test-wizzbang-task inputSourceBindings: - name: repoUnderTest - sourceKey: wizzbang + key: wizzbang passedConstraint: [test] outputSourceBindings: - name: registry - sourceKey: wizzbangStagingImage + key: wizzbangStagingImage passedConstraint: [build-push-task] - name: deploy taskRef: @@ -43,13 +43,13 @@ spec: value: deploy/helm inputSourceBindings: - name: repoToDeploy - sourceKey: wizzbang + key: wizzbang passedConstraint: [integration-test-wizzbang-task] clusterBindings: - clusterName: prod outputSourceBindings: - name: registry - sourceKey: wizzbangStagingImage + key: wizzbangStagingImage passedConstraint: [build-push-task] resources: - name: wizzbang diff --git a/examples/pipelines/guestbook.yaml b/examples/pipelines/guestbook.yaml index 087b311b2e2..eda044f3f2f 100644 --- a/examples/pipelines/guestbook.yaml +++ b/examples/pipelines/guestbook.yaml @@ -10,10 +10,10 @@ spec: name: build-push inputSourceBindings: - name: workspace - sourceKey: guestbook + key: guestbook outputSourceBindings: - name: registry - sourceKey: stagingRegistry + key: stagingRegistry params: - name: pathToDockerfile value: guestbook-go/Dockerfile @@ -22,10 +22,10 @@ spec: name: build-push inputSourceBindings: - name: workspace - sourceKey: redis-docker # TODO Add Commit SHA + key: redis-docker # TODO Add Commit SHA outputSourceBindings: - name: registry - sourceKey: stagingRegistry + key: stagingRegistry params: - name: pathToDockerfile value: 4/debian9/4.0/Dockerfile @@ -34,12 +34,12 @@ spec: name: deploy-with-kubectl inputSourceBindings: - name: workspace - sourceKey: guestbook + key: guestbook passedConstraint: - build-guestbook - build-redis - name: workspace - sourceKey: redis-docker + key: redis-docker passedConstraint: - build-push params: @@ -52,7 +52,7 @@ spec: name: integrationTestInDocker inputSourceBindings: - name: workspace - sourceKey: guestbook + key: guestbook passedConstraint: - deploy-bundle-test params: @@ -63,7 +63,7 @@ spec: name: integration-test-in-docker inputSourceBindings: - name: workspace - sourceKey: guestbook + key: guestbook passedConstraint: - deploy-bundle-test params: @@ -74,7 +74,7 @@ spec: name: deploy-with-kubectl inputSourceBindings: - name: workspace - sourceKey: guestbook + key: guestbook passedConstraint: - int-test-osx - int-test-linux @@ -89,7 +89,7 @@ spec: name: guestbook - name: redis-docker resourceRef: - name: redis-docker + name: redis-docker - name: stagingRegistry resourceRef: name: stagingRegistry \ No newline at end of file diff --git a/examples/pipelines/kritis.yaml b/examples/pipelines/kritis.yaml index 84804076619..5d97fb31de6 100644 --- a/examples/pipelines/kritis.yaml +++ b/examples/pipelines/kritis.yaml @@ -10,7 +10,7 @@ spec: name: make inputSourceBindings: - name: workspace - sourceKey: kritis-app-github + key: kritis-app-github params: - name: makeTarget value: test @@ -19,12 +19,12 @@ spec: name: build-push inputSourceBindings: - name: workspace - sourceKey: kritis-app-github + key: kritis-app-github passedConstraint: - make outputSourceBindings: - name: registry - sourceKey: stagingRegistry + key: stagingRegistry params: - name: pathToDockerfile value: deploy/Dockerfile @@ -33,7 +33,7 @@ spec: name: deploy-with-helm inputSourceBindings: - name: registry - sourceKey: stagingRegistry + key: stagingRegistry passedConstraint: [build-push] params: - name: pathToHelmCharts @@ -45,7 +45,7 @@ spec: name: integration-test-in-docker inputSourceBindings: - name: workspace - sourceKey: kritis-test-github + key: kritis-test-github passedConstraint: [deploy-with-helm] params: - name: testArgs diff --git a/pkg/apis/pipeline/v1beta1/pipeline_types.go b/pkg/apis/pipeline/v1beta1/pipeline_types.go index e775e744768..3e6da5c7472 100644 --- a/pkg/apis/pipeline/v1beta1/pipeline_types.go +++ b/pkg/apis/pipeline/v1beta1/pipeline_types.go @@ -69,8 +69,8 @@ type PipelineTaskParam struct { // ClusterBinding is used to bind a cluster from a PipelineParams to a cluster required // as an input for a task. type ClusterBinding struct { - // ClusterName is the string that the PipelineParams will use to identify this source. - ClusterName string `json:"clusterName"` + // Key is the string that the PipelineParams will use to identify this source. + Key string `json:"key"` // InputName is the string the Task will use to identify this cluster in its inputs. InputName string `json:"inputName"` } @@ -80,8 +80,8 @@ type ClusterBinding struct { type SourceBinding struct { // InputName is the string the Task will use to identify this resource in its inputs. Name string `json:"name"` - // SourceKey is the string that the PipelineParams will use to identify this source. - SourceKey string `json:"sourceKey"` + // Key is the string that the PipelineParams will use to identify this source. + Key string `json:"key"` // TODO: validate the passedConstraints values match previous Task names // PassedConstraints is the list of Task names that the resource has to pass through. PassedConstraints []string `json:"passedConstraints,omitempty"`