4.5. Specifying PersistentVolumeClaims as VolumeSource in Workspaces
Workspaces help Tasks share data, and allow you to specify one or more volumes that each Task in the Pipeline requires during execution.
In this section, you will create a PersistentVolumeClaim to provide data storage and bind it to the Workspace. This PersistentVolumeClaim provides the volumes or filesystem required for the Pipeline execution.
Procedure
Copy and save the contents of the following sample PersistentVolumeClaim YAML file:
apiVersion: v1 kind: PersistentVolumeClaim metadata: name: source-pvc spec: accessModes: - ReadWriteOnce resources: requests: storage: 500Mi
Create the PersistentVolumeClaim, specifying the file you just created:
$ oc create -f <PersistentVolumeClaim-yaml-file-name.yaml>
Alternatively, you can execute the YAML file directly from the Git repository:
$ oc create -f https://raw.githubusercontent.com/openshift/pipelines-tutorial/release-tech-preview-2/01_pipeline/03_persistent_volume_claim.yaml