Search in sources :

Example 1 with SingularityMesosArtifact

use of com.hubspot.mesos.SingularityMesosArtifact in project Singularity by HubSpot.

the class SingularityMesosTaskBuilder method prepareMesosUriDownloads.

private void prepareMesosUriDownloads(List<SingularityMesosArtifact> extraArtifacts, CommandInfo.Builder commandBldr) {
    for (SingularityMesosArtifact artifact : extraArtifacts) {
        CommandInfo.URI.Builder uriBldr = URI.newBuilder().setValue(artifact.getUri()).setCache(artifact.isCache()).setExecutable(artifact.isExecutable()).setExtract(artifact.isExtract());
        if (artifact.getOutputFile().isPresent()) {
            uriBldr.setOutputFile(artifact.getOutputFile().get());
        }
        commandBldr.addUris(uriBldr.build());
    }
}
Also used : SingularityMesosArtifact(com.hubspot.mesos.SingularityMesosArtifact) URI(org.apache.mesos.v1.Protos.CommandInfo.URI)

Aggregations

SingularityMesosArtifact (com.hubspot.mesos.SingularityMesosArtifact)1 URI (org.apache.mesos.v1.Protos.CommandInfo.URI)1