You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/migrating-v1alpha1-to-v1beta1.md
+1-136Lines changed: 1 addition & 136 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -74,142 +74,7 @@ spec:
74
74
```
75
75
76
76
## Replacing `PipelineResources` with `Tasks`
77
-
78
-
`PipelineResources`remained in alpha while the other resource kinds were promoted to beta.
79
-
Since then, **`PipelineResources` have been deprecated**. We encourage users to use `Tasks` and other replacement
80
-
features instead of `PipelineResources`. Read more about the deprecation in [TEP-0074](https://github.com/tektoncd/community/blob/main/teps/0074-deprecate-pipelineresources.md).
81
-
82
-
_More on the reasoning and what's left to do in
83
-
[Why aren't PipelineResources in Beta?](resources.md#why-aren-t-pipelineresources-in-beta)._
84
-
85
-
To ease migration away from `PipelineResources`
86
-
[some types have an equivalent `Task` in the Catalog](#replacing-pipelineresources-with-tasks).
87
-
To use these replacement `Tasks` you will need to combine them with your existing `Tasks` via a `Pipeline`.
88
-
89
-
For example, if you were using this `Task` which was fetching from `git` and building with
To do the same thing with the `git` catalog `Task` and the kaniko `Task` you will need to combine them in a
129
-
`Pipeline`.
130
-
131
-
For example this Pipeline uses the Kaniko and `git` catalog Tasks:
132
-
133
-
```yaml
134
-
apiVersion: tekton.dev/v1beta1
135
-
kind: Pipeline
136
-
metadata:
137
-
name: kaniko-pipeline
138
-
spec:
139
-
params:
140
-
- name: git-url
141
-
- name: git-revision
142
-
- name: image-name
143
-
- name: path-to-image-context
144
-
- name: path-to-dockerfile
145
-
workspaces:
146
-
- name: git-source
147
-
tasks:
148
-
- name: fetch-from-git
149
-
taskRef:
150
-
name: git-clone
151
-
params:
152
-
- name: url
153
-
value: $(params.git-url)
154
-
- name: revision
155
-
value: $(params.git-revision)
156
-
workspaces:
157
-
- name: output
158
-
workspace: git-source
159
-
- name: build-image
160
-
taskRef:
161
-
name: kaniko
162
-
params:
163
-
- name: IMAGE
164
-
value: $(params.image-name)
165
-
- name: CONTEXT
166
-
value: $(params.path-to-image-context)
167
-
- name: DOCKERFILE
168
-
value: $(params.path-to-dockerfile)
169
-
workspaces:
170
-
- name: source
171
-
workspace: git-source
172
-
# If you want you can add a Task that uses the IMAGE_DIGEST from the kaniko task
173
-
# via $(tasks.build-image.results.IMAGE_DIGEST) - this was a feature we hadn't been
174
-
# able to fully deliver with the Image PipelineResource!
175
-
```
176
-
177
-
_Note that [the `image` `PipelineResource` is gone in this example](#replacing-an-image-resource) (replaced with
178
-
a [`result`](tasks.md#emitting-results)), and also that now the `Task` doesn't need to know anything
179
-
about where the files come from that it builds from._
180
-
181
-
### Replacing a `git` resource
182
-
183
-
You can replace a `git` resource with the [`git-clone` Catalog `Task`](https://github.com/tektoncd/catalog/tree/main/task/git-clone).
184
-
185
-
### Replacing a `pullrequest` resource
186
-
187
-
You can replace a `pullrequest` resource with the [`pullrequest` Catalog `Task`](https://github.com/tektoncd/catalog/tree/main/task/pull-request).
188
-
189
-
### Replacing a `gcs` resource
190
-
191
-
You can replace a `gcs` resource with the [`gcs` Catalog `Task`](https://github.com/tektoncd/catalog/tree/main/task/gcs-generic).
192
-
193
-
### Replacing an `image` resource
194
-
195
-
Since the `image` resource is simply a way to share the digest of a built image with subsequent
196
-
`Tasks`in your `Pipeline`, you can use [`Task` results](tasks.md#emitting-results) to
197
-
achieve equivalent functionality.
198
-
199
-
For examples of replacing an `image` resource, see the following Catalog `Tasks`:
200
-
201
-
- The [Kaniko Catalog `Task`](https://github.com/tektoncd/catalog/blob/v1beta1/kaniko/)
202
-
illustrates how to write the digest of an image to a result.
203
-
- The [Buildah Catalog `Task`](https://github.com/tektoncd/catalog/blob/v1beta1/buildah/)
204
-
illustrates how to accept an image digest as a parameter.
205
-
206
-
### Replacing a `cluster` resource
207
-
208
-
You can replace a `cluster` resource with the [`kubeconfig-creator` Catalog `Task`](https://github.com/tektoncd/catalog/tree/main/task/kubeconfig-creator).
209
-
210
-
### Replacing a `cloudEvent` resource
211
-
212
-
You can replace a `cloudEvent` resource with the [`CloudEvent` Catalog `Task`](https://github.com/tektoncd/catalog/tree/main/task/cloudevent).
77
+
You can replace the `PipelineResources` with `Tasks` following the [reference](https://github.com/tektoncd/pipeline/blob/main/docs/pipelineresources.md)
`PipelineResources` remained in alpha while the other resource kinds were promoted to beta.
4
+
Since then, **`PipelineResources` have been deprecated**. We encourage users to use `Tasks` and other replacement
5
+
features instead of `PipelineResources`. Read more about the deprecation in [TEP-0074](https://github.com/tektoncd/community/blob/main/teps/0074-deprecate-pipelineresources.md).
6
+
7
+
_More on the reasoning and what's left to do in
8
+
[Why aren't PipelineResources in Beta?](resources.md#why-aren-t-pipelineresources-in-beta)._
9
+
10
+
To ease migration away from `PipelineResources`
11
+
[some types have an equivalent `Task` in the Catalog](#replacing-pipelineresources-with-tasks).
12
+
To use these replacement `Tasks` you will need to combine them with your existing `Tasks` via a `Pipeline`.
13
+
14
+
For example, if you were using this `Task` which was fetching from `git` and building with
To do the same thing with the `git` catalog `Task` and the kaniko `Task` you will need to combine them in a
54
+
`Pipeline`.
55
+
56
+
For example this Pipeline uses the Kaniko and `git` catalog Tasks:
57
+
58
+
```yaml
59
+
apiVersion: tekton.dev/v1beta1
60
+
kind: Pipeline
61
+
metadata:
62
+
name: kaniko-pipeline
63
+
spec:
64
+
params:
65
+
- name: git-url
66
+
- name: git-revision
67
+
- name: image-name
68
+
- name: path-to-image-context
69
+
- name: path-to-dockerfile
70
+
workspaces:
71
+
- name: git-source
72
+
tasks:
73
+
- name: fetch-from-git
74
+
taskRef:
75
+
name: git-clone
76
+
params:
77
+
- name: url
78
+
value: $(params.git-url)
79
+
- name: revision
80
+
value: $(params.git-revision)
81
+
workspaces:
82
+
- name: output
83
+
workspace: git-source
84
+
- name: build-image
85
+
taskRef:
86
+
name: kaniko
87
+
params:
88
+
- name: IMAGE
89
+
value: $(params.image-name)
90
+
- name: CONTEXT
91
+
value: $(params.path-to-image-context)
92
+
- name: DOCKERFILE
93
+
value: $(params.path-to-dockerfile)
94
+
workspaces:
95
+
- name: source
96
+
workspace: git-source
97
+
# If you want you can add a Task that uses the IMAGE_DIGEST from the kaniko task
98
+
# via $(tasks.build-image.results.IMAGE_DIGEST) - this was a feature we hadn't been
99
+
# able to fully deliver with the Image PipelineResource!
100
+
```
101
+
102
+
_Note that [the `image` `PipelineResource` is gone in this example](#replacing-an-image-resource) (replaced with
103
+
a [`result`](tasks.md#emitting-results)), and also that now the `Task` doesn't need to know anything
104
+
about where the files come from that it builds from._
105
+
106
+
### Replacing a `git` resource
107
+
108
+
You can replace a `git` resource with the [`git-clone` Catalog `Task`](https://github.com/tektoncd/catalog/tree/main/task/git-clone).
109
+
110
+
### Replacing a `pullrequest` resource
111
+
112
+
You can replace a `pullrequest` resource with the [`pullrequest` Catalog `Task`](https://github.com/tektoncd/catalog/tree/main/task/pull-request).
113
+
114
+
### Replacing a `gcs` resource
115
+
116
+
You can replace a `gcs` resource with the [`gcs` Catalog `Task`](https://github.com/tektoncd/catalog/tree/main/task/gcs-generic).
117
+
118
+
### Replacing an `image` resource
119
+
120
+
Since the `image` resource is simply a way to share the digest of a built image with subsequent
121
+
`Tasks`in your `Pipeline`, you can use [`Task` results](tasks.md#emitting-results) to
122
+
achieve equivalent functionality.
123
+
124
+
For examples of replacing an `image` resource, see the following Catalog `Tasks`:
125
+
126
+
- The [Kaniko Catalog `Task`](https://github.com/tektoncd/catalog/blob/v1beta1/kaniko/)
127
+
illustrates how to write the digest of an image to a result.
128
+
- The [Buildah Catalog `Task`](https://github.com/tektoncd/catalog/blob/v1beta1/buildah/)
129
+
illustrates how to accept an image digest as a parameter.
130
+
131
+
### Replacing a `cluster` resource
132
+
133
+
You can replace a `cluster` resource with the [`kubeconfig-creator` Catalog `Task`](https://github.com/tektoncd/catalog/tree/main/task/kubeconfig-creator).
134
+
135
+
### Replacing a `cloudEvent` resource
136
+
137
+
You can replace a `cloudEvent` resource with the [`CloudEvent` Catalog `Task`](https://github.com/tektoncd/catalog/tree/main/task/cloudevent).
0 commit comments