Skip to content
Crow CI
Codeberg

Volumes

Volume mounts can be defined in the YAML config file. This can be used to mount files or directories on the host machine (or Persistent Volumes in Kubernetes) into pipeline containers.

steps:
- name: build
[...]
volumes:
- /etc/ssl/certs:/etc/ssl/certs

For the docker backend, volumes are mounted to the host machine. This requires the use of absolute paths when configuring volumes. Attempting to use relative paths will result in an error.

To mount volumes in Kubernetes, PersistentVolumeClaim (PVC) is which can be referenced in steps via the volumes option.

There is no support for dynamic provisioning of PersistentVolumes in Kubernetes. Persistent volumes, which are referenced from the PVCs, must be created manually/statically.

Assuming a PVC named “cache” exists, it can be referenced as follows:

In a plugin,

steps:
- name: "step name"
image: <image>
volumes:
- cache:/mnt/cache
[...]