Skip to content

Commit

Permalink
Add example pipeline with pipelineRun using volumeClaimTemplate
Browse files Browse the repository at this point in the history
  • Loading branch information
jlpettersson committed Apr 9, 2020
1 parent 9848761 commit 04b877c
Showing 1 changed file with 51 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
apiVersion: tekton.dev/v1beta1
kind: Pipeline
metadata:
name: volume-from-template
spec:
tasks:
- name: writer
taskSpec:
steps:
- name: write
image: ubuntu
script: echo bar > $(workspaces.task-ws.path)/foo
workspaces:
- name: task-ws
workspaces:
- name: task-ws
workspace: ws
- name: reader
runAfter:
- writer
taskSpec:
steps:
- name: read
image: ubuntu
script: cat $(workspaces.myws.path)/foo | grep bar
workspaces:
- name: myws
workspaces:
- name: myws
workspace: ws
workspaces:
- name: ws
---
apiVersion: tekton.dev/v1beta1
kind: PipelineRun
metadata:
generateName: run-with-template-
spec:
pipelineRef:
name: volume-from-template
workspaces:
- name: ws
volumeClaimTemplate:
metadata:
name: mypvc
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 1Gi

0 comments on commit 04b877c

Please sign in to comment.