Fix custom image name example and documentation

There is no `artifactId` property in a gradle Project, and the default
value uses the project name.

See gh-22918
This commit is contained in:
Jean-Baptiste Nizet
2020-08-12 19:06:30 +02:00
committed by Stephane Nicoll
parent b1e631e8a6
commit 27528fdd07
4 changed files with 24 additions and 13 deletions

View File

@@ -237,6 +237,13 @@ class PackagingDocumentationTests {
.contains("HTTPS_PROXY=https://proxy.example.com");
}
@TestTemplate
void bootBuildImageWithCustomImageName() throws IOException {
BuildResult result = this.gradleBuild.script("src/docs/gradle/packaging/boot-build-image-name")
.build("bootBuildImageName");
assertThat(result.getOutput()).contains("example.com/library/" + this.gradleBuild.getProjectDir().getName());
}
protected void jarFile(File file) throws IOException {
try (JarOutputStream jar = new JarOutputStream(new FileOutputStream(file))) {
jar.putNextEntry(new ZipEntry("META-INF/MANIFEST.MF"));