Warn when image building workspace directories cannot be deleted
When the `buildWorkspace` location in the `spring-boot:build-image` Maven goal or `bootBuildImage` Gradle task is configured to use a local bind source, the location is passed to the CNB lifecycle without further processing by Spring Boot. The lifecycle is in control of creating any files in the specified location. Spring Boot tries to remove the directories at the specified location after an image is successfully created, but should not fail the image build if the lifecycle has created files or directories with permissions that keep them from being deleted successfully. Fixes gh-40760
This commit is contained in:
@@ -36,7 +36,6 @@ import org.apache.commons.compress.compressors.gzip.GzipCompressorOutputStream;
|
||||
import org.apache.commons.compress.utils.IOUtils;
|
||||
import org.gradle.testkit.runner.BuildResult;
|
||||
import org.gradle.testkit.runner.TaskOutcome;
|
||||
import org.junit.jupiter.api.Disabled;
|
||||
import org.junit.jupiter.api.TestTemplate;
|
||||
import org.junit.jupiter.api.condition.EnabledOnOs;
|
||||
import org.junit.jupiter.api.condition.OS;
|
||||
@@ -301,10 +300,8 @@ class BootBuildImageIntegrationTests {
|
||||
}
|
||||
|
||||
@TestTemplate
|
||||
@EnabledOnOs(value = OS.LINUX,
|
||||
disabledReason = "Works with Docker Engine on Linux but is not reliable with "
|
||||
+ "Docker Desktop on other OSs")
|
||||
@Disabled("gh-40760")
|
||||
@EnabledOnOs(value = OS.LINUX, disabledReason = "Works with Docker Engine on Linux but is not reliable with "
|
||||
+ "Docker Desktop on other OSs")
|
||||
void buildsImageWithBindCaches() throws IOException {
|
||||
writeMainClass();
|
||||
writeLongNameResource();
|
||||
|
||||
Reference in New Issue
Block a user