From 629c25aa2e10d1b8fb82322d14e187190c5de7af Mon Sep 17 00:00:00 2001 From: 0x1def <0x1def@flakybit.net> Date: Sun, 29 Dec 2024 15:27:43 +0300 Subject: [PATCH] CI: externalized binaries version --- .ci/image.sh | 1 + .ci/set-env.sh | 4 +++- Dockerfile | 3 ++- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.ci/image.sh b/.ci/image.sh index 70afc6c..3b3a770 100755 --- a/.ci/image.sh +++ b/.ci/image.sh @@ -15,6 +15,7 @@ dockerfile="./Dockerfile" echo && echo "Building $image image" executor -c ./ -f "$dockerfile" -d "$HARBOR_REGISTRY/$image" \ --build-arg MONGO_VERSION="$MONGO_VERSION" \ + --build-arg MONGO_BINARIES_VERSION="$MONGO_BINARIES_VERSION" \ --build-arg MONGO_SHELL_VERSION="$MONGO_SHELL_VERSION" \ --build-arg MONGO_TOOLS_VERSION="$MONGO_TOOLS_VERSION" \ --build-arg MONGO_RUST_PING_VERSION="$MONGO_RUST_PING_VERSION" \ diff --git a/.ci/set-env.sh b/.ci/set-env.sh index 98e3e99..e7b20d2 100755 --- a/.ci/set-env.sh +++ b/.ci/set-env.sh @@ -14,7 +14,9 @@ app_component='server' printf 'APP_COMPONENT=%s\n' "$app_component" >> "$CI_ENV_FILE" printf 'APP_VERSION=%s\n' "$(getAppVersion)" >> "$CI_ENV_FILE" -printf 'MONGO_VERSION=%s\n' '7.0.16' >> "$CI_ENV_FILE" +mongo_version='7.0.16' +printf 'MONGO_VERSION=%s\n' "$mongo_version" >> "$CI_ENV_FILE" +printf 'MONGO_BINARIES_VERSION=%s\n' "$mongo_version-1" >> "$CI_ENV_FILE" printf 'MONGO_SHELL_VERSION=%s\n' '2.3.3-0' >> "$CI_ENV_FILE" printf 'MONGO_TOOLS_VERSION=%s\n' '100.10.0' >> "$CI_ENV_FILE" printf 'MONGO_RUST_PING_VERSION=%s\n' '0.4.0' >> "$CI_ENV_FILE" diff --git a/Dockerfile b/Dockerfile index a435758..a93a74b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,6 +1,7 @@ FROM docker.io/bitnami/minideb:bookworm ARG MONGO_VERSION +ARG MONGO_BINARIES_VERSION ARG MONGO_SHELL_VERSION ARG MONGO_TOOLS_VERSION ARG MONGO_RUST_PING_VERSION @@ -56,7 +57,7 @@ RUN mkdir -p /tmp/bitnami/pkg/cache/ ; \ done ; \ # Install custom MongoDB and tools COMPONENTS=( \ - "mongodb-${APP_VERSION}-0-linux-${OS_ARCH}-${OS_FLAVOUR}" \ + "mongodb-${MONGO_BINARIES_VERSION}-linux-${OS_ARCH}-${OS_FLAVOUR}" \ "mongo-tools-${MONGO_TOOLS_VERSION}-linux-${OS_ARCH}" \ ) ; \ for COMPONENT in "${COMPONENTS[@]}"; do \