diff --git a/pkg/worker/lifecycle.go b/pkg/worker/lifecycle.go index 4099212eb..1b500c182 100644 --- a/pkg/worker/lifecycle.go +++ b/pkg/worker/lifecycle.go @@ -367,7 +367,7 @@ func (s *Worker) specFromRequest(request *types.ContainerRequest, options *Conta } // If volume caching is enabled, set it up and add proper mounts to spec - if s.fileCacheManager.CacheAvailable() && request.Workspace.VolumeCacheEnabled { + if s.fileCacheManager.CacheAvailable() && request.Workspace.VolumeCacheEnabled && !request.IsBuildRequest() { err = s.fileCacheManager.EnableVolumeCaching(request.Workspace.Name, volumeCacheMap, spec) if err != nil { log.Error().Str("container_id", request.ContainerId).Msgf("failed to setup volume caching: %v", err)