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
A Pipeline in Tekton defined an ordered series of Tasks. A valid Pipeline declaration
206
-
must include a reference to at last one `Task`, The `Pipeline Tasks` in a Pipeline can be connected and run as a Directed Acyclic Graph(DAG), each of the Pipeline Tasks is a node, which can be connected with:
205
+
A Pipeline in Tekton defined an ordered series of Tasks. Users can specify whether
206
+
the output of a `Task` is used as an input for the next `Task` using `from` property on `PipelineResources`
207
207
208
-
- `runAfter`clauses on the `Pipeline Tasks`.
209
-
- `from`clauses on the `PipelineResources` needed by a `Task`.
210
-
211
-
The following example `Pipeline` spec comes from [Tekton's Pipeline tutorial](https://github.com/tektoncd/pipeline/blob/master/docs/pipelines.md):
208
+
As the following example comes from [Tekton's tutorial](https://github.com/tektoncd/pipeline/blob/master/docs/tutorial.md#creating-and-running-a-pipeline)
212
209
213
210
``` yaml
214
-
- name: lint-repo
215
-
taskRef:
216
-
name: pylint
217
-
resources:
218
-
inputs:
219
-
- name: workspace
220
-
resource: my-repo
221
-
- name: test-app
222
-
taskRef:
223
-
name: make-test
224
-
resources:
225
-
inputs:
226
-
- name: workspace
227
-
resource: my-repo
228
-
- name: build-app
229
-
taskRef:
230
-
name: kaniko-build-app
231
-
runAfter:
232
-
- test-app
233
-
resources:
234
-
inputs:
235
-
- name: workspace
236
-
resource: my-repo
237
-
outputs:
238
-
- name: image
239
-
resource: my-app-image
240
-
- name: build-frontend
241
-
taskRef:
242
-
name: kaniko-build-frontend
243
-
runAfter:
244
-
- test-app
245
-
resources:
246
-
inputs:
247
-
- name: workspace
248
-
resource: my-repo
249
-
outputs:
250
-
- name: image
251
-
resource: my-frontend-image
252
-
- name: deploy-all
253
-
taskRef:
254
-
name: deploy-kubectl
211
+
apiVersion: tekton.dev/v1beta1
212
+
kind: Pipeline
213
+
metadata:
214
+
name: tutorial-pipeline
215
+
spec:
255
216
resources:
256
-
inputs:
257
-
- name: my-app-image
258
-
resource: my-app-image
259
-
from:
260
-
- build-app
261
-
- name: my-frontend-image
262
-
resource: my-frontend-image
263
-
from:
264
-
- build-frontend
265
-
```
266
-
267
-
This will result the following execution graph:
268
-
269
-
``` text
270
-
| |
271
-
v v
272
-
test-app lint-repo
273
-
/ \
274
-
v v
275
-
build-app build-frontend
276
-
\ /
277
-
v v
278
-
deploy-all
217
+
- name: source-repo
218
+
type: git
219
+
- name: web-image
220
+
type: image
221
+
tasks:
222
+
- name: build-skaffold-web
223
+
taskRef:
224
+
name: build-docker-image-from-git-source
225
+
params:
226
+
- name: pathToDockerFile
227
+
value: Dockerfile
228
+
- name: pathToContext
229
+
value: /workspace/docker-source/examples/microservices/leeroy-web #configure: may change according to your source
230
+
resources:
231
+
inputs:
232
+
- name: docker-source
233
+
resource: source-repo
234
+
outputs:
235
+
- name: builtImage
236
+
resource: web-image
237
+
- name: deploy-web
238
+
taskRef:
239
+
name: deploy-using-kubectl
240
+
resources:
241
+
inputs:
242
+
- name: source
243
+
resource: source-repo
244
+
- name: image
245
+
resource: web-image
246
+
from:
247
+
- build-skaffold-web
248
+
params:
249
+
- name: path
250
+
value: /workspace/source/examples/microservices/leeroy-web/kubernetes/deployment.yaml #configure: may change according to your source
251
+
- name: yamlPathToImage
252
+
value: "spec.template.spec.containers[0].image"
279
253
```
280
254
281
-
In Python, a function is like a node of the DAG, which connected by the input
282
-
and of output of the functions.
283
-
284
-
We hope Fluid users can write the following program to express a DAG with `fluid.pipeline` as the following code:
255
+
We hope Fluid users can write the following program to express the above YAML file:
0 commit comments