diff --git a/src/bci_build/package/package_versions.json b/src/bci_build/package/package_versions.json index 90a65a8d7..204c9b6ee 100644 --- a/src/bci_build/package/package_versions.json +++ b/src/bci_build/package/package_versions.json @@ -51,5 +51,9 @@ "6": "0.21.3", "7": "0.21.3", "Tumbleweed": "0.22.2" + }, + "valkey": { + "Tumbleweed": "8.0", + "version_format": "minor" } } \ No newline at end of file diff --git a/src/bci_build/package/valkey.py b/src/bci_build/package/valkey.py index 876c2733f..01a54f2ee 100644 --- a/src/bci_build/package/valkey.py +++ b/src/bci_build/package/valkey.py @@ -8,8 +8,12 @@ from bci_build.package import ApplicationStackContainer from bci_build.package import OsContainer from bci_build.package import OsVersion +from bci_build.package import ParseVersion from bci_build.package import Replacement from bci_build.package import _build_tag_prefix +from bci_build.package.helpers import generate_package_version_check +from bci_build.package.versions import format_version +from bci_build.package.versions import get_pkg_version VALKEY_CONTAINERS = [ ApplicationStackContainer( @@ -25,17 +29,24 @@ is_latest=os_version in CAN_BE_LATEST_OS_VERSION, version="%%valkey_version%%", version_in_uid=False, + tag_version=format_version( + valkey_version := get_pkg_version("valkey", os_version), ParseVersion.MINOR + ), + additional_versions=[format_version(valkey_version, ParseVersion.MAJOR)], replacements_via_service=[ Replacement( regex_in_build_description="%%valkey_version%%", package_name="valkey" ) ], license="BSD-3-Clause", - package_list=["valkey", "valkey-compat-redis"], + package_list=["valkey"], entrypoint=["/usr/bin/valkey-server"], entrypoint_user="valkey", exposes_ports=[TCP(6379)], volumes=["/data"], + build_stage_custom_end=generate_package_version_check( + "valkey", valkey_version, ParseVersion.MINOR, use_target=True + ), custom_end=textwrap.dedent( f""" {DOCKERFILE_RUN} install -o valkey -g valkey -m 750 -d /data