Add support for build workspace option when building images
Closes gh-37478
This commit is contained in:
@@ -343,7 +343,8 @@ class PackagingDocumentationTests {
|
||||
void bootBuildImageWithBindCaches() {
|
||||
BuildResult result = this.gradleBuild.script("src/docs/gradle/packaging/boot-build-image-bind-caches")
|
||||
.build("bootBuildImageCaches");
|
||||
assertThat(result.getOutput()).containsPattern("buildCache=/tmp/cache-gradle-[\\d]+.build")
|
||||
assertThat(result.getOutput()).containsPattern("buildWorkspace=/tmp/cache-gradle-[\\d]+.work")
|
||||
.containsPattern("buildCache=/tmp/cache-gradle-[\\d]+.build")
|
||||
.containsPattern("launchCache=/tmp/cache-gradle-[\\d]+.launch");
|
||||
}
|
||||
|
||||
|
||||
@@ -11,6 +11,11 @@ java {
|
||||
bootBuildImage {
|
||||
builder = "projects.registry.vmware.com/springboot/spring-boot-cnb-builder:0.0.2"
|
||||
pullPolicy = "IF_NOT_PRESENT"
|
||||
buildWorkspace {
|
||||
bind {
|
||||
source = System.getProperty('java.io.tmpdir') + "/junit-image-pack-${rootProject.name}-work"
|
||||
}
|
||||
}
|
||||
buildCache {
|
||||
bind {
|
||||
source = System.getProperty('java.io.tmpdir') + "/junit-image-cache-${rootProject.name}-build"
|
||||
|
||||
@@ -11,6 +11,11 @@ java {
|
||||
bootBuildImage {
|
||||
builder = "projects.registry.vmware.com/springboot/spring-boot-cnb-builder:0.0.2"
|
||||
pullPolicy = "IF_NOT_PRESENT"
|
||||
buildWorkspace {
|
||||
volume {
|
||||
name = "pack-${rootProject.name}.work"
|
||||
}
|
||||
}
|
||||
buildCache {
|
||||
volume {
|
||||
name = "cache-${rootProject.name}.build"
|
||||
|
||||
Reference in New Issue
Block a user