diff --git a/docs/workspaces.md b/docs/workspaces.md index f608a187de9..d0ffb369a2b 100644 --- a/docs/workspaces.md +++ b/docs/workspaces.md @@ -256,8 +256,7 @@ Using parallel `Tasks` in a `Pipeline` will work with `PersistentVolumeClaims` c [access mode](https://kubernetes.io/docs/concepts/storage/persistent-volumes/#access-modes) `ReadWriteMany` or `ReadOnlyMany` but you must ensure that those are available for your storage class. When using `PersistentVolumeClaims` with access mode `ReadWriteOnce` for parallel `Tasks`, you can configure a -workspace with it's own `PersistentVolumeClaim` for each parallel `Task`. See a full example of a -[Pipeline with parallel tasks using PersistentVolumeClaims](../examples/v1beta1/pipelineruns/pipelinerun-with-parallel-tasks-using-pvc.yaml). +workspace with it's own `PersistentVolumeClaim` for each parallel `Task`. Use the `runAfter` field in your `Pipeline` definition to define when a `Task` should be executed. For more information, see the [`runAfter` documentation](pipelines.md#runAfter). diff --git a/examples/v1beta1/pipelineruns/pipelinerun-with-parallel-tasks-using-pvc.yaml b/examples/v1beta1/pipelineruns/pipelinerun-with-parallel-tasks-using-pvc.yaml deleted file mode 100644 index bf778d66e82..00000000000 --- a/examples/v1beta1/pipelineruns/pipelinerun-with-parallel-tasks-using-pvc.yaml +++ /dev/null @@ -1,85 +0,0 @@ -apiVersion: tekton.dev/v1beta1 -kind: Task -metadata: - name: write-to-file -spec: - steps: - - name: write - image: ubuntu - script: echo bar > $(workspaces.task-ws.path)/foo - workspaces: - - name: task-ws ---- -apiVersion: tekton.dev/v1beta1 -kind: Task -metadata: - name: read-two -spec: - workspaces: - - name: ws-a - - name: ws-b - steps: - - name: read-1 - image: ubuntu - script: cat $(workspaces.ws-a.path)/foo | grep bar - - name: read-2 - image: ubuntu - script: cat $(workspaces.ws-b.path)/foo | grep bar ---- -apiVersion: tekton.dev/v1beta1 -kind: Pipeline -metadata: - name: pipeline-using-parallel-tasks -spec: - workspaces: - - name: ws-track-a - - name: ws-track-b - tasks: - - name: parallel-writer-a - taskRef: - name: write-to-file - workspaces: - - name: task-ws - workspace: ws-track-a - - name: parallel-writer-b - taskRef: - name: write-to-file - workspaces: - - name: task-ws - workspace: ws-track-b - - name: read-all - runAfter: - - parallel-writer-a - - parallel-writer-b - taskRef: - name: read-two - workspaces: - - name: ws-a - workspace: ws-track-a - - name: ws-b - workspace: ws-track-b ---- -apiVersion: tekton.dev/v1beta1 -kind: PipelineRun -metadata: - generateName: pr- -spec: - pipelineRef: - name: pipeline-using-parallel-tasks - workspaces: - - name: ws-track-a - volumeClaimTemplate: - spec: - accessModes: - - ReadWriteOnce - resources: - requests: - storage: 1Gi - - name: ws-track-b - volumeClaimTemplate: - spec: - accessModes: - - ReadWriteOnce - resources: - requests: - storage: 1Gi