Created
August 9, 2018 16:58
-
-
Save ArturSkowronski/2a06e56bf83b1723a9406ef68e7ff42e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class BuildAndCacheApplicationLayerStep | |
implements AsyncStep<CachedLayerWithMetadata>, Callable<CachedLayerWithMetadata> { | |
/*(...)*/ | |
@Override | |
public CachedLayerWithMetadata call() throws IOException, CacheMetadataCorruptedException { | |
/*(...)*/ | |
CachedLayerWithMetadata cachedLayer = | |
new CacheReader(cache) | |
.getUpToDateLayerByLayerEntries(layerConfiguration.getLayerEntries()); | |
if (cachedLayer != null) { | |
return cachedLayer; | |
} | |
ReproducibleLayerBuilder reproducibleLayerBuilder = new ReproducibleLayerBuilder(); | |
for (LayerEntry layerEntry : layerConfiguration.getLayerEntries()) { | |
reproducibleLayerBuilder.addFiles( | |
layerEntry.getSourceFiles(), layerEntry.getExtractionPath()); | |
} | |
cachedLayer = new CacheWriter(cache).writeLayer(reproducibleLayerBuilder); | |
/*(...)*/ | |
return cachedLayer; | |
} | |
} | |
/*(...)*/ | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment