Example usage for com.amazonaws.services.ecs.model HostVolumeProperties setSourcePath

List of usage examples for com.amazonaws.services.ecs.model HostVolumeProperties setSourcePath

Introduction

In this page you can find the example usage for com.amazonaws.services.ecs.model HostVolumeProperties setSourcePath.

Prototype


public void setSourcePath(String sourcePath) 

Source Link

Document

When the host parameter is used, specify a sourcePath to declare the path on the host container instance that is presented to the container.

Usage

From source file:com.cloudbees.jenkins.plugins.amazonecs.ECSTaskTemplate.java

License:Open Source License

private Collection<Volume> getVolumeEntries() {
    if (null == mountPoints || mountPoints.isEmpty())
        return null;
    Collection<Volume> vols = new ArrayList<Volume>();
    for (MountPointEntry mount : mountPoints) {
        String name = mount.name;
        String sourcePath = mount.sourcePath;
        HostVolumeProperties hostVolume = new HostVolumeProperties();
        if (StringUtils.isEmpty(name))
            continue;
        if (!StringUtils.isEmpty(sourcePath))
            hostVolume.setSourcePath(sourcePath);
        vols.add(new Volume().withName(name).withHost(hostVolume));
    }//from   w w w  . j a v  a2  s. c  o m
    return vols;
}