]> git.apps.os.sepia.ceph.com Git - ceph-build.git/commitdiff
scripts/build_container: calculate and use FROM_IMAGE 2476/head
authorDan Mick <dan.mick@redhat.com>
Thu, 23 Oct 2025 22:27:51 +0000 (15:27 -0700)
committerDan Mick <dan.mick@redhat.com>
Thu, 23 Oct 2025 22:27:51 +0000 (15:27 -0700)
Instruct ceph.git's container/build.sh which image to use as the
container base, specified by env vars DISTRO and RELEASE

Signed-off-by: Dan Mick <dan.mick@redhat.com>
scripts/build_container

index aef0d97db10279a2f1a38432bca2d97df3582880..96373eabc902e13114a93f4a0cbde225d4a0582a 100755 (executable)
@@ -37,5 +37,11 @@ if [[ $CI_CONTAINER == "true" && $DISTRO == "centos" && "$RELEASE" =~ 8|9 ]] ; t
     cd ${WORKSPACE}
     # older jobs used a versioned directory; ceph-dev-pipeline uses an unversioned dir.
     [[ -d ./dist/ceph/container ]] && cd ./dist/ceph/container || cd dist/ceph-${cephver}/container
-    CEPH_SHA1=${SHA1} ./build.sh
+    from_image_spec="${DISTRO}:${RELEASE}"
+    case "${from_image_spec}" in
+        "centos:stream9")  FROM_IMAGE=quay.io/centos/centos:stream9 ;;
+        "rocky:10") FROM_IMAGE=docker.io/rockylinux/rockylinux:10 ;;
+        *) echo "Don't know requested FROM image ${from_image_spec}; exit 1 ;;
+    esac
+    FROM_IMAGE=${FROM_IMAGE} CEPH_SHA1=${SHA1} ./build.sh
 fi