Created
August 9, 2018 17:16
-
-
Save ArturSkowronski/c9c32540b972fa5063b2f491d962b763 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 BuildImageStep | |
implements AsyncStep<AsyncStep<Image<CachedLayer>>>, Callable<AsyncStep<Image<CachedLayer>>> { | |
/*(...)*/ | |
private Image<CachedLayer> afterCachedLayersSteps() | |
throws ExecutionException, LayerPropertyNotFoundException { | |
try (Timer ignored = new Timer(buildConfiguration.getBuildLogger(), DESCRIPTION)) { | |
// Constructs the image. | |
Image.Builder<CachedLayer> imageBuilder = Image.builder(); | |
for (PullAndCacheBaseImageLayerStep pullAndCacheBaseImageLayerStep : | |
NonBlockingSteps.get(pullAndCacheBaseImageLayersStep)) { | |
imageBuilder.addLayer(NonBlockingSteps.get(pullAndCacheBaseImageLayerStep)); | |
} | |
for (BuildAndCacheApplicationLayerStep buildAndCacheApplicationLayerStep : | |
buildAndCacheApplicationLayerSteps) { | |
imageBuilder.addLayer(NonBlockingSteps.get(buildAndCacheApplicationLayerStep)); | |
} | |
imageBuilder.setCreated(buildConfiguration.getCreationTime()); | |
imageBuilder.setEnvironment(buildConfiguration.getEnvironment()); | |
imageBuilder.setEntrypoint(entrypoint); | |
imageBuilder.setJavaArguments(buildConfiguration.getJavaArguments()); | |
imageBuilder.setExposedPorts(buildConfiguration.getExposedPorts()); | |
// Gets the container configuration content descriptor. | |
return imageBuilder.build(); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment