From df1e8aa0ebf80d275b4277c4609a4f6bb03d77cf Mon Sep 17 00:00:00 2001 From: Andrew Bayer Date: Wed, 23 Mar 2022 12:12:49 -0400 Subject: [PATCH] [TEP-0100] Fields/flags/docs for embedded TaskRun and Run statuses in PipelineRuns See https://github.com/tektoncd/community/blob/main/teps/0100-embedded-taskruns-and-runs-status-in-pipelineruns.md This adds new choices for how `TaskRun` and `Run` statuses are stored/referenced in `PipelineRun` statuses, depending on how the new feature flag, `embedded-status` is set: * `full` - the current default, with the `TaskRun` and `Run` statuses embedded in full. * `minimal` - instead of storing the full embedded statuses, information is stored about the task's version, kind, `PipelineTask` name, and the underlying name of the `TaskRun` or `Run`. This can be used to look up the `TaskRun` or `Run` itself and get the full status from there. Information which is specific to the `PipelineRun`, namely condition checks status and when expressions which may have blocked creation of an actual `TaskRun` or `Run` are stored as well. * `both` - both the full embedded `TaskRun` and `Run` statuses and the minimal references are stored. The condition check information will be removed from the minimal references once the now-deprecated condition check functionality is removed from Tekton Pipeline. As described in https://github.com/tektoncd/community/blob/main/teps/0100-embedded-taskruns-and-runs-status-in-pipelineruns.md#beta-api, 9 months after this change has been released in `v1beta1`, the default value for the `embedded-status` feature flag will be changed from `full` to `minimal`, and a few months after that, the `embedded-status` feature flag will be removed entirely and only the `minimal` behavior will remain. Note that this also may address #4657, since I had to add documentation for `PipelineRunStatus`, and while I was there, I added some missing top-level fields to the `PipelineRun` definition. The actual implementation will follow this PR. Signed-off-by: Andrew Bayer --- docs/pipelineruns.md | 52 ++- pkg/apis/config/feature_flags.go | 32 ++ pkg/apis/config/feature_flags_test.go | 7 + .../testdata/feature-flags-all-flags-set.yaml | 1 + ...feature-flags-invalid-embedded-status.yaml | 21 ++ .../pipeline/v1beta1/openapi_generated.go | 310 +++++++++++++----- .../pipeline/v1beta1/pipelinerun_types.go | 31 ++ pkg/apis/pipeline/v1beta1/swagger.json | 76 ++++- .../pipeline/v1beta1/zz_generated.deepcopy.go | 59 ++++ test/custom_task_test.go | 1 + test/ignore_test.go.ignore | 122 +++++++ 11 files changed, 613 insertions(+), 99 deletions(-) create mode 100644 pkg/apis/config/testdata/feature-flags-invalid-embedded-status.yaml create mode 100644 test/ignore_test.go.ignore diff --git a/docs/pipelineruns.md b/docs/pipelineruns.md index 1a2ee740e0b..76ac33f68ec 100644 --- a/docs/pipelineruns.md +++ b/docs/pipelineruns.md @@ -23,7 +23,10 @@ weight: 500 - [Specifying Workspaces](#specifying-workspaces) - [Specifying LimitRange values](#specifying-limitrange-values) - [Configuring a failure timeout](#configuring-a-failure-timeout) - - [Monitoring execution status](#monitoring-execution-status) + - [PipelineRun status](#pipelinerun-status) + - [The status field](#the-status-field) + - [Configuring usage of TaskRun and Run embedded statuses](#configuring-usage-of-taskrun-and-run-embedded-statuses) + - [Monitoring execution status](#monitoring-execution-status) - [Cancelling a PipelineRun](#cancelling-a-pipelinerun) - [Gracefully cancelling a PipelineRun](#gracefully-cancelling-a-pipelinerun) - [Gracefully stopping a PipelineRun](#gracefully-stopping-a-pipelinerun) @@ -67,10 +70,11 @@ A `PipelineRun` definition supports the following fields: object that supplies specific execution credentials for the `Pipeline`. - [`serviceAccountNames`](#mapping-serviceaccount-credentials-to-tasks) - Maps specific `serviceAccountName` values to `Tasks` in the `Pipeline`. This overrides the credentials set for the entire `Pipeline`. - - [`taskRunSpec`](#specifying-taskrunspecs) - Specifies a list of `PipelineRunTaskSpec` which allows for setting `ServiceAccountName` and [`Pod` template](./podtemplates.md) for each task. This overrides the `Pod` template set for the entire `Pipeline`. - - [`timeout`](#configuring-a-failure-timeout) - Specifies the timeout before the `PipelineRun` fails. - - [`podTemplate`](#specifying-a-pod-template) - Specifies a [`Pod` template](./podtemplates.md) to use as the basis - for the configuration of the `Pod` that executes each `Task`. + - [`taskRunSpecs`](#specifying-taskrunspecs) - Specifies a list of `PipelineRunTaskSpec` which allows for setting `ServiceAccountName` and [`Pod` template](./podtemplates.md) for each task. This overrides the `Pod` template set for the entire `Pipeline`. + - [`timeout`](#configuring-a-failure-timeout) - Specifies the timeout before the `PipelineRun` fails. `timeout` is deprecated and will eventually be removed, so consider using `timeouts` instead. + - [`timeouts`](#configuring-a-failure-timeout) - Specifies the timeout before the `PipelineRun` fails. `timeouts` allows more granular timeout configuration, at the pipeline, tasks, and finally levels + - [`podTemplate`](#specifying-a-pod-template) - Specifies a [`Pod` template](./podtemplates.md) to use as the basis for the configuration of the `Pod` that executes each `Task`. + - [`workspaces`](#specifying-workspaces) - Specifies a set of workspace bindings which must match the names of workspaces declared in the pipeline being used. [kubernetes-overview]: https://kubernetes.io/docs/concepts/overview/working-with-objects/kubernetes-objects/#required-fields @@ -560,7 +564,43 @@ The `timeout` value is a `duration` conforming to Go's values are `1h30m`, `1h`, `1m`, and `60s`. If you set the global timeout to 0, all `PipelineRuns` that do not have an individual timeout set will fail immediately upon encountering an error. -## Monitoring execution status +## `PipelineRun` status + +### The `status` field + +Your `PipelineRun`'s `status` field can contain the following fields: + +- Required: + - `status` - Most relevant, `status.conditions`, which contains the latest observations of the `PipelineRun`'s state. [See here](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#typical-status-properties) for information on typical status properties. + - `startTime` - The time at which the `PipelineRun` began executing, in [RFC3339](https://tools.ietf.org/html/rfc3339) format. + - `completionTime` - The time at which the `PipelineRun` finished executing, in [RFC3339](https://tools.ietf.org/html/rfc3339) format. + - [`pipelineSpec`](pipelines.md#configuring-a-pipeline) - The exact `PipelineSpec` used when starting the `PipelineRun`. +- Optional: + - `taskRuns` - A map of `TaskRun` names to detailed information about the status of that `TaskRun`. This is deprecated and will be removed in favor of using `childReferences`. + - `runs` - A map of custom task `Run` names to detailed information about the status of that `Run`. This is deprecated and will be removed in favor of using `childReferences`. + - [`pipelineResults`](pipelines.md#emitting-results-from-a-pipeline) - Results emitted by this `PipelineRun`. + - `skippedTasks` - A list of `Task`s which were skipped when running this `PipelineRun` due to [when expressions](pipelines.md#guard-task-execution-using-when-expressions), including the when expressions applying to the skipped task. + - `childReferences` - A list of references to each `TaskRun` or `Run` in this `PipelineRun`, which can be used to look up the status of the underlying `TaskRun` or `Run`. Each entry contains the following: + - [`kind`][kubernetes-overview] - Generally either `TaskRun` or `Run`. + - [`apiVersion`][kubernetes-overview] - The API version for the underlying `TaskRun` or `Run`. + - `conditionChecks` - A list of [condition checks](conditions.md) performed for this `TaskRun`. `conditions` are deprecated and this will be removed in the future. + - [`whenExpressions`](pipelines.md#guard-task-execution-using-when-expressions) - The list of when expressions guarding the execution of this task. + +### Configuring usage of `TaskRun` and `Run` embedded statuses + +Currently, the default behavior is for the statuses of `TaskRun`s and `Run`s within this `PipelineRun` +to be embedded in the `status.taskRuns` and `status.runs` fields. This will change in the future to +instead default to `status.childReferences` being populated with references to the `TaskRun`s and +`Run`s, which can be used to look up their statuses. + +This behavior can be controlled by changing the `embedded-status` feature flag in the `feature-flags` +config map. See [`install.md`](./install.md#customizing-the-pipelines-controller-behavior) for more +information on feature flags. The possible values for `embedded-status` are: +- `full` - The current default behavior of populating `status.taskRuns` and `status.runs`, without populating `status.childReferences`. +- `minimal` - Just populate `status.childReferences`, not `status.taskRuns` or `status.runs`. +- `both` - Populate `status.childReferences` as well as `status.taskRuns` and `status.runs`. + +### Monitoring execution status As your `PipelineRun` executes, its `status` field accumulates information on the execution of each `TaskRun` as well as the `PipelineRun` as a whole. This information includes the name of the pipeline `Task` associated diff --git a/pkg/apis/config/feature_flags.go b/pkg/apis/config/feature_flags.go index dab18dad45f..463eacfaebf 100644 --- a/pkg/apis/config/feature_flags.go +++ b/pkg/apis/config/feature_flags.go @@ -30,6 +30,15 @@ const ( StableAPIFields = "stable" // AlphaAPIFields is the value used for "enable-api-fields" when alpha APIs should be usable as well. AlphaAPIFields = "alpha" + // FullEmbeddedStatus is the value used for "embedded-status" when the full statuses of TaskRuns and Runs should be + // embedded in PipelineRunStatusFields, but ChildReferences should not be used. + FullEmbeddedStatus = "full" + // BothEmbeddedStatus is the value used for "embedded-status" when full embedded statuses of TaskRuns and Runs as + // well as ChildReferences should be used in PipelineRunStatusFields. + BothEmbeddedStatus = "both" + // MinimalEmbeddedStatus is the value used for "embedded-status" when only ChildReferences should be used in + // PipelineRunStatusFields. + MinimalEmbeddedStatus = "minimal" // DefaultDisableAffinityAssistant is the default value for "disable-affinity-assistant". DefaultDisableAffinityAssistant = false // DefaultDisableCredsInit is the default value for "disable-creds-init". @@ -48,6 +57,8 @@ const ( DefaultEnableAPIFields = StableAPIFields // DefaultSendCloudEventsForRuns is the default value for "send-cloudevents-for-runs". DefaultSendCloudEventsForRuns = false + // DefaultEmbeddedStatus is the default value for "embedded-status". + DefaultEmbeddedStatus = FullEmbeddedStatus disableAffinityAssistantKey = "disable-affinity-assistant" disableCredsInitKey = "disable-creds-init" @@ -58,6 +69,7 @@ const ( enableAPIFields = "enable-api-fields" scopeWhenExpressionsToTask = "scope-when-expressions-to-task" sendCloudEventsForRuns = "send-cloudevents-for-runs" + embeddedStatus = "embedded-status" ) // FeatureFlags holds the features configurations @@ -72,6 +84,7 @@ type FeatureFlags struct { ScopeWhenExpressionsToTask bool EnableAPIFields string SendCloudEventsForRuns bool + EmbeddedStatus string } // GetFeatureFlagsConfigName returns the name of the configmap containing all @@ -120,6 +133,9 @@ func NewFeatureFlagsFromMap(cfgMap map[string]string) (*FeatureFlags, error) { if err := setFeature(sendCloudEventsForRuns, DefaultSendCloudEventsForRuns, &tc.SendCloudEventsForRuns); err != nil { return nil, err } + if err := setEmbeddedStatus(cfgMap, DefaultEmbeddedStatus, &tc.EmbeddedStatus); err != nil { + return nil, err + } // Given that they are alpha features, Tekton Bundles and Custom Tasks should be switched on if // enable-api-fields is "alpha". If enable-api-fields is not "alpha" then fall back to the value of @@ -157,6 +173,22 @@ func setEnabledAPIFields(cfgMap map[string]string, defaultValue string, feature return nil } +// setEmbeddedStatus sets the "embedded-status" flag based on the content of a given map. +// If the feature gate is invalid or missing then an error is returned. +func setEmbeddedStatus(cfgMap map[string]string, defaultValue string, feature *string) error { + value := defaultValue + if cfg, ok := cfgMap[embeddedStatus]; ok { + value = strings.ToLower(cfg) + } + switch value { + case FullEmbeddedStatus, BothEmbeddedStatus, MinimalEmbeddedStatus: + *feature = value + default: + return fmt.Errorf("invalid value for feature flag %q: %q", embeddedStatus, value) + } + return nil +} + // NewFeatureFlagsFromConfigMap returns a Config for the given configmap func NewFeatureFlagsFromConfigMap(config *corev1.ConfigMap) (*FeatureFlags, error) { return NewFeatureFlagsFromMap(config.Data) diff --git a/pkg/apis/config/feature_flags_test.go b/pkg/apis/config/feature_flags_test.go index 792f3b08194..dccf4138596 100644 --- a/pkg/apis/config/feature_flags_test.go +++ b/pkg/apis/config/feature_flags_test.go @@ -38,6 +38,7 @@ func TestNewFeatureFlagsFromConfigMap(t *testing.T) { RunningInEnvWithInjectedSidecars: config.DefaultRunningInEnvWithInjectedSidecars, ScopeWhenExpressionsToTask: config.DefaultScopeWhenExpressionsToTask, EnableAPIFields: "stable", + EmbeddedStatus: config.DefaultEmbeddedStatus, }, fileName: config.GetFeatureFlagsConfigName(), }, @@ -51,6 +52,7 @@ func TestNewFeatureFlagsFromConfigMap(t *testing.T) { ScopeWhenExpressionsToTask: true, EnableAPIFields: "alpha", SendCloudEventsForRuns: true, + EmbeddedStatus: "both", }, fileName: "feature-flags-all-flags-set", }, @@ -64,6 +66,7 @@ func TestNewFeatureFlagsFromConfigMap(t *testing.T) { RunningInEnvWithInjectedSidecars: config.DefaultRunningInEnvWithInjectedSidecars, ScopeWhenExpressionsToTask: config.DefaultScopeWhenExpressionsToTask, + EmbeddedStatus: config.DefaultEmbeddedStatus, }, fileName: "feature-flags-enable-api-fields-overrides-bundles-and-custom-tasks", }, @@ -75,6 +78,7 @@ func TestNewFeatureFlagsFromConfigMap(t *testing.T) { RunningInEnvWithInjectedSidecars: config.DefaultRunningInEnvWithInjectedSidecars, ScopeWhenExpressionsToTask: config.DefaultScopeWhenExpressionsToTask, + EmbeddedStatus: config.DefaultEmbeddedStatus, }, fileName: "feature-flags-bundles-and-custom-tasks", }, @@ -95,6 +99,7 @@ func TestNewFeatureFlagsFromEmptyConfigMap(t *testing.T) { RunningInEnvWithInjectedSidecars: true, ScopeWhenExpressionsToTask: config.DefaultScopeWhenExpressionsToTask, EnableAPIFields: "stable", + EmbeddedStatus: config.DefaultEmbeddedStatus, } verifyConfigFileWithExpectedFeatureFlagsConfig(t, FeatureFlagsConfigEmptyName, expectedConfig) } @@ -137,6 +142,8 @@ func TestNewFeatureFlagsConfigMapErrors(t *testing.T) { fileName: "feature-flags-invalid-boolean", }, { fileName: "feature-flags-invalid-enable-api-fields", + }, { + fileName: "feature-flags-invalid-embedded-status", }, { fileName: "feature-flags-invalid-scope-when-expressions-to-task", }} { diff --git a/pkg/apis/config/testdata/feature-flags-all-flags-set.yaml b/pkg/apis/config/testdata/feature-flags-all-flags-set.yaml index 84d5a6f6bd4..f80f3be96c2 100644 --- a/pkg/apis/config/testdata/feature-flags-all-flags-set.yaml +++ b/pkg/apis/config/testdata/feature-flags-all-flags-set.yaml @@ -26,3 +26,4 @@ data: scope-when-expressions-to-task: "true" enable-api-fields: "alpha" send-cloudevents-for-runs: "true" + embedded-status: "both" diff --git a/pkg/apis/config/testdata/feature-flags-invalid-embedded-status.yaml b/pkg/apis/config/testdata/feature-flags-invalid-embedded-status.yaml new file mode 100644 index 00000000000..84ba4e5bf74 --- /dev/null +++ b/pkg/apis/config/testdata/feature-flags-invalid-embedded-status.yaml @@ -0,0 +1,21 @@ +# Copyright 2021 The Tekton Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +apiVersion: v1 +kind: ConfigMap +metadata: + name: feature-flags + namespace: tekton-pipelines +data: + enable-api-fields: "im-not-a-valid-feature-gate" diff --git a/pkg/apis/pipeline/v1beta1/openapi_generated.go b/pkg/apis/pipeline/v1beta1/openapi_generated.go index 529e69d5dec..016a789ad7b 100644 --- a/pkg/apis/pipeline/v1beta1/openapi_generated.go +++ b/pkg/apis/pipeline/v1beta1/openapi_generated.go @@ -29,89 +29,91 @@ import ( func GetOpenAPIDefinitions(ref common.ReferenceCallback) map[string]common.OpenAPIDefinition { return map[string]common.OpenAPIDefinition{ - "github.com/tektoncd/pipeline/pkg/apis/pipeline/pod.Template": schema_pkg_apis_pipeline_pod_Template(ref), - "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.ArrayOrString": schema_pkg_apis_pipeline_v1beta1_ArrayOrString(ref), - "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.CloudEventDelivery": schema_pkg_apis_pipeline_v1beta1_CloudEventDelivery(ref), - "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.CloudEventDeliveryState": schema_pkg_apis_pipeline_v1beta1_CloudEventDeliveryState(ref), - "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.ClusterTask": schema_pkg_apis_pipeline_v1beta1_ClusterTask(ref), - "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.ClusterTaskList": schema_pkg_apis_pipeline_v1beta1_ClusterTaskList(ref), - "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.ConditionCheck": schema_pkg_apis_pipeline_v1beta1_ConditionCheck(ref), - "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.ConditionCheckStatus": schema_pkg_apis_pipeline_v1beta1_ConditionCheckStatus(ref), - "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.ConditionCheckStatusFields": schema_pkg_apis_pipeline_v1beta1_ConditionCheckStatusFields(ref), - "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.EmbeddedTask": schema_pkg_apis_pipeline_v1beta1_EmbeddedTask(ref), - "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.InternalTaskModifier": schema_pkg_apis_pipeline_v1beta1_InternalTaskModifier(ref), - "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.Param": schema_pkg_apis_pipeline_v1beta1_Param(ref), - "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.ParamSpec": schema_pkg_apis_pipeline_v1beta1_ParamSpec(ref), - "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.Pipeline": schema_pkg_apis_pipeline_v1beta1_Pipeline(ref), - "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.PipelineDeclaredResource": schema_pkg_apis_pipeline_v1beta1_PipelineDeclaredResource(ref), - "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.PipelineList": schema_pkg_apis_pipeline_v1beta1_PipelineList(ref), - "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.PipelineRef": schema_pkg_apis_pipeline_v1beta1_PipelineRef(ref), - "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.PipelineResourceBinding": schema_pkg_apis_pipeline_v1beta1_PipelineResourceBinding(ref), - "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.PipelineResourceRef": schema_pkg_apis_pipeline_v1beta1_PipelineResourceRef(ref), - "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.PipelineResourceResult": schema_pkg_apis_pipeline_v1beta1_PipelineResourceResult(ref), - "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.PipelineResult": schema_pkg_apis_pipeline_v1beta1_PipelineResult(ref), - "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.PipelineRun": schema_pkg_apis_pipeline_v1beta1_PipelineRun(ref), - "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.PipelineRunConditionCheckStatus": schema_pkg_apis_pipeline_v1beta1_PipelineRunConditionCheckStatus(ref), - "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.PipelineRunList": schema_pkg_apis_pipeline_v1beta1_PipelineRunList(ref), - "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.PipelineRunResult": schema_pkg_apis_pipeline_v1beta1_PipelineRunResult(ref), - "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.PipelineRunRunStatus": schema_pkg_apis_pipeline_v1beta1_PipelineRunRunStatus(ref), - "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.PipelineRunSpec": schema_pkg_apis_pipeline_v1beta1_PipelineRunSpec(ref), - "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.PipelineRunSpecServiceAccountName": schema_pkg_apis_pipeline_v1beta1_PipelineRunSpecServiceAccountName(ref), - "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.PipelineRunStatus": schema_pkg_apis_pipeline_v1beta1_PipelineRunStatus(ref), - "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.PipelineRunStatusFields": schema_pkg_apis_pipeline_v1beta1_PipelineRunStatusFields(ref), - "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.PipelineRunTaskRunStatus": schema_pkg_apis_pipeline_v1beta1_PipelineRunTaskRunStatus(ref), - "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.PipelineSpec": schema_pkg_apis_pipeline_v1beta1_PipelineSpec(ref), - "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.PipelineTask": schema_pkg_apis_pipeline_v1beta1_PipelineTask(ref), - "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.PipelineTaskCondition": schema_pkg_apis_pipeline_v1beta1_PipelineTaskCondition(ref), - "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.PipelineTaskInputResource": schema_pkg_apis_pipeline_v1beta1_PipelineTaskInputResource(ref), - "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.PipelineTaskMetadata": schema_pkg_apis_pipeline_v1beta1_PipelineTaskMetadata(ref), - "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.PipelineTaskOutputResource": schema_pkg_apis_pipeline_v1beta1_PipelineTaskOutputResource(ref), - "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.PipelineTaskParam": schema_pkg_apis_pipeline_v1beta1_PipelineTaskParam(ref), - "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.PipelineTaskResources": schema_pkg_apis_pipeline_v1beta1_PipelineTaskResources(ref), - "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.PipelineTaskRun": schema_pkg_apis_pipeline_v1beta1_PipelineTaskRun(ref), - "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.PipelineTaskRunSpec": schema_pkg_apis_pipeline_v1beta1_PipelineTaskRunSpec(ref), - "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.PipelineWorkspaceDeclaration": schema_pkg_apis_pipeline_v1beta1_PipelineWorkspaceDeclaration(ref), - "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.ResolverParam": schema_pkg_apis_pipeline_v1beta1_ResolverParam(ref), - "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.ResolverRef": schema_pkg_apis_pipeline_v1beta1_ResolverRef(ref), - "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.ResultRef": schema_pkg_apis_pipeline_v1beta1_ResultRef(ref), - "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.Sidecar": schema_pkg_apis_pipeline_v1beta1_Sidecar(ref), - "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.SidecarState": schema_pkg_apis_pipeline_v1beta1_SidecarState(ref), - "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.SkippedTask": schema_pkg_apis_pipeline_v1beta1_SkippedTask(ref), - "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.Step": schema_pkg_apis_pipeline_v1beta1_Step(ref), - "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.StepState": schema_pkg_apis_pipeline_v1beta1_StepState(ref), - "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.Task": schema_pkg_apis_pipeline_v1beta1_Task(ref), - "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.TaskList": schema_pkg_apis_pipeline_v1beta1_TaskList(ref), - "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.TaskRef": schema_pkg_apis_pipeline_v1beta1_TaskRef(ref), - "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.TaskResource": schema_pkg_apis_pipeline_v1beta1_TaskResource(ref), - "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.TaskResourceBinding": schema_pkg_apis_pipeline_v1beta1_TaskResourceBinding(ref), - "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.TaskResources": schema_pkg_apis_pipeline_v1beta1_TaskResources(ref), - "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.TaskResult": schema_pkg_apis_pipeline_v1beta1_TaskResult(ref), - "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.TaskRun": schema_pkg_apis_pipeline_v1beta1_TaskRun(ref), - "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.TaskRunDebug": schema_pkg_apis_pipeline_v1beta1_TaskRunDebug(ref), - "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.TaskRunInputs": schema_pkg_apis_pipeline_v1beta1_TaskRunInputs(ref), - "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.TaskRunList": schema_pkg_apis_pipeline_v1beta1_TaskRunList(ref), - "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.TaskRunOutputs": schema_pkg_apis_pipeline_v1beta1_TaskRunOutputs(ref), - "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.TaskRunResources": schema_pkg_apis_pipeline_v1beta1_TaskRunResources(ref), - "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.TaskRunResult": schema_pkg_apis_pipeline_v1beta1_TaskRunResult(ref), - "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.TaskRunSidecarOverride": schema_pkg_apis_pipeline_v1beta1_TaskRunSidecarOverride(ref), - "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.TaskRunSpec": schema_pkg_apis_pipeline_v1beta1_TaskRunSpec(ref), - "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.TaskRunStatus": schema_pkg_apis_pipeline_v1beta1_TaskRunStatus(ref), - "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.TaskRunStatusFields": schema_pkg_apis_pipeline_v1beta1_TaskRunStatusFields(ref), - "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.TaskRunStepOverride": schema_pkg_apis_pipeline_v1beta1_TaskRunStepOverride(ref), - "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.TaskSpec": schema_pkg_apis_pipeline_v1beta1_TaskSpec(ref), - "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.TimeoutFields": schema_pkg_apis_pipeline_v1beta1_TimeoutFields(ref), - "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.WhenExpression": schema_pkg_apis_pipeline_v1beta1_WhenExpression(ref), - "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.WorkspaceBinding": schema_pkg_apis_pipeline_v1beta1_WorkspaceBinding(ref), - "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.WorkspaceDeclaration": schema_pkg_apis_pipeline_v1beta1_WorkspaceDeclaration(ref), - "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.WorkspacePipelineTaskBinding": schema_pkg_apis_pipeline_v1beta1_WorkspacePipelineTaskBinding(ref), - "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.WorkspaceUsage": schema_pkg_apis_pipeline_v1beta1_WorkspaceUsage(ref), - "github.com/tektoncd/pipeline/pkg/apis/resource/v1alpha1.PipelineResource": schema_pkg_apis_resource_v1alpha1_PipelineResource(ref), - "github.com/tektoncd/pipeline/pkg/apis/resource/v1alpha1.PipelineResourceList": schema_pkg_apis_resource_v1alpha1_PipelineResourceList(ref), - "github.com/tektoncd/pipeline/pkg/apis/resource/v1alpha1.PipelineResourceSpec": schema_pkg_apis_resource_v1alpha1_PipelineResourceSpec(ref), - "github.com/tektoncd/pipeline/pkg/apis/resource/v1alpha1.PipelineResourceStatus": schema_pkg_apis_resource_v1alpha1_PipelineResourceStatus(ref), - "github.com/tektoncd/pipeline/pkg/apis/resource/v1alpha1.ResourceDeclaration": schema_pkg_apis_resource_v1alpha1_ResourceDeclaration(ref), - "github.com/tektoncd/pipeline/pkg/apis/resource/v1alpha1.ResourceParam": schema_pkg_apis_resource_v1alpha1_ResourceParam(ref), - "github.com/tektoncd/pipeline/pkg/apis/resource/v1alpha1.SecretParam": schema_pkg_apis_resource_v1alpha1_SecretParam(ref), + "github.com/tektoncd/pipeline/pkg/apis/pipeline/pod.Template": schema_pkg_apis_pipeline_pod_Template(ref), + "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.ArrayOrString": schema_pkg_apis_pipeline_v1beta1_ArrayOrString(ref), + "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.ChildStatusReference": schema_pkg_apis_pipeline_v1beta1_ChildStatusReference(ref), + "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.CloudEventDelivery": schema_pkg_apis_pipeline_v1beta1_CloudEventDelivery(ref), + "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.CloudEventDeliveryState": schema_pkg_apis_pipeline_v1beta1_CloudEventDeliveryState(ref), + "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.ClusterTask": schema_pkg_apis_pipeline_v1beta1_ClusterTask(ref), + "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.ClusterTaskList": schema_pkg_apis_pipeline_v1beta1_ClusterTaskList(ref), + "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.ConditionCheck": schema_pkg_apis_pipeline_v1beta1_ConditionCheck(ref), + "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.ConditionCheckStatus": schema_pkg_apis_pipeline_v1beta1_ConditionCheckStatus(ref), + "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.ConditionCheckStatusFields": schema_pkg_apis_pipeline_v1beta1_ConditionCheckStatusFields(ref), + "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.EmbeddedTask": schema_pkg_apis_pipeline_v1beta1_EmbeddedTask(ref), + "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.InternalTaskModifier": schema_pkg_apis_pipeline_v1beta1_InternalTaskModifier(ref), + "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.Param": schema_pkg_apis_pipeline_v1beta1_Param(ref), + "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.ParamSpec": schema_pkg_apis_pipeline_v1beta1_ParamSpec(ref), + "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.Pipeline": schema_pkg_apis_pipeline_v1beta1_Pipeline(ref), + "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.PipelineDeclaredResource": schema_pkg_apis_pipeline_v1beta1_PipelineDeclaredResource(ref), + "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.PipelineList": schema_pkg_apis_pipeline_v1beta1_PipelineList(ref), + "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.PipelineRef": schema_pkg_apis_pipeline_v1beta1_PipelineRef(ref), + "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.PipelineResourceBinding": schema_pkg_apis_pipeline_v1beta1_PipelineResourceBinding(ref), + "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.PipelineResourceRef": schema_pkg_apis_pipeline_v1beta1_PipelineResourceRef(ref), + "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.PipelineResourceResult": schema_pkg_apis_pipeline_v1beta1_PipelineResourceResult(ref), + "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.PipelineResult": schema_pkg_apis_pipeline_v1beta1_PipelineResult(ref), + "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.PipelineRun": schema_pkg_apis_pipeline_v1beta1_PipelineRun(ref), + "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.PipelineRunChildConditionCheckStatus": schema_pkg_apis_pipeline_v1beta1_PipelineRunChildConditionCheckStatus(ref), + "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.PipelineRunConditionCheckStatus": schema_pkg_apis_pipeline_v1beta1_PipelineRunConditionCheckStatus(ref), + "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.PipelineRunList": schema_pkg_apis_pipeline_v1beta1_PipelineRunList(ref), + "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.PipelineRunResult": schema_pkg_apis_pipeline_v1beta1_PipelineRunResult(ref), + "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.PipelineRunRunStatus": schema_pkg_apis_pipeline_v1beta1_PipelineRunRunStatus(ref), + "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.PipelineRunSpec": schema_pkg_apis_pipeline_v1beta1_PipelineRunSpec(ref), + "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.PipelineRunSpecServiceAccountName": schema_pkg_apis_pipeline_v1beta1_PipelineRunSpecServiceAccountName(ref), + "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.PipelineRunStatus": schema_pkg_apis_pipeline_v1beta1_PipelineRunStatus(ref), + "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.PipelineRunStatusFields": schema_pkg_apis_pipeline_v1beta1_PipelineRunStatusFields(ref), + "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.PipelineRunTaskRunStatus": schema_pkg_apis_pipeline_v1beta1_PipelineRunTaskRunStatus(ref), + "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.PipelineSpec": schema_pkg_apis_pipeline_v1beta1_PipelineSpec(ref), + "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.PipelineTask": schema_pkg_apis_pipeline_v1beta1_PipelineTask(ref), + "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.PipelineTaskCondition": schema_pkg_apis_pipeline_v1beta1_PipelineTaskCondition(ref), + "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.PipelineTaskInputResource": schema_pkg_apis_pipeline_v1beta1_PipelineTaskInputResource(ref), + "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.PipelineTaskMetadata": schema_pkg_apis_pipeline_v1beta1_PipelineTaskMetadata(ref), + "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.PipelineTaskOutputResource": schema_pkg_apis_pipeline_v1beta1_PipelineTaskOutputResource(ref), + "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.PipelineTaskParam": schema_pkg_apis_pipeline_v1beta1_PipelineTaskParam(ref), + "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.PipelineTaskResources": schema_pkg_apis_pipeline_v1beta1_PipelineTaskResources(ref), + "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.PipelineTaskRun": schema_pkg_apis_pipeline_v1beta1_PipelineTaskRun(ref), + "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.PipelineTaskRunSpec": schema_pkg_apis_pipeline_v1beta1_PipelineTaskRunSpec(ref), + "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.PipelineWorkspaceDeclaration": schema_pkg_apis_pipeline_v1beta1_PipelineWorkspaceDeclaration(ref), + "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.ResolverParam": schema_pkg_apis_pipeline_v1beta1_ResolverParam(ref), + "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.ResolverRef": schema_pkg_apis_pipeline_v1beta1_ResolverRef(ref), + "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.ResultRef": schema_pkg_apis_pipeline_v1beta1_ResultRef(ref), + "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.Sidecar": schema_pkg_apis_pipeline_v1beta1_Sidecar(ref), + "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.SidecarState": schema_pkg_apis_pipeline_v1beta1_SidecarState(ref), + "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.SkippedTask": schema_pkg_apis_pipeline_v1beta1_SkippedTask(ref), + "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.Step": schema_pkg_apis_pipeline_v1beta1_Step(ref), + "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.StepState": schema_pkg_apis_pipeline_v1beta1_StepState(ref), + "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.Task": schema_pkg_apis_pipeline_v1beta1_Task(ref), + "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.TaskList": schema_pkg_apis_pipeline_v1beta1_TaskList(ref), + "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.TaskRef": schema_pkg_apis_pipeline_v1beta1_TaskRef(ref), + "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.TaskResource": schema_pkg_apis_pipeline_v1beta1_TaskResource(ref), + "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.TaskResourceBinding": schema_pkg_apis_pipeline_v1beta1_TaskResourceBinding(ref), + "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.TaskResources": schema_pkg_apis_pipeline_v1beta1_TaskResources(ref), + "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.TaskResult": schema_pkg_apis_pipeline_v1beta1_TaskResult(ref), + "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.TaskRun": schema_pkg_apis_pipeline_v1beta1_TaskRun(ref), + "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.TaskRunDebug": schema_pkg_apis_pipeline_v1beta1_TaskRunDebug(ref), + "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.TaskRunInputs": schema_pkg_apis_pipeline_v1beta1_TaskRunInputs(ref), + "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.TaskRunList": schema_pkg_apis_pipeline_v1beta1_TaskRunList(ref), + "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.TaskRunOutputs": schema_pkg_apis_pipeline_v1beta1_TaskRunOutputs(ref), + "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.TaskRunResources": schema_pkg_apis_pipeline_v1beta1_TaskRunResources(ref), + "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.TaskRunResult": schema_pkg_apis_pipeline_v1beta1_TaskRunResult(ref), + "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.TaskRunSidecarOverride": schema_pkg_apis_pipeline_v1beta1_TaskRunSidecarOverride(ref), + "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.TaskRunSpec": schema_pkg_apis_pipeline_v1beta1_TaskRunSpec(ref), + "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.TaskRunStatus": schema_pkg_apis_pipeline_v1beta1_TaskRunStatus(ref), + "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.TaskRunStatusFields": schema_pkg_apis_pipeline_v1beta1_TaskRunStatusFields(ref), + "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.TaskRunStepOverride": schema_pkg_apis_pipeline_v1beta1_TaskRunStepOverride(ref), + "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.TaskSpec": schema_pkg_apis_pipeline_v1beta1_TaskSpec(ref), + "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.TimeoutFields": schema_pkg_apis_pipeline_v1beta1_TimeoutFields(ref), + "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.WhenExpression": schema_pkg_apis_pipeline_v1beta1_WhenExpression(ref), + "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.WorkspaceBinding": schema_pkg_apis_pipeline_v1beta1_WorkspaceBinding(ref), + "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.WorkspaceDeclaration": schema_pkg_apis_pipeline_v1beta1_WorkspaceDeclaration(ref), + "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.WorkspacePipelineTaskBinding": schema_pkg_apis_pipeline_v1beta1_WorkspacePipelineTaskBinding(ref), + "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.WorkspaceUsage": schema_pkg_apis_pipeline_v1beta1_WorkspaceUsage(ref), + "github.com/tektoncd/pipeline/pkg/apis/resource/v1alpha1.PipelineResource": schema_pkg_apis_resource_v1alpha1_PipelineResource(ref), + "github.com/tektoncd/pipeline/pkg/apis/resource/v1alpha1.PipelineResourceList": schema_pkg_apis_resource_v1alpha1_PipelineResourceList(ref), + "github.com/tektoncd/pipeline/pkg/apis/resource/v1alpha1.PipelineResourceSpec": schema_pkg_apis_resource_v1alpha1_PipelineResourceSpec(ref), + "github.com/tektoncd/pipeline/pkg/apis/resource/v1alpha1.PipelineResourceStatus": schema_pkg_apis_resource_v1alpha1_PipelineResourceStatus(ref), + "github.com/tektoncd/pipeline/pkg/apis/resource/v1alpha1.ResourceDeclaration": schema_pkg_apis_resource_v1alpha1_ResourceDeclaration(ref), + "github.com/tektoncd/pipeline/pkg/apis/resource/v1alpha1.ResourceParam": schema_pkg_apis_resource_v1alpha1_ResourceParam(ref), + "github.com/tektoncd/pipeline/pkg/apis/resource/v1alpha1.SecretParam": schema_pkg_apis_resource_v1alpha1_SecretParam(ref), } } @@ -318,6 +320,74 @@ func schema_pkg_apis_pipeline_v1beta1_ArrayOrString(ref common.ReferenceCallback } } +func schema_pkg_apis_pipeline_v1beta1_ChildStatusReference(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ChildStatusReference is used to point to the statuses of individual TaskRuns and Runs within this PipelineRun.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "apiVersion": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + "kind": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + "name": { + SchemaProps: spec.SchemaProps{ + Description: "Name is the name of the TaskRun or Run this is referencing.", + Type: []string{"string"}, + Format: "", + }, + }, + "pipelineTaskName": { + SchemaProps: spec.SchemaProps{ + Description: "PipelineTaskName is the name of the PipelineTask this is referencing.", + Type: []string{"string"}, + Format: "", + }, + }, + "conditionChecks": { + SchemaProps: spec.SchemaProps{ + Description: "ConditionChecks is the the list of condition checks, including their names and statuses, for the PipelineTask. Deprecated: This field will be removed when conditions are removed for v1.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.PipelineRunChildConditionCheckStatus"), + }, + }, + }, + }, + }, + "whenExpressions": { + SchemaProps: spec.SchemaProps{ + Description: "WhenExpressions is the list of checks guarding the execution of the PipelineTask", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.WhenExpression"), + }, + }, + }, + }, + }, + }, + }, + }, + Dependencies: []string{ + "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.PipelineRunChildConditionCheckStatus", "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.WhenExpression"}, + } +} + func schema_pkg_apis_pipeline_v1beta1_CloudEventDelivery(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ @@ -1285,6 +1355,40 @@ func schema_pkg_apis_pipeline_v1beta1_PipelineRun(ref common.ReferenceCallback) } } +func schema_pkg_apis_pipeline_v1beta1_PipelineRunChildConditionCheckStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "PipelineRunChildConditionCheckStatus is used to record the status of condition checks within StatusChildReferences.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "conditionName": { + SchemaProps: spec.SchemaProps{ + Description: "ConditionName is the name of the Condition", + Type: []string{"string"}, + Format: "", + }, + }, + "status": { + SchemaProps: spec.SchemaProps{ + Description: "Status is the ConditionCheckStatus for the corresponding ConditionCheck", + Ref: ref("github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.ConditionCheckStatus"), + }, + }, + "conditionCheckName": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + Dependencies: []string{ + "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.ConditionCheckStatus"}, + } +} + func schema_pkg_apis_pipeline_v1beta1_PipelineRunConditionCheckStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ @@ -1648,7 +1752,7 @@ func schema_pkg_apis_pipeline_v1beta1_PipelineRunStatus(ref common.ReferenceCall }, "taskRuns": { SchemaProps: spec.SchemaProps{ - Description: "map of PipelineRunTaskRunStatus with the taskRun name as the key", + Description: "Deprecated - use ChildReferences instead. map of PipelineRunTaskRunStatus with the taskRun name as the key", Type: []string{"object"}, AdditionalProperties: &spec.SchemaOrBool{ Allows: true, @@ -1662,7 +1766,7 @@ func schema_pkg_apis_pipeline_v1beta1_PipelineRunStatus(ref common.ReferenceCall }, "runs": { SchemaProps: spec.SchemaProps{ - Description: "map of PipelineRunRunStatus with the run name as the key", + Description: "Deprecated - use ChildReferences instead. map of PipelineRunRunStatus with the run name as the key", Type: []string{"object"}, AdditionalProperties: &spec.SchemaOrBool{ Allows: true, @@ -1708,11 +1812,25 @@ func schema_pkg_apis_pipeline_v1beta1_PipelineRunStatus(ref common.ReferenceCall }, }, }, + "childReferences": { + SchemaProps: spec.SchemaProps{ + Description: "list of TaskRun and Run names, PipelineTask names, and API versions/kinds for children of this PipelineRun.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.ChildStatusReference"), + }, + }, + }, + }, + }, }, }, }, Dependencies: []string{ - "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.PipelineRunResult", "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.PipelineRunRunStatus", "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.PipelineRunTaskRunStatus", "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.PipelineSpec", "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.SkippedTask", "k8s.io/apimachinery/pkg/apis/meta/v1.Time", "knative.dev/pkg/apis.Condition"}, + "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.ChildStatusReference", "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.PipelineRunResult", "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.PipelineRunRunStatus", "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.PipelineRunTaskRunStatus", "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.PipelineSpec", "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.SkippedTask", "k8s.io/apimachinery/pkg/apis/meta/v1.Time", "knative.dev/pkg/apis.Condition"}, } } @@ -1737,7 +1855,7 @@ func schema_pkg_apis_pipeline_v1beta1_PipelineRunStatusFields(ref common.Referen }, "taskRuns": { SchemaProps: spec.SchemaProps{ - Description: "map of PipelineRunTaskRunStatus with the taskRun name as the key", + Description: "Deprecated - use ChildReferences instead. map of PipelineRunTaskRunStatus with the taskRun name as the key", Type: []string{"object"}, AdditionalProperties: &spec.SchemaOrBool{ Allows: true, @@ -1751,7 +1869,7 @@ func schema_pkg_apis_pipeline_v1beta1_PipelineRunStatusFields(ref common.Referen }, "runs": { SchemaProps: spec.SchemaProps{ - Description: "map of PipelineRunRunStatus with the run name as the key", + Description: "Deprecated - use ChildReferences instead. map of PipelineRunRunStatus with the run name as the key", Type: []string{"object"}, AdditionalProperties: &spec.SchemaOrBool{ Allows: true, @@ -1797,11 +1915,25 @@ func schema_pkg_apis_pipeline_v1beta1_PipelineRunStatusFields(ref common.Referen }, }, }, + "childReferences": { + SchemaProps: spec.SchemaProps{ + Description: "list of TaskRun and Run names, PipelineTask names, and API versions/kinds for children of this PipelineRun.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.ChildStatusReference"), + }, + }, + }, + }, + }, }, }, }, Dependencies: []string{ - "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.PipelineRunResult", "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.PipelineRunRunStatus", "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.PipelineRunTaskRunStatus", "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.PipelineSpec", "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.SkippedTask", "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, + "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.ChildStatusReference", "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.PipelineRunResult", "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.PipelineRunRunStatus", "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.PipelineRunTaskRunStatus", "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.PipelineSpec", "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.SkippedTask", "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, } } diff --git a/pkg/apis/pipeline/v1beta1/pipelinerun_types.go b/pkg/apis/pipeline/v1beta1/pipelinerun_types.go index 31b64ef959b..91031c021ba 100644 --- a/pkg/apis/pipeline/v1beta1/pipelinerun_types.go +++ b/pkg/apis/pipeline/v1beta1/pipelinerun_types.go @@ -20,6 +20,8 @@ import ( "context" "time" + "k8s.io/apimachinery/pkg/runtime" + "github.com/tektoncd/pipeline/pkg/apis/config" apisconfig "github.com/tektoncd/pipeline/pkg/apis/config" "github.com/tektoncd/pipeline/pkg/apis/pipeline" @@ -396,6 +398,23 @@ func (pr *PipelineRunStatus) MarkRunning(reason, messageFormat string, messageA pipelineRunCondSet.Manage(pr).MarkUnknown(apis.ConditionSucceeded, reason, messageFormat, messageA...) } +// ChildStatusReference is used to point to the statuses of individual TaskRuns and Runs within this PipelineRun. +type ChildStatusReference struct { + runtime.TypeMeta `json:",inline"` + // Name is the name of the TaskRun or Run this is referencing. + Name string `json:"name,omitempty"` + // PipelineTaskName is the name of the PipelineTask this is referencing. + PipelineTaskName string `json:"pipelineTaskName,omitempty"` + + // ConditionChecks is the the list of condition checks, including their names and statuses, for the PipelineTask. + // Deprecated: This field will be removed when conditions are removed for v1. + // +optional + ConditionChecks []*PipelineRunChildConditionCheckStatus `json:"conditionChecks,omitempty"` + // WhenExpressions is the list of checks guarding the execution of the PipelineTask + // +optional + WhenExpressions []WhenExpression `json:"whenExpressions,omitempty"` +} + // PipelineRunStatusFields holds the fields of PipelineRunStatus' status. // This is defined separately and inlined so that other types can readily // consume these fields via duck typing. @@ -408,10 +427,12 @@ type PipelineRunStatusFields struct { // +optional CompletionTime *metav1.Time `json:"completionTime,omitempty"` + // Deprecated - use ChildReferences instead. // map of PipelineRunTaskRunStatus with the taskRun name as the key // +optional TaskRuns map[string]*PipelineRunTaskRunStatus `json:"taskRuns,omitempty"` + // Deprecated - use ChildReferences instead. // map of PipelineRunRunStatus with the run name as the key // +optional Runs map[string]*PipelineRunRunStatus `json:"runs,omitempty"` @@ -426,6 +447,10 @@ type PipelineRunStatusFields struct { // list of tasks that were skipped due to when expressions evaluating to false // +optional SkippedTasks []SkippedTask `json:"skippedTasks,omitempty"` + + // list of TaskRun and Run names, PipelineTask names, and API versions/kinds for children of this PipelineRun. + // +optional + ChildReferences []ChildStatusReference `json:"childReferences,omitempty"` } // SkippedTask is used to describe the Tasks that were skipped due to their When Expressions @@ -484,6 +509,12 @@ type PipelineRunConditionCheckStatus struct { Status *ConditionCheckStatus `json:"status,omitempty"` } +// PipelineRunChildConditionCheckStatus is used to record the status of condition checks within StatusChildReferences. +type PipelineRunChildConditionCheckStatus struct { + PipelineRunConditionCheckStatus `json:",inline"` + ConditionCheckName string `json:"conditionCheckName,omitempty"` +} + // PipelineRunSpecServiceAccountName can be used to configure specific // ServiceAccountName for a concrete Task type PipelineRunSpecServiceAccountName struct { diff --git a/pkg/apis/pipeline/v1beta1/swagger.json b/pkg/apis/pipeline/v1beta1/swagger.json index c4bedc35f50..9c69b37b327 100644 --- a/pkg/apis/pipeline/v1beta1/swagger.json +++ b/pkg/apis/pipeline/v1beta1/swagger.json @@ -287,6 +287,41 @@ } } }, + "v1beta1.ChildStatusReference": { + "description": "ChildStatusReference is used to point to the statuses of individual TaskRuns and Runs within this PipelineRun.", + "type": "object", + "properties": { + "apiVersion": { + "type": "string" + }, + "conditionChecks": { + "description": "ConditionChecks is the the list of condition checks, including their names and statuses, for the PipelineTask. Deprecated: This field will be removed when conditions are removed for v1.", + "type": "array", + "items": { + "$ref": "#/definitions/v1beta1.PipelineRunChildConditionCheckStatus" + } + }, + "kind": { + "type": "string" + }, + "name": { + "description": "Name is the name of the TaskRun or Run this is referencing.", + "type": "string" + }, + "pipelineTaskName": { + "description": "PipelineTaskName is the name of the PipelineTask this is referencing.", + "type": "string" + }, + "whenExpressions": { + "description": "WhenExpressions is the list of checks guarding the execution of the PipelineTask", + "type": "array", + "items": { + "default": {}, + "$ref": "#/definitions/v1beta1.WhenExpression" + } + } + } + }, "v1beta1.CloudEventDelivery": { "description": "CloudEventDelivery is the target of a cloud event along with the state of delivery.", "type": "object", @@ -846,6 +881,23 @@ } } }, + "v1beta1.PipelineRunChildConditionCheckStatus": { + "description": "PipelineRunChildConditionCheckStatus is used to record the status of condition checks within StatusChildReferences.", + "type": "object", + "properties": { + "conditionCheckName": { + "type": "string" + }, + "conditionName": { + "description": "ConditionName is the name of the Condition", + "type": "string" + }, + "status": { + "description": "Status is the ConditionCheckStatus for the corresponding ConditionCheck", + "$ref": "#/definitions/v1beta1.ConditionCheckStatus" + } + } + }, "v1beta1.PipelineRunConditionCheckStatus": { "description": "PipelineRunConditionCheckStatus returns the condition check status", "type": "object", @@ -1022,6 +1074,14 @@ "default": "" } }, + "childReferences": { + "description": "list of TaskRun and Run names, PipelineTask names, and API versions/kinds for children of this PipelineRun.", + "type": "array", + "items": { + "default": {}, + "$ref": "#/definitions/v1beta1.ChildStatusReference" + } + }, "completionTime": { "description": "CompletionTime is the time the PipelineRun completed.", "$ref": "#/definitions/v1.Time" @@ -1054,7 +1114,7 @@ "$ref": "#/definitions/v1beta1.PipelineSpec" }, "runs": { - "description": "map of PipelineRunRunStatus with the run name as the key", + "description": "Deprecated - use ChildReferences instead. map of PipelineRunRunStatus with the run name as the key", "type": "object", "additionalProperties": { "$ref": "#/definitions/v1beta1.PipelineRunRunStatus" @@ -1073,7 +1133,7 @@ "$ref": "#/definitions/v1.Time" }, "taskRuns": { - "description": "map of PipelineRunTaskRunStatus with the taskRun name as the key", + "description": "Deprecated - use ChildReferences instead. map of PipelineRunTaskRunStatus with the taskRun name as the key", "type": "object", "additionalProperties": { "$ref": "#/definitions/v1beta1.PipelineRunTaskRunStatus" @@ -1085,6 +1145,14 @@ "description": "PipelineRunStatusFields holds the fields of PipelineRunStatus' status. This is defined separately and inlined so that other types can readily consume these fields via duck typing.", "type": "object", "properties": { + "childReferences": { + "description": "list of TaskRun and Run names, PipelineTask names, and API versions/kinds for children of this PipelineRun.", + "type": "array", + "items": { + "default": {}, + "$ref": "#/definitions/v1beta1.ChildStatusReference" + } + }, "completionTime": { "description": "CompletionTime is the time the PipelineRun completed.", "$ref": "#/definitions/v1.Time" @@ -1102,7 +1170,7 @@ "$ref": "#/definitions/v1beta1.PipelineSpec" }, "runs": { - "description": "map of PipelineRunRunStatus with the run name as the key", + "description": "Deprecated - use ChildReferences instead. map of PipelineRunRunStatus with the run name as the key", "type": "object", "additionalProperties": { "$ref": "#/definitions/v1beta1.PipelineRunRunStatus" @@ -1121,7 +1189,7 @@ "$ref": "#/definitions/v1.Time" }, "taskRuns": { - "description": "map of PipelineRunTaskRunStatus with the taskRun name as the key", + "description": "Deprecated - use ChildReferences instead. map of PipelineRunTaskRunStatus with the taskRun name as the key", "type": "object", "additionalProperties": { "$ref": "#/definitions/v1beta1.PipelineRunTaskRunStatus" diff --git a/pkg/apis/pipeline/v1beta1/zz_generated.deepcopy.go b/pkg/apis/pipeline/v1beta1/zz_generated.deepcopy.go index ed83610fdf2..983a234151b 100644 --- a/pkg/apis/pipeline/v1beta1/zz_generated.deepcopy.go +++ b/pkg/apis/pipeline/v1beta1/zz_generated.deepcopy.go @@ -51,6 +51,41 @@ func (in *ArrayOrString) DeepCopy() *ArrayOrString { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ChildStatusReference) DeepCopyInto(out *ChildStatusReference) { + *out = *in + out.TypeMeta = in.TypeMeta + if in.ConditionChecks != nil { + in, out := &in.ConditionChecks, &out.ConditionChecks + *out = make([]*PipelineRunChildConditionCheckStatus, len(*in)) + for i := range *in { + if (*in)[i] != nil { + in, out := &(*in)[i], &(*out)[i] + *out = new(PipelineRunChildConditionCheckStatus) + (*in).DeepCopyInto(*out) + } + } + } + if in.WhenExpressions != nil { + in, out := &in.WhenExpressions, &out.WhenExpressions + *out = make([]WhenExpression, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ChildStatusReference. +func (in *ChildStatusReference) DeepCopy() *ChildStatusReference { + if in == nil { + return nil + } + out := new(ChildStatusReference) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *CloudEventDelivery) DeepCopyInto(out *CloudEventDelivery) { *out = *in @@ -506,6 +541,23 @@ func (in *PipelineRun) DeepCopyObject() runtime.Object { return nil } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *PipelineRunChildConditionCheckStatus) DeepCopyInto(out *PipelineRunChildConditionCheckStatus) { + *out = *in + in.PipelineRunConditionCheckStatus.DeepCopyInto(&out.PipelineRunConditionCheckStatus) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PipelineRunChildConditionCheckStatus. +func (in *PipelineRunChildConditionCheckStatus) DeepCopy() *PipelineRunChildConditionCheckStatus { + if in == nil { + return nil + } + out := new(PipelineRunChildConditionCheckStatus) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *PipelineRunConditionCheckStatus) DeepCopyInto(out *PipelineRunConditionCheckStatus) { *out = *in @@ -770,6 +822,13 @@ func (in *PipelineRunStatusFields) DeepCopyInto(out *PipelineRunStatusFields) { (*in)[i].DeepCopyInto(&(*out)[i]) } } + if in.ChildReferences != nil { + in, out := &in.ChildReferences, &out.ChildReferences + *out = make([]ChildStatusReference, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } return } diff --git a/test/custom_task_test.go b/test/custom_task_test.go index 71d8f026a53..1230d4226e6 100644 --- a/test/custom_task_test.go +++ b/test/custom_task_test.go @@ -49,6 +49,7 @@ const ( var supportedFeatureGates = map[string]string{ "enable-custom-tasks": "true", "enable-api-fields": "alpha", + "embedded-status": "full", } func TestCustomTask(t *testing.T) { diff --git a/test/ignore_test.go.ignore b/test/ignore_test.go.ignore new file mode 100644 index 00000000000..587babe0b31 --- /dev/null +++ b/test/ignore_test.go.ignore @@ -0,0 +1,122 @@ +// +build e2e + +/* + Copyright 2021 The Tekton Authors + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + http://www.apache.org/licenses/LICENSE-2.0 + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +package test + +import ( + "fmt" + "github.com/stretchr/testify/assert" + "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1alpha1" + "github.com/tektoncd/pipeline/test/parse" + corev1 "k8s.io/api/core/v1" + "knative.dev/pkg/apis" + duckv1beta1 "knative.dev/pkg/apis/duck/v1beta1" + "testing" + + "github.com/ghodss/yaml" + "github.com/stretchr/testify/require" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +func TestToYAML(t *testing.T) { + helloworldResource := &v1alpha1.PipelineRun{ + ObjectMeta: metav1.ObjectMeta{Name: "bar"}, + Status: v1alpha1.PipelineRunStatus{Status: duckv1beta1.Status{ + Conditions: []apis.Condition{{Type: apis.ConditionSucceeded, Status: corev1.ConditionTrue}}, + }}, + } + ty, err := yaml.Marshal(helloworldResource) + require.NoError(t, err) + fmt.Printf("yaml:\n%s\n", string(ty)) +} + +func TestCompBetaAlpha(t *testing.T) { + betaObj := parse.MustParsePipeline(t, fmt.Sprintf(` +metadata: + name: bucket-test-pipeline + namespace: %s +spec: + resources: + - name: source-repo + type: git + tasks: + - name: addfile + resources: + inputs: + - name: helloworldgit + resource: source-repo + outputs: + - name: helloworldgit + resource: source-repo + taskRef: + name: %s + - name: runfile + resources: + inputs: + - name: helloworldgit + resource: source-repo + taskRef: + name: %s +`, "namespace", "addFileTaskName", "runFileTaskName")) + + alphaObj := &v1alpha1.Pipeline{ + ObjectMeta: metav1.ObjectMeta{ + Name: bucketTestPipelineName, + }, + Spec: v1alpha1.PipelineSpec{ + Resources: []v1alpha1.PipelineDeclaredResource{{ + Name: "source-repo", + Type: "git", + }}, + Tasks: []v1alpha1.PipelineTask{ + { + TaskRef: &v1alpha1.TaskRef{ + Name: addFileTaskName, + }, + Name: "addfile", + Resources: &v1alpha1.PipelineTaskResources{ + Inputs: []v1alpha1.PipelineTaskInputResource{{ + Name: "helloworldgit", + Resource: "source-repo", + }}, + Outputs: []v1alpha1.PipelineTaskOutputResource{{ + Name: "helloworldgit", + Resource: "source-repo", + }}, + }, + }, + { + TaskRef: &v1alpha1.TaskRef{ + Name: runFileTaskName, + }, + Name: "runfile", + Resources: &v1alpha1.PipelineTaskResources{ + Inputs: []v1alpha1.PipelineTaskInputResource{{ + Name: "helloworldgit", + Resource: "source-repo", + From: []string{"addfile"}, + }}, + }, + }, + }, + }, + } + + by, err := yaml.Marshal(betaObj) + require.NoError(t, err) + ay, err := yaml.Marshal(alphaObj) + require.NoError(t, err) + assert.Equal(t, string(by), string(ay)) +}