Example #1
0
func (src *containerSource) VolumeOn(w worker.Worker) (baggageclaim.Volume, bool, error) {
	if baggageclaimClient, found := w.VolumeManager(); len(src.volumeHandle) > 0 && found {
		volume, found, err := baggageclaimClient.LookupVolume(src.logger, src.volumeHandle)
		if err != nil {
			return nil, false, err
		}
		return volume, found, nil
	}
	return nil, false, nil
}
Example #2
0
File: get_step.go Project: ACPK/atc
// VolumeOn locates the cache for the GetStep's resource and version on the
// given worker.
func (step *GetStep) VolumeOn(worker worker.Worker) (baggageclaim.Volume, bool, error) {
	vm, hasVM := worker.VolumeManager()
	if !hasVM {
		return nil, false, nil
	}

	return step.cacheIdentifier.FindOn(step.logger.Session("volume-on"), vm)
}