Skip to content

Commit 75c0d8d

Browse files
committed
Remove v1alpha1 Pipeline, PipelineRun, Task, TaskRun, and ClusterTask
Closes #4982 This removes the long deprecated pipeline v1alpha1 APIs for everything that's replicated in v1beta1. Signed-off-by: Andrew Bayer <[email protected]>
1 parent b12907f commit 75c0d8d

File tree

212 files changed

+174
-23789
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

212 files changed

+174
-23789
lines changed

cmd/webhook/main.go

Lines changed: 3 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,9 @@ import (
2323
"os"
2424

2525
defaultconfig "github.com/tektoncd/pipeline/pkg/apis/config"
26-
"github.com/tektoncd/pipeline/pkg/apis/pipeline"
2726
"github.com/tektoncd/pipeline/pkg/apis/pipeline/v1alpha1"
2827
"github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1"
28+
resourcev1alpha1 "github.com/tektoncd/pipeline/pkg/apis/resource/v1alpha1"
2929
"k8s.io/apimachinery/pkg/runtime/schema"
3030
"knative.dev/pkg/configmap"
3131
"knative.dev/pkg/controller"
@@ -46,12 +46,7 @@ import (
4646

4747
var types = map[schema.GroupVersionKind]resourcesemantics.GenericCRD{
4848
// v1alpha1
49-
v1alpha1.SchemeGroupVersion.WithKind("Pipeline"): &v1alpha1.Pipeline{},
50-
v1alpha1.SchemeGroupVersion.WithKind("Task"): &v1alpha1.Task{},
51-
v1alpha1.SchemeGroupVersion.WithKind("ClusterTask"): &v1alpha1.ClusterTask{},
52-
v1alpha1.SchemeGroupVersion.WithKind("TaskRun"): &v1alpha1.TaskRun{},
53-
v1alpha1.SchemeGroupVersion.WithKind("PipelineRun"): &v1alpha1.PipelineRun{},
54-
v1alpha1.SchemeGroupVersion.WithKind("PipelineResource"): &v1alpha1.PipelineResource{},
49+
v1alpha1.SchemeGroupVersion.WithKind("PipelineResource"): &resourcev1alpha1.PipelineResource{},
5550
v1alpha1.SchemeGroupVersion.WithKind("Run"): &v1alpha1.Run{},
5651
// v1beta1
5752
v1beta1.SchemeGroupVersion.WithKind("Pipeline"): &v1beta1.Pipeline{},
@@ -131,59 +126,12 @@ func newConfigValidationController(ctx context.Context, cmw configmap.Watcher) *
131126
}
132127

133128
func newConversionController(ctx context.Context, cmw configmap.Watcher) *controller.Impl {
134-
// nolint: revive
135-
var (
136-
v1alpha1GroupVersion = v1alpha1.SchemeGroupVersion.Version
137-
v1beta1GroupVersion = v1beta1.SchemeGroupVersion.Version
138-
)
139-
140129
return conversion.NewConversionController(ctx,
141130
// The path on which to serve the webhook
142131
"/resource-conversion",
143132

144133
// Specify the types of custom resource definitions that should be converted
145-
map[schema.GroupKind]conversion.GroupKindConversion{
146-
v1beta1.Kind("Task"): {
147-
DefinitionName: pipeline.TaskResource.String(),
148-
HubVersion: v1alpha1GroupVersion,
149-
Zygotes: map[string]conversion.ConvertibleObject{
150-
v1alpha1GroupVersion: &v1alpha1.Task{},
151-
v1beta1GroupVersion: &v1beta1.Task{},
152-
},
153-
},
154-
v1beta1.Kind("ClusterTask"): {
155-
DefinitionName: pipeline.ClusterTaskResource.String(),
156-
HubVersion: v1alpha1GroupVersion,
157-
Zygotes: map[string]conversion.ConvertibleObject{
158-
v1alpha1GroupVersion: &v1alpha1.ClusterTask{},
159-
v1beta1GroupVersion: &v1beta1.ClusterTask{},
160-
},
161-
},
162-
v1beta1.Kind("TaskRun"): {
163-
DefinitionName: pipeline.TaskRunResource.String(),
164-
HubVersion: v1alpha1GroupVersion,
165-
Zygotes: map[string]conversion.ConvertibleObject{
166-
v1alpha1GroupVersion: &v1alpha1.TaskRun{},
167-
v1beta1GroupVersion: &v1beta1.TaskRun{},
168-
},
169-
},
170-
v1beta1.Kind("Pipeline"): {
171-
DefinitionName: pipeline.PipelineResource.String(),
172-
HubVersion: v1alpha1GroupVersion,
173-
Zygotes: map[string]conversion.ConvertibleObject{
174-
v1alpha1GroupVersion: &v1alpha1.Pipeline{},
175-
v1beta1GroupVersion: &v1beta1.Pipeline{},
176-
},
177-
},
178-
v1beta1.Kind("PipelineRun"): {
179-
DefinitionName: pipeline.PipelineRunResource.String(),
180-
HubVersion: v1alpha1GroupVersion,
181-
Zygotes: map[string]conversion.ConvertibleObject{
182-
v1alpha1GroupVersion: &v1alpha1.PipelineRun{},
183-
v1beta1GroupVersion: &v1beta1.PipelineRun{},
184-
},
185-
},
186-
},
134+
map[schema.GroupKind]conversion.GroupKindConversion{},
187135

188136
// A function that infuses the context passed to ConvertTo/ConvertFrom/SetDefaults with custom metadata
189137
func(ctx context.Context) context.Context {

docs/developers/README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -262,7 +262,7 @@ Tasks can define results by adding a result on the task spec. This is an
262262
example:
263263

264264
```yaml
265-
apiVersion: tekton.dev/v1alpha1
265+
apiVersion: tekton.dev/v1beta1
266266
kind: Task
267267
metadata:
268268
name: print-date
@@ -290,7 +290,7 @@ A user can defined more than one result for a single task.
290290
For this task definition,
291291

292292
```yaml
293-
apiVersion: tekton.dev/v1alpha1
293+
apiVersion: tekton.dev/v1beta1
294294
kind: Task
295295
metadata:
296296
name: print-date
@@ -319,7 +319,7 @@ spec:
319319
you end up with this task run status:
320320

321321
```yaml
322-
apiVersion: tekton.dev/v1alpha1
322+
apiVersion: tekton.dev/v1beta1
323323
kind: TaskRun
324324
# ...
325325
status:
@@ -357,7 +357,7 @@ result in a pipeline by using the syntax
357357
result at the location of the variable.
358358

359359
```yaml
360-
apiVersion: tekton.dev/v1alpha1
360+
apiVersion: tekton.dev/v1beta1
361361
kind: Pipeline
362362
metadata:
363363
name: sum-and-multiply-pipeline

docs/taskruns.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -626,7 +626,7 @@ in order to stop `TaskRun` step containers from running.
626626
Example of cancelling a `TaskRun`:
627627

628628
```yaml
629-
apiVersion: tekton.dev/v1alpha1
629+
apiVersion: tekton.dev/v1beta1
630630
kind: TaskRun
631631
metadata:
632632
name: go-example-git

docs/tekton-bundle-contracts.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ Each layer must contain all of the following annotations:
2424
- `dev.tekton.image.name` => `ObjectMeta.Name` of the resource
2525
- `dev.tekton.image.kind` => `TypeMeta.Kind` of the resource, all lower-cased and singular (eg, `task`)
2626
- `dev.tekton.image.apiVersion` => `TypeMeta.APIVersion` of the resource (eg
27-
"tekton.dev/v1alpha1")
27+
"tekton.dev/v1beta1")
2828

2929
The union of the { `dev.tekton.image.apiVersion`, `dev.tekton.image.kind`, `dev.tekton.image.name` }
3030
annotations on a given layer must be unique among all layers of that image. In practical terms, this means no two

examples/v1alpha1/pipelineruns/clustertask-pipelinerun.yaml

Lines changed: 0 additions & 30 deletions
This file was deleted.

examples/v1alpha1/pipelineruns/no-ci/.keep

Whitespace-only changes.

examples/v1alpha1/pipelineruns/no-ci/limitrange.yaml

Lines changed: 0 additions & 56 deletions
This file was deleted.

examples/v1alpha1/pipelineruns/no-ci/pipeline-timeout.yaml

Lines changed: 0 additions & 56 deletions
This file was deleted.

examples/v1alpha1/pipelineruns/output-pipelinerun.yaml

Lines changed: 0 additions & 105 deletions
This file was deleted.

0 commit comments

Comments
 (0)