Prevent Docker volume name clashes in tests during parallel builds

See gh-28292
This commit is contained in:
Scott Frederick
2021-10-21 15:07:15 -05:00
parent e25f216eab
commit e84c1abb0f
4 changed files with 15 additions and 7 deletions

View File

@@ -290,7 +290,7 @@ class BootBuildImageIntegrationTests {
assertThat(result.getOutput()).contains("---> Test Info buildpack building");
assertThat(result.getOutput()).contains("---> Test Info buildpack done");
removeImages(projectName);
deleteVolumes("build-cache-volume", "launch-cache-volume");
deleteVolumes("cache-" + projectName + ".build", "cache-" + projectName + ".launch");
}
@TestTemplate

View File

@@ -10,12 +10,12 @@ bootBuildImage {
builder = "projects.registry.vmware.com/springboot/spring-boot-cnb-builder:0.0.1"
buildCache {
volume {
name = "build-cache-volume"
name = "cache-${rootProject.name}.build"
}
}
launchCache {
volume {
name = "launch-cache-volume"
name = "cache-${rootProject.name}.launch"
}
}
}