Search in sources :

Example 6 with LayerObject

use of com.google.cloud.tools.jib.api.buildplan.LayerObject in project jib-extensions by GoogleContainerTools.

the class JibSpringBootExtensionTest method testFilterOutDevtools_differentDependencyLayerName.

@Test
public void testFilterOutDevtools_differentDependencyLayerName() {
    FileEntriesLayer layer = buildLayer("NOT dependencies", Paths.get("lib").resolve("spring-boot-devtools-1.2.3.jar"), Paths.get("archive").resolve("bar.zip"));
    LayerObject newLayer = JibSpringBootExtension.filterOutDevtools(layer);
    assertSame(layer, newLayer);
    assertEquals(layer.getEntries(), ((FileEntriesLayer) newLayer).getEntries());
}
Also used : LayerObject(com.google.cloud.tools.jib.api.buildplan.LayerObject) FileEntriesLayer(com.google.cloud.tools.jib.api.buildplan.FileEntriesLayer) Test(org.junit.Test)

Aggregations

FileEntriesLayer (com.google.cloud.tools.jib.api.buildplan.FileEntriesLayer)6 LayerObject (com.google.cloud.tools.jib.api.buildplan.LayerObject)6 JavaContainerBuilder (com.google.cloud.tools.jib.api.JavaContainerBuilder)4 JibPluginExtensionException (com.google.cloud.tools.jib.plugins.extension.JibPluginExtensionException)4 VisibleForTesting (com.google.common.annotations.VisibleForTesting)4 List (java.util.List)3 Map (java.util.Map)3 Optional (java.util.Optional)3 Collectors (java.util.stream.Collectors)3 Containerizer (com.google.cloud.tools.jib.api.Containerizer)2 Credential (com.google.cloud.tools.jib.api.Credential)2 DockerDaemonImage (com.google.cloud.tools.jib.api.DockerDaemonImage)2 ImageReference (com.google.cloud.tools.jib.api.ImageReference)2 InvalidImageReferenceException (com.google.cloud.tools.jib.api.InvalidImageReferenceException)2 LayerType (com.google.cloud.tools.jib.api.JavaContainerBuilder.LayerType)2 Jib (com.google.cloud.tools.jib.api.Jib)2 JibContainerBuilder (com.google.cloud.tools.jib.api.JibContainerBuilder)2 LogEvent (com.google.cloud.tools.jib.api.LogEvent)2 Ports (com.google.cloud.tools.jib.api.Ports)2 RegistryImage (com.google.cloud.tools.jib.api.RegistryImage)2