diff --git a/CHANGELOG.md b/CHANGELOG.md
index 00b7619b..e0a6a523 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -24,7 +24,13 @@ Adding a requirement of a major version of a dependency is breaking a contract.
Dropping a requirement of a major version of a dependency is a new contract.
## [Unreleased]
-[Unreleased]: https://github.com/atlassian/infrastructure/compare/release-4.29.1...master
+[Unreleased]: https://github.com/atlassian/infrastructure/compare/release-4.29.2...master
+
+### Fixed
+- Install fonts required by `AdoptOpenJDK`, `AdoptOpenJDK11`, `OracleJDK`, `VersionedOracleJdk`. Aid DCPERF-432.
+
+## [4.29.2] - 2024-06-19
+[4.29.1]: https://github.com/atlassian/infrastructure/compare/release-4.29.1...release-4.29.2
### Fixed
- Fix remote JVM debugger setup for Jira. Aid DCPERF-432.
diff --git a/src/main/kotlin/com/atlassian/performance/tools/infrastructure/api/jvm/AdoptOpenJDK.kt b/src/main/kotlin/com/atlassian/performance/tools/infrastructure/api/jvm/AdoptOpenJDK.kt
index d853246f..49864631 100644
--- a/src/main/kotlin/com/atlassian/performance/tools/infrastructure/api/jvm/AdoptOpenJDK.kt
+++ b/src/main/kotlin/com/atlassian/performance/tools/infrastructure/api/jvm/AdoptOpenJDK.kt
@@ -21,6 +21,7 @@ class AdoptOpenJDK : VersionedJavaDevelopmentKit {
download(connection)
connection.execute("tar -xzf $jdkArchive")
connection.execute("echo '${use()}' >> ~/.profile")
+ JdkFonts().install(connection)
}
override fun use(): String {
diff --git a/src/main/kotlin/com/atlassian/performance/tools/infrastructure/api/jvm/AdoptOpenJDK11.kt b/src/main/kotlin/com/atlassian/performance/tools/infrastructure/api/jvm/AdoptOpenJDK11.kt
index 3975226b..bfa7794e 100644
--- a/src/main/kotlin/com/atlassian/performance/tools/infrastructure/api/jvm/AdoptOpenJDK11.kt
+++ b/src/main/kotlin/com/atlassian/performance/tools/infrastructure/api/jvm/AdoptOpenJDK11.kt
@@ -28,6 +28,7 @@ class AdoptOpenJDK11 : VersionedJavaDevelopmentKit {
download(connection)
connection.execute("tar -xzf $jdkArchive")
connection.execute("echo '${use()}' >> ~/.profile")
+ JdkFonts().install(connection)
}
override fun use(): String =
diff --git a/src/main/kotlin/com/atlassian/performance/tools/infrastructure/api/jvm/JdkFonts.kt b/src/main/kotlin/com/atlassian/performance/tools/infrastructure/api/jvm/JdkFonts.kt
new file mode 100644
index 00000000..4f7db601
--- /dev/null
+++ b/src/main/kotlin/com/atlassian/performance/tools/infrastructure/api/jvm/JdkFonts.kt
@@ -0,0 +1,15 @@
+package com.atlassian.performance.tools.infrastructure.api.jvm
+
+import com.atlassian.performance.tools.infrastructure.api.os.Ubuntu
+import com.atlassian.performance.tools.ssh.api.SshConnection
+
+internal class JdkFonts {
+
+ /**
+ * @see Jira fonts installation
+ * @see Captcha failing to load because of missing fonts
+ */
+ fun install(ssh: SshConnection) {
+ Ubuntu().install(ssh, listOf("fontconfig"))
+ }
+}
diff --git a/src/main/kotlin/com/atlassian/performance/tools/infrastructure/api/jvm/OracleJDK.kt b/src/main/kotlin/com/atlassian/performance/tools/infrastructure/api/jvm/OracleJDK.kt
index 1730539b..222c0eca 100644
--- a/src/main/kotlin/com/atlassian/performance/tools/infrastructure/api/jvm/OracleJDK.kt
+++ b/src/main/kotlin/com/atlassian/performance/tools/infrastructure/api/jvm/OracleJDK.kt
@@ -6,7 +6,6 @@ import org.apache.logging.log4j.Logger
import java.net.URI
import java.time.Duration
-
class OracleJDK : VersionedJavaDevelopmentKit {
private val logger: Logger = LogManager.getLogger(this::class.java)
private val jdkUpdate = 131
@@ -29,6 +28,7 @@ class OracleJDK : VersionedJavaDevelopmentKit {
download(connection)
connection.execute("tar -xzf $jdkArchive")
connection.execute("echo '${use()}' >> ~/.profile")
+ JdkFonts().install(connection)
}
override fun use(): String = "export PATH=$jreBin:$bin:${'$'}PATH; export JAVA_HOME=$path"
diff --git a/src/main/kotlin/com/atlassian/performance/tools/infrastructure/api/jvm/VersionedOracleJdk.kt b/src/main/kotlin/com/atlassian/performance/tools/infrastructure/api/jvm/VersionedOracleJdk.kt
index b7d62ff9..0c70d205 100644
--- a/src/main/kotlin/com/atlassian/performance/tools/infrastructure/api/jvm/VersionedOracleJdk.kt
+++ b/src/main/kotlin/com/atlassian/performance/tools/infrastructure/api/jvm/VersionedOracleJdk.kt
@@ -30,6 +30,7 @@ class VersionedOracleJdk private constructor(
}.retry(3, ExponentialBackoff(ofSeconds(10)))
connection.execute("tar --extract --gunzip --file jdk-$version.tar.gz")
connection.execute("echo '${use()}' >> ~/.profile")
+ JdkFonts().install(connection)
}
override fun use(): String = "export PATH=$javaHome/bin:\$PATH; export JAVA_HOME=$javaHome"
diff --git a/src/test/kotlin/com/atlassian/performance/tools/infrastructure/api/jvm/AdoptOpenJdk11IT.kt b/src/test/kotlin/com/atlassian/performance/tools/infrastructure/api/jvm/AdoptOpenJdk11IT.kt
index 62aed546..52c6d05f 100644
--- a/src/test/kotlin/com/atlassian/performance/tools/infrastructure/api/jvm/AdoptOpenJdk11IT.kt
+++ b/src/test/kotlin/com/atlassian/performance/tools/infrastructure/api/jvm/AdoptOpenJdk11IT.kt
@@ -13,4 +13,10 @@ class AdoptOpenJdk11IT {
fun shouldHaveJavaHomeSet() {
JdkSupport(AdoptOpenJDK11()).shouldHaveJavaHomeSet("/jdk-11.0.1+13")
}
+
+ @Test
+ fun shouldLoadFont() {
+ JdkSupport(AdoptOpenJDK11()).shouldLoadFont()
+ }
+
}
diff --git a/src/test/kotlin/com/atlassian/performance/tools/infrastructure/api/jvm/AdoptOpenJdkIT.kt b/src/test/kotlin/com/atlassian/performance/tools/infrastructure/api/jvm/AdoptOpenJdkIT.kt
index d3377bd9..8c0ebe4a 100644
--- a/src/test/kotlin/com/atlassian/performance/tools/infrastructure/api/jvm/AdoptOpenJdkIT.kt
+++ b/src/test/kotlin/com/atlassian/performance/tools/infrastructure/api/jvm/AdoptOpenJdkIT.kt
@@ -8,8 +8,15 @@ class AdoptOpenJdkIT {
fun shouldSupportJstat() {
JstatSupport(AdoptOpenJDK()).shouldSupportJstat()
}
+
@Test
fun shouldHaveJavaHomeSet() {
JdkSupport(AdoptOpenJDK()).shouldHaveJavaHomeSet("/jdk8u172-b11")
}
+
+ @Test
+ fun shouldLoadFont() {
+ JdkSupport(AdoptOpenJDK()).shouldLoadFont()
+ }
+
}
diff --git a/src/test/kotlin/com/atlassian/performance/tools/infrastructure/api/jvm/OpenJdk11IT.kt b/src/test/kotlin/com/atlassian/performance/tools/infrastructure/api/jvm/OpenJdk11IT.kt
index 09eb5506..b6c9333d 100644
--- a/src/test/kotlin/com/atlassian/performance/tools/infrastructure/api/jvm/OpenJdk11IT.kt
+++ b/src/test/kotlin/com/atlassian/performance/tools/infrastructure/api/jvm/OpenJdk11IT.kt
@@ -13,4 +13,10 @@ class OpenJdk11IT {
fun shouldHaveJavaHome() {
JdkSupport(OpenJDK11()).shouldHaveJavaHomeSet("/usr/lib/jvm/java-1.11.0-openjdk-")
}
-}
\ No newline at end of file
+
+ @Test
+ fun shouldLoadFont() {
+ JdkSupport(OpenJDK11()).shouldLoadFont()
+ }
+
+}
diff --git a/src/test/kotlin/com/atlassian/performance/tools/infrastructure/api/jvm/OpenJdkIT.kt b/src/test/kotlin/com/atlassian/performance/tools/infrastructure/api/jvm/OpenJdkIT.kt
index bd4e27f7..85421542 100644
--- a/src/test/kotlin/com/atlassian/performance/tools/infrastructure/api/jvm/OpenJdkIT.kt
+++ b/src/test/kotlin/com/atlassian/performance/tools/infrastructure/api/jvm/OpenJdkIT.kt
@@ -13,4 +13,10 @@ class OpenJdkIT {
fun shouldHaveJavaHome() {
JdkSupport(OpenJDK()).shouldHaveJavaHomeSet("/usr/lib/jvm/java-1.8.0-openjdk-")
}
-}
\ No newline at end of file
+
+ @Test
+ fun shouldLoadFont() {
+ JdkSupport(OpenJDK()).shouldLoadFont()
+ }
+
+}
diff --git a/src/test/kotlin/com/atlassian/performance/tools/infrastructure/api/jvm/OracleJdkIT.kt b/src/test/kotlin/com/atlassian/performance/tools/infrastructure/api/jvm/OracleJdkIT.kt
index 8e6c61e2..31eed956 100644
--- a/src/test/kotlin/com/atlassian/performance/tools/infrastructure/api/jvm/OracleJdkIT.kt
+++ b/src/test/kotlin/com/atlassian/performance/tools/infrastructure/api/jvm/OracleJdkIT.kt
@@ -18,4 +18,10 @@ class OracleJdkIT {
fun shouldHaveJavaHomeSet() {
JdkSupport(OracleJDK()).shouldHaveJavaHomeSet("/jdk1.8.0_131")
}
+
+ @Test
+ fun shouldLoadFont() {
+ JdkSupport(OracleJDK()).shouldLoadFont()
+ }
+
}