diff --git a/README.md b/README.md index 15be897e1..e4562ea13 100644 --- a/README.md +++ b/README.md @@ -63,17 +63,18 @@ Additionally, we recommend a base level knowledge of Cloud Foundry. You should a ## Supported Mendix Versions -The latest [buildpack release](https://github.com/mendix/cf-mendix-buildpack/releases/latest) supports all [officially-supported](https://docs.mendix.com/releasenotes/studio-pro/lts-mts) Mendix versions (7, 8 and 9). +The latest [buildpack release](https://github.com/mendix/cf-mendix-buildpack/releases/latest) supports all [officially-supported](https://docs.mendix.com/releasenotes/studio-pro/lts-mts) Mendix versions. The following table shows which specific buildpack release introduced or removed support for specific Mendix versions. -| Mendix Major Version | Supported | End-of-Support | -| -------------------- | --------- | -------------- | -| `10` | `v4.24.0` | - | -| `9` | `v4.24.0` | - | -| `8` | `v3.4.0` | - | -| `7` | `v3.1.0` | - | -| `6` | `v1.0` | `v4.16.0` | +| Mendix Major Version | Supported | +| -------------------- | --------- | +| `11` | `v5.0.15` | +| `10` | `v4.24.0` | +| `9` | `v4.24.0` | +| `8` | `v3.4.0` | +| `7` | `v3.1.0` | +| `6` | `v1.0` | We recommend using a [maintained (LTS / MTS)](https://docs.mendix.com/releasenotes/studio-pro/lts-mts) Mendix version. Additionally, we recommend to always [use / "pin to" a specific buildpack release](#buildpack-releases-and-version-pinning). @@ -442,7 +443,7 @@ This buildpack provides the [Adoptium](https://adoptium.net/) JDK and JRE. ### Java Version The buildpack will automatically determine the Java version from metadata(it will have JavaVersion as json attribute). The default Java version is 8. For Mendix 8 and above, the default Java version is 11. -Metadata JavaVersion attribute will have these values "11", "17" or in the future "21". +Metadata JavaVersion attribute will have these values "11", "17", "21" or "25". We do not recommend overriding the Java version for the buildpack. However, for cases where this is required, the `JAVA_VERSION` variable can be used to override the version number. diff --git a/buildpack/core/java.py b/buildpack/core/java.py index f604412e2..ee4d61b9f 100644 --- a/buildpack/core/java.py +++ b/buildpack/core/java.py @@ -28,6 +28,8 @@ def get_java_major_version(runtime_version, build_path=BASE_PATH): result = 17 elif 21 == result: result = 21 + elif 25 == result: + result = 25 else: result = 11 major_version = _get_major_version(result) diff --git a/dependencies.yml b/dependencies.yml index ec75c74d2..ad1be54aa 100644 --- a/dependencies.yml +++ b/dependencies.yml @@ -41,9 +41,10 @@ dependencies: vendor: Adoptium version: - "8": 8u511 - - "11": 11.0.33 - - "17": 17.0.21 - - "21": 21.0.13 + - "11": 11.0.33.1 + - "17": 17.0.21.1 + - "21": 21.0.13.1 + - "25": 25.0.5.1 logs: mendix-logfilter: artifact: logs/mendix-logfilter-{{version}}.tar.gz @@ -79,10 +80,10 @@ dependencies: version: 8.24.0 nginx: artifact: nginx_{{ version }}_linux_x64_{{ fs }}_{{ commit }}.tgz - commit: 8ae9e822 + commit: d4043e47 fs: cflinuxfs4 cpe: cpe:2.3:a:f5:nginx:{{ version }}:*:*:*:*:*:*:* - version: 1.30.4 + version: 1.30.7 ruby: artifact: ruby/ruby_{{ version }}_linux_x64_{{ fs }}_{{ commit }}.tgz commit: 5fed98f8 diff --git a/dev/Dockerfile b/dev/Dockerfile index e1c1e390b..af68e60dc 100644 --- a/dev/Dockerfile +++ b/dev/Dockerfile @@ -1,4 +1,4 @@ -FROM --platform=linux/amd64 python:3.10 +FROM --platform=linux/amd64 python:3.15.2 WORKDIR /app diff --git a/tests/unit/test_java_version_parsing.py b/tests/unit/test_java_version_parsing.py index 6f2ab7e3b..210a89a37 100644 --- a/tests/unit/test_java_version_parsing.py +++ b/tests/unit/test_java_version_parsing.py @@ -1,4 +1,5 @@ from unittest import TestCase +from unittest.mock import patch from lib.m2ee.client import M2EEResponse from lib.m2ee.munin import ( @@ -6,7 +7,7 @@ _get_jre_major_version_from_version_string, ) from lib.m2ee.version import MXVersion -from buildpack.core.java import _get_major_version +from buildpack.core.java import _get_major_version, get_java_major_version class TestJREVersionFromString(TestCase): @@ -32,6 +33,7 @@ def test_jre_get_major_version(self): ("1.8.0_202", 8), ("8u233", 8), ("11.0.3", 11), + ("25.0.5", 25), ) for version_string, major_version in jre_versions: with self.subTest(): @@ -41,6 +43,17 @@ def test_jre_get_major_version(self): ) +class TestGetJavaMajorVersion(TestCase): + @patch.dict("os.environ", {}, clear=True) + @patch("buildpack.core.java.runtime.get_metadata_value", return_value=25) + def test_java_25_from_metadata(self, _): + self.assertEqual(25, get_java_major_version(MXVersion("11.0.0"))) + + @patch.dict("os.environ", {"JAVA_VERSION": "25"}, clear=True) + def test_java_25_from_override(self): + self.assertEqual(25, get_java_major_version(MXVersion("11.0.0"))) + + class TestGuessJavaVersion(TestCase): def test_guess_java8(self): m2ee_about = M2EEResponse(