From 1d8169b58996e92c0d4f0ae4939185ff1d9809f9 Mon Sep 17 00:00:00 2001 From: Ozzy Osborne Date: Thu, 15 Aug 2024 13:07:22 -0400 Subject: [PATCH] Various updates =) (#80) * Clear entrypoint when setting command If a builder image has an entrypoint (say via inheritance from it's base builder image) then in order for the snowdrop buildpack lib to function correctly, we must wipe the entrypoint when setting the command, else we'll invoke the wrong thing. * Logging updates & DockerConfig fix. Updates log messages to be less verbose by default, moving some info messages to debug, and adding a few info messages to give overall information on progress Updates pullTimeout & pullRetryIncrease getters to have correct names of pullTimeoutSeconds and pullRetryIncreaseSeconds. The old names were breaking the generated builder leading to incorrect behavior. --- .../snowdrop/buildpack/BuildpackBuild.java | 14 ++++++++-- .../buildpack/config/DockerConfig.java | 4 +-- .../buildpack/docker/ContainerUtils.java | 4 +-- .../snowdrop/buildpack/docker/ImageUtils.java | 5 +++- .../buildpack/docker/VolumeUtils.java | 2 +- .../lifecycle/LifecycleExecutor.java | 3 +++ .../lifecycle/LifecyclePhaseFactory.java | 26 +++++++++---------- .../buildpack/lifecycle/phases/Analyzer.java | 5 ++-- .../buildpack/lifecycle/phases/Builder.java | 5 ++-- .../buildpack/lifecycle/phases/Creator.java | 5 ++-- .../buildpack/lifecycle/phases/Detector.java | 5 ++-- .../buildpack/lifecycle/phases/Exporter.java | 5 ++-- .../buildpack/lifecycle/phases/Extender.java | 5 ++-- .../buildpack/lifecycle/phases/Restorer.java | 6 ++--- .../buildpack/config/DockerConfigTest.java | 4 +-- .../lifecycle/LifecycleExecutorTest.java | 10 +++---- 16 files changed, 65 insertions(+), 43 deletions(-) diff --git a/client/src/main/java/dev/snowdrop/buildpack/BuildpackBuild.java b/client/src/main/java/dev/snowdrop/buildpack/BuildpackBuild.java index f5bacfa..83c3587 100644 --- a/client/src/main/java/dev/snowdrop/buildpack/BuildpackBuild.java +++ b/client/src/main/java/dev/snowdrop/buildpack/BuildpackBuild.java @@ -66,6 +66,12 @@ private String selectPlatformLevel(DockerConfig dc, PlatformConfig pc, BuilderIm public int build(){ + log.info("Buildpack build requested with config: \n"+ + " - builder "+config.getBuilderImage().getReference()+"\n"+ + " - logLevel "+config.getLogConfig().getLogLevel()); + + log.info("Pulling Builder image"); + //obtain & pull & inspect Builder image. BuilderImage builder = new BuilderImage(config.getDockerConfig(), config.getPlatformConfig(), @@ -77,8 +83,13 @@ public int build(){ config.getPlatformConfig(), builder); + log.info("Pulling Run Image(s)"); + //precache the runimages in the orig builder before extending it. builder.getRunImages(new Version(activePlatformLevel)); + + log.debug("Creating Ephemeral Builder Image..."); + //create the extended builder image. BuilderImage extendedBuilder = BuildContainerUtils.createBuildImage(config.getDockerConfig().getDockerClient(), builder, @@ -86,9 +97,8 @@ public int build(){ null, null); try{ - log.info("Initiating buildpack build with config \n"+ + log.info("Initiating buildpack build with derived configuration: \n"+ " - ephemeralBuilder "+extendedBuilder.getImage().getReference()+"\n"+ - " - baseBuilder "+builder.getImage().getReference()+"\n"+ " - activePlatformLevel "+activePlatformLevel+"\n"+ " - build uid:gid "+extendedBuilder.getUserId()+":"+extendedBuilder.getGroupId()+"\n"+ " - withExtensions "+extendedBuilder.hasExtensions()); diff --git a/client/src/main/java/dev/snowdrop/buildpack/config/DockerConfig.java b/client/src/main/java/dev/snowdrop/buildpack/config/DockerConfig.java index e3e16fe..27086f1 100644 --- a/client/src/main/java/dev/snowdrop/buildpack/config/DockerConfig.java +++ b/client/src/main/java/dev/snowdrop/buildpack/config/DockerConfig.java @@ -57,7 +57,7 @@ public DockerConfig( } } - public Integer getPullTimeout(){ + public Integer getPullTimeoutSeconds(){ return this.pullTimeoutSeconds; } @@ -65,7 +65,7 @@ public Integer getPullRetryCount(){ return this.pullRetryCount; } - public Integer getPullRetryIncrease(){ + public Integer getPullRetryIncreaseSeconds(){ return this.pullRetryIncreaseSeconds; } diff --git a/client/src/main/java/dev/snowdrop/buildpack/docker/ContainerUtils.java b/client/src/main/java/dev/snowdrop/buildpack/docker/ContainerUtils.java index 37d1592..061aa9e 100644 --- a/client/src/main/java/dev/snowdrop/buildpack/docker/ContainerUtils.java +++ b/client/src/main/java/dev/snowdrop/buildpack/docker/ContainerUtils.java @@ -186,7 +186,7 @@ public static void addContentToContainer(DockerClient dc, String containerId, St public static void addContentToContainer(DockerClient dc, String containerId, String pathInContainer, Integer userId, Integer groupId, ContainerEntry... entries) { - log.info("Adding to container "+containerId+" pathInContainer "+pathInContainer); + log.debug("Adding to container "+containerId+" pathInContainer "+pathInContainer); Set seenDirs = new HashSet<>(); // Don't add entry for "/", causes issues with tar format. @@ -252,7 +252,7 @@ public void run() { } }; - log.info("Copying archive to container at "+containerPath); + log.debug("Copying archive to container at "+containerPath); Runnable reader = new Runnable() { @Override diff --git a/client/src/main/java/dev/snowdrop/buildpack/docker/ImageUtils.java b/client/src/main/java/dev/snowdrop/buildpack/docker/ImageUtils.java index 5514dbf..ace7017 100644 --- a/client/src/main/java/dev/snowdrop/buildpack/docker/ImageUtils.java +++ b/client/src/main/java/dev/snowdrop/buildpack/docker/ImageUtils.java @@ -48,11 +48,14 @@ public static void pullImages(DockerConfig config, String... imageNames) { if(config.getPullPolicy() == DockerConfig.PullPolicy.IF_NOT_PRESENT) { // list the current known images List li = dc.listImagesCmd().exec(); + + log.debug("Requested Images "+imageNameSet); for (Image i : li) { if (i.getRepoTags() == null) { continue; } for (String it : i.getRepoTags()) { + log.debug("Known Image : "+it); if (imageNameSet.contains(it)) { imageNameSet.remove(it); } @@ -82,7 +85,7 @@ public static void pullImages(DockerConfig config, String... imageNames) { boolean allDone = false; while(!allDone && retryCount<=config.getPullRetryCount()){ allDone = true; - long thisWait = config.getPullTimeout()+(retryCount*config.getPullRetryIncrease()); + long thisWait = config.getPullTimeoutSeconds()+(retryCount*config.getPullRetryIncreaseSeconds()); for (Entry e : pircMap.entrySet()) { boolean done = false; try { diff --git a/client/src/main/java/dev/snowdrop/buildpack/docker/VolumeUtils.java b/client/src/main/java/dev/snowdrop/buildpack/docker/VolumeUtils.java index e277a44..359f7db 100644 --- a/client/src/main/java/dev/snowdrop/buildpack/docker/VolumeUtils.java +++ b/client/src/main/java/dev/snowdrop/buildpack/docker/VolumeUtils.java @@ -67,7 +67,7 @@ private static boolean internalAddContentToVolume(DockerClient dc, String volume List command = Stream.of("").collect(Collectors.toList()); String dummyId = ContainerUtils.createContainer(dc, useImage, command, new VolumeBind(volumeName, mountPrefix)); try{ - log.info("Adding content to volume "+volumeName+" under prefix "+prefix+" using image "+useImage+" with volume bound at "+mountPrefix+" temp container id "+dummyId); + log.debug("Adding content to volume "+volumeName+" under prefix "+prefix+" using image "+useImage+" with volume bound at "+mountPrefix+" temp container id "+dummyId); ContainerUtils.addContentToContainer(dc, dummyId, prefix, uid, gid, entries); return true; }finally{ diff --git a/client/src/main/java/dev/snowdrop/buildpack/lifecycle/LifecycleExecutor.java b/client/src/main/java/dev/snowdrop/buildpack/lifecycle/LifecycleExecutor.java index 6c140e5..5224787 100644 --- a/client/src/main/java/dev/snowdrop/buildpack/lifecycle/LifecycleExecutor.java +++ b/client/src/main/java/dev/snowdrop/buildpack/lifecycle/LifecycleExecutor.java @@ -136,6 +136,9 @@ public int execute() { if(rc!=0) break; }while(false); } + if(rc==0){ + log.info("Buildpack build phases complete, application image is at "+config.getOutputImage().getReference()); + } return rc; }finally{ //allow factory to clean up any volumes created diff --git a/client/src/main/java/dev/snowdrop/buildpack/lifecycle/LifecyclePhaseFactory.java b/client/src/main/java/dev/snowdrop/buildpack/lifecycle/LifecyclePhaseFactory.java index 7bc04f2..8f9f2ee 100644 --- a/client/src/main/java/dev/snowdrop/buildpack/lifecycle/LifecyclePhaseFactory.java +++ b/client/src/main/java/dev/snowdrop/buildpack/lifecycle/LifecyclePhaseFactory.java @@ -104,16 +104,16 @@ public String getContainerForPhase(String args[], Integer runAsId){ dockerConfig.getDockerNetwork(), binds); - log.info("- mounted " + buildCacheVolume + " at " + CACHE_VOL_PATH); - log.info("- mounted " + launchCacheVolume + " at " + LAUNCH_CACHE_VOL_PATH); - log.info("- mounted " + kanikoCacheVolume + " at " + KANIKO_VOL_PATH); - log.info("- mounted " + applicationVolume + " at " + WORKSPACE_VOL_PATH); - log.info("- mounted " + platformVolume + " at " + PLATFORM_VOL_PATH); + log.debug("- mounted " + buildCacheVolume + " at " + CACHE_VOL_PATH); + log.debug("- mounted " + launchCacheVolume + " at " + LAUNCH_CACHE_VOL_PATH); + log.debug("- mounted " + kanikoCacheVolume + " at " + KANIKO_VOL_PATH); + log.debug("- mounted " + applicationVolume + " at " + WORKSPACE_VOL_PATH); + log.debug("- mounted " + platformVolume + " at " + PLATFORM_VOL_PATH); if(dockerConfig.getUseDaemon()) - log.info("- mounted " + dockerConfig.getDockerSocket() + " at " + LifecyclePhaseFactory.DOCKER_SOCKET_PATH); - log.info("- mounted " + outputVolume + " at " + LAYERS_VOL_PATH); - log.info("- container id " + id); - log.info("- image reference "+builder.getImage().getReference()); + log.debug("- mounted " + dockerConfig.getDockerSocket() + " at " + LifecyclePhaseFactory.DOCKER_SOCKET_PATH); + log.debug("- mounted " + outputVolume + " at " + LAYERS_VOL_PATH); + log.debug("- container id " + id); + log.debug("- image reference "+builder.getImage().getReference()); return id; } @@ -159,13 +159,13 @@ public void createVolumes(List content){ // add the application to the volume. Note we are placing it at /content, // because the volume mountpoint is mounted such that the user has no perms to create // new content there, but subdirs are ok. - log.info("There are "+content.size()+" entries to add for the app dir"); + log.debug("There are "+content.size()+" entries to add for the app dir"); List appEntries = content .stream() .flatMap(c -> c.getContainerEntries().stream()) .collect(Collectors.toList()); - log.info("Adding aplication to volume "+applicationVolume); + log.info("Adding application to volume "+applicationVolume); VolumeUtils.addContentToVolume(dockerConfig.getDockerClient(), applicationVolume, builder.getImage().getReference(), @@ -204,7 +204,7 @@ public void createVolumes(List content){ } public void tidyUp(){ - log.info("- tidying up the build volumes"); + log.info("Post Build cleanup activites:"); // remove volumes // (note when/if we persist the cache between builds, we'll be more selective here over what we remove) if (buildCacheConfig.getDeleteCacheAfterBuild()) { @@ -222,7 +222,7 @@ public void tidyUp(){ VolumeUtils.removeVolume(dockerConfig.getDockerClient(), outputVolume); VolumeUtils.removeVolume(dockerConfig.getDockerClient(), platformVolume); - log.info("- build volumes tidied up"); + log.info("- temporary build volumes removed"); } public BuilderImage getBuilderImage(){ diff --git a/client/src/main/java/dev/snowdrop/buildpack/lifecycle/phases/Analyzer.java b/client/src/main/java/dev/snowdrop/buildpack/lifecycle/phases/Analyzer.java index 0b6e65c..20d6909 100644 --- a/client/src/main/java/dev/snowdrop/buildpack/lifecycle/phases/Analyzer.java +++ b/client/src/main/java/dev/snowdrop/buildpack/lifecycle/phases/Analyzer.java @@ -65,7 +65,8 @@ public ContainerStatus runPhase(dev.snowdrop.buildpack.Logger logger, boolean us String id = factory.getContainerForPhase(args.toArray(), runAsId); try{ - log.info("- analyze container id " + id+ " will be run with uid "+runAsId); + log.info("Analyze container id " + id+ " will be run with uid "+runAsId); + log.debug("- container args "+args); // launch the container! log.info("- launching analyze container"); @@ -82,7 +83,7 @@ public ContainerStatus runPhase(dev.snowdrop.buildpack.Logger logger, boolean us // wait for the container to complete, and retrieve the exit code. int rc = factory.getDockerConfig().getDockerClient().waitContainerCmd(id).exec(new WaitContainerResultCallback()).awaitStatusCode(); - log.info("Buildpack analyze container complete, with exit code " + rc); + log.info("Analyze container complete, with exit code " + rc); return ContainerStatus.of(rc,id); }catch(Exception e){ diff --git a/client/src/main/java/dev/snowdrop/buildpack/lifecycle/phases/Builder.java b/client/src/main/java/dev/snowdrop/buildpack/lifecycle/phases/Builder.java index b4e9d32..44c4bbb 100644 --- a/client/src/main/java/dev/snowdrop/buildpack/lifecycle/phases/Builder.java +++ b/client/src/main/java/dev/snowdrop/buildpack/lifecycle/phases/Builder.java @@ -38,7 +38,8 @@ public ContainerStatus runPhase(dev.snowdrop.buildpack.Logger logger, boolean us int runAsId = factory.getBuilderImage().getUserId(); String id = factory.getContainerForPhase(args.toArray(), runAsId); try{ - log.info("- extender container id " + id+ " will be run with uid "+runAsId); + log.info("Builder container id " + id+ " will be run with uid "+runAsId); + log.debug("- container args "+args); // launch the container! log.info("- launching builder container"); @@ -55,7 +56,7 @@ public ContainerStatus runPhase(dev.snowdrop.buildpack.Logger logger, boolean us // wait for the container to complete, and retrieve the exit code. int rc = factory.getDockerConfig().getDockerClient().waitContainerCmd(id).exec(new WaitContainerResultCallback()).awaitStatusCode(); - log.info("Buildpack builder container complete, with exit code " + rc); + log.info("Builder container complete, with exit code " + rc); return ContainerStatus.of(rc,id); }catch(Exception e){ diff --git a/client/src/main/java/dev/snowdrop/buildpack/lifecycle/phases/Creator.java b/client/src/main/java/dev/snowdrop/buildpack/lifecycle/phases/Creator.java index 9e2cd6b..2f76f2f 100644 --- a/client/src/main/java/dev/snowdrop/buildpack/lifecycle/phases/Creator.java +++ b/client/src/main/java/dev/snowdrop/buildpack/lifecycle/phases/Creator.java @@ -50,7 +50,8 @@ public ContainerStatus runPhase(dev.snowdrop.buildpack.Logger logger, boolean us int runAsId = 0; String id = factory.getContainerForPhase(args.toArray(), runAsId); try{ - log.info("- creator container id " + id+ " will be run with uid "+runAsId+" and args "+args); + log.info("Creator container id " + id+ " will be run with uid "+runAsId); + log.debug("- container args "+args); // launch the container! log.info("- launching build container"); @@ -67,7 +68,7 @@ public ContainerStatus runPhase(dev.snowdrop.buildpack.Logger logger, boolean us // wait for the container to complete, and retrieve the exit code. int rc = factory.getDockerConfig().getDockerClient().waitContainerCmd(id).exec(new WaitContainerResultCallback()).awaitStatusCode(); - log.info("Buildpack container complete, with exit code " + rc); + log.info("Creator container complete, with exit code " + rc); return ContainerStatus.of(rc,id); }catch(Exception e){ diff --git a/client/src/main/java/dev/snowdrop/buildpack/lifecycle/phases/Detector.java b/client/src/main/java/dev/snowdrop/buildpack/lifecycle/phases/Detector.java index 6a7a2b6..d393cb1 100644 --- a/client/src/main/java/dev/snowdrop/buildpack/lifecycle/phases/Detector.java +++ b/client/src/main/java/dev/snowdrop/buildpack/lifecycle/phases/Detector.java @@ -56,7 +56,8 @@ public ContainerStatus runPhase(dev.snowdrop.buildpack.Logger logger, boolean us int runAsId = factory.getBuilderImage().getUserId(); String id = factory.getContainerForPhase(args.toArray(), runAsId); try{ - log.info("- detect container id " + id+ " will be run with uid "+runAsId); + log.info("Detect container id " + id+ " will be run with uid "+runAsId); + log.debug("- container args "+args); // launch the container! log.info("- launching detect container"); @@ -73,7 +74,7 @@ public ContainerStatus runPhase(dev.snowdrop.buildpack.Logger logger, boolean us // wait for the container to complete, and retrieve the exit code. int rc = factory.getDockerConfig().getDockerClient().waitContainerCmd(id).exec(new WaitContainerResultCallback()).awaitStatusCode(); - log.info("Buildpack detect container complete, with exit code " + rc); + log.info("Detect container complete, with exit code " + rc); analyzedToml = ContainerUtils.getFileFromContainer(factory.getDockerConfig().getDockerClient(), id, diff --git a/client/src/main/java/dev/snowdrop/buildpack/lifecycle/phases/Exporter.java b/client/src/main/java/dev/snowdrop/buildpack/lifecycle/phases/Exporter.java index 6f23afd..e868c6e 100644 --- a/client/src/main/java/dev/snowdrop/buildpack/lifecycle/phases/Exporter.java +++ b/client/src/main/java/dev/snowdrop/buildpack/lifecycle/phases/Exporter.java @@ -61,7 +61,8 @@ public ContainerStatus runPhase(dev.snowdrop.buildpack.Logger logger, boolean us String id = factory.getContainerForPhase(args.toArray(), runAsId); try{ - log.info("- export container id " + id+ " will be run with uid "+runAsId); + log.info("Export container id " + id+ " will be run with uid "+runAsId); + log.debug("- container args "+args); // launch the container! log.info("- launching export container"); @@ -78,7 +79,7 @@ public ContainerStatus runPhase(dev.snowdrop.buildpack.Logger logger, boolean us // wait for the container to complete, and retrieve the exit code. int rc = factory.getDockerConfig().getDockerClient().waitContainerCmd(id).exec(new WaitContainerResultCallback()).awaitStatusCode(); - log.info("Buildpack export container complete, with exit code " + rc); + log.info("Export container complete, with exit code " + rc); return ContainerStatus.of(rc,id); }catch(Exception e){ diff --git a/client/src/main/java/dev/snowdrop/buildpack/lifecycle/phases/Extender.java b/client/src/main/java/dev/snowdrop/buildpack/lifecycle/phases/Extender.java index fb8c5e1..a444a71 100644 --- a/client/src/main/java/dev/snowdrop/buildpack/lifecycle/phases/Extender.java +++ b/client/src/main/java/dev/snowdrop/buildpack/lifecycle/phases/Extender.java @@ -49,7 +49,8 @@ public ContainerStatus runPhase(dev.snowdrop.buildpack.Logger logger, boolean us int runAsId = 0; String id = factory.getContainerForPhase(args.toArray(), runAsId); try{ - log.info("- extender container id " + id+ " will be run with uid "+runAsId); + log.info("Extender container id " + id+ " will be run with uid "+runAsId); + log.debug("- container args "+args); // launch the container! log.info("- launching extender container"); @@ -66,7 +67,7 @@ public ContainerStatus runPhase(dev.snowdrop.buildpack.Logger logger, boolean us // wait for the container to complete, and retrieve the exit code. int rc = factory.getDockerConfig().getDockerClient().waitContainerCmd(id).exec(new WaitContainerResultCallback()).awaitStatusCode(); - log.info("Buildpack extender container complete, with exit code " + rc); + log.info("Extender container complete, with exit code " + rc); return ContainerStatus.of(rc,id); }catch(Exception e){ diff --git a/client/src/main/java/dev/snowdrop/buildpack/lifecycle/phases/Restorer.java b/client/src/main/java/dev/snowdrop/buildpack/lifecycle/phases/Restorer.java index b2496a9..5cb5997 100644 --- a/client/src/main/java/dev/snowdrop/buildpack/lifecycle/phases/Restorer.java +++ b/client/src/main/java/dev/snowdrop/buildpack/lifecycle/phases/Restorer.java @@ -61,8 +61,8 @@ public ContainerStatus runPhase(dev.snowdrop.buildpack.Logger logger, boolean us String id = factory.getContainerForPhase(args.toArray(), runAsId); try{ - log.info("- restorer container id " + id+ " will be run with uid "+runAsId+" and args "+args); - System.out.println("- restorer container id " + id+ " will be run with uid "+runAsId+" and args "+args); + log.info("Restorer container id " + id+ " will be run with uid "+runAsId); + log.debug("- container args "+args); // launch the container! log.info("- launching restorer container"); @@ -79,7 +79,7 @@ public ContainerStatus runPhase(dev.snowdrop.buildpack.Logger logger, boolean us // wait for the container to complete, and retrieve the exit code. int rc = factory.getDockerConfig().getDockerClient().waitContainerCmd(id).exec(new WaitContainerResultCallback()).awaitStatusCode(); - log.info("Buildpack restorer container complete, with exit code " + rc); + log.info("Restorer container complete, with exit code " + rc); return ContainerStatus.of(rc,id); }catch(Exception e){ diff --git a/client/src/test/java/dev/snowdrop/buildpack/config/DockerConfigTest.java b/client/src/test/java/dev/snowdrop/buildpack/config/DockerConfigTest.java index c04ef17..035493e 100644 --- a/client/src/test/java/dev/snowdrop/buildpack/config/DockerConfigTest.java +++ b/client/src/test/java/dev/snowdrop/buildpack/config/DockerConfigTest.java @@ -20,10 +20,10 @@ public class DockerConfigTest { @Test void checkTimeout() { DockerConfig dc1 = new DockerConfig(null, null, null, null, null, null, null, null, null); - assertEquals(60, dc1.getPullTimeout()); + assertEquals(60, dc1.getPullTimeoutSeconds()); DockerConfig dc2 = new DockerConfig(245017, null, null, null, null, null, null, null, null); - assertEquals(dc2.getPullTimeout(), 245017); + assertEquals(dc2.getPullTimeoutSeconds(), 245017); } @Test diff --git a/client/src/test/java/dev/snowdrop/buildpack/lifecycle/LifecycleExecutorTest.java b/client/src/test/java/dev/snowdrop/buildpack/lifecycle/LifecycleExecutorTest.java index 9a4cedf..ff2e93e 100644 --- a/client/src/test/java/dev/snowdrop/buildpack/lifecycle/LifecycleExecutorTest.java +++ b/client/src/test/java/dev/snowdrop/buildpack/lifecycle/LifecycleExecutorTest.java @@ -86,7 +86,7 @@ void testPre7( lenient().when(logConfig.getLogger()).thenReturn(logger); lenient().when(dockerConfig.getDockerClient()).thenReturn(dockerClient); - lenient().when(dockerConfig.getPullTimeout()).thenReturn(66); + lenient().when(dockerConfig.getPullTimeoutSeconds()).thenReturn(66); lenient().when(dockerConfig.getPullPolicy()).thenReturn(DockerConfig.PullPolicy.IF_NOT_PRESENT); lenient().when(config.getDockerConfig()).thenReturn(dockerConfig); @@ -190,7 +190,7 @@ void test7Onwards( lenient().when(logConfig.getLogger()).thenReturn(logger); lenient().when(dockerConfig.getDockerClient()).thenReturn(dockerClient); - lenient().when(dockerConfig.getPullTimeout()).thenReturn(66); + lenient().when(dockerConfig.getPullTimeoutSeconds()).thenReturn(66); lenient().when(dockerConfig.getPullPolicy()).thenReturn(DockerConfig.PullPolicy.IF_NOT_PRESENT); lenient().when(config.getDockerConfig()).thenReturn(dockerConfig); @@ -295,7 +295,7 @@ void test10OnwardsNoXtns( lenient().when(dockerConfig.getPullPolicy()).thenReturn(DockerConfig.PullPolicy.IF_NOT_PRESENT); lenient().when(dockerConfig.getDockerClient()).thenReturn(dockerClient); - lenient().when(dockerConfig.getPullTimeout()).thenReturn(66); + lenient().when(dockerConfig.getPullTimeoutSeconds()).thenReturn(66); lenient().when(config.getDockerConfig()).thenReturn(dockerConfig); lenient().when(config.getBuildCacheConfig()).thenReturn(buildCacheConfig); @@ -400,7 +400,7 @@ void test10OnwardsXtns( lenient().when(dockerConfig.getPullPolicy()).thenReturn(DockerConfig.PullPolicy.IF_NOT_PRESENT); lenient().when(dockerConfig.getDockerClient()).thenReturn(dockerClient); - lenient().when(dockerConfig.getPullTimeout()).thenReturn(66); + lenient().when(dockerConfig.getPullTimeoutSeconds()).thenReturn(66); lenient().when(config.getDockerConfig()).thenReturn(dockerConfig); lenient().when(config.getBuildCacheConfig()).thenReturn(buildCacheConfig); @@ -512,7 +512,7 @@ void test12OnwardsXtns( lenient().when(dockerConfig.getPullPolicy()).thenReturn(DockerConfig.PullPolicy.IF_NOT_PRESENT); lenient().when(dockerConfig.getDockerClient()).thenReturn(dockerClient); - lenient().when(dockerConfig.getPullTimeout()).thenReturn(66); + lenient().when(dockerConfig.getPullTimeoutSeconds()).thenReturn(66); lenient().when(config.getDockerConfig()).thenReturn(dockerConfig); lenient().when(config.getBuildCacheConfig()).thenReturn(buildCacheConfig);