]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
container/build.sh: add 'rocky-10' suffix if necessary 67895/head
authorDan Mick <dan.mick@redhat.com>
Thu, 23 Oct 2025 21:58:12 +0000 (14:58 -0700)
committerNitzan Mordechai <nmordech@ibm.com>
Thu, 19 Mar 2026 13:49:54 +0000 (13:49 +0000)
'fromtag' is already available as distillation of the
FROM_IMAGE environment variable: everything after last
slash, s/:/-/.  Use it as a suffix if it's anything other than
"centos-9stream" so that multiple CI container tags can coexist.

Signed-off-by: Dan Mick <dan.mick@redhat.com>
(cherry picked from commit c8c03ac4e38bddcfb46127d9b3d90244af58417f)

container/build.sh

index ca0a5604d82b203ebce7c516b3c11cee7bdce0cb..20e49c7b3920754c294c7ec3269566dfcdea86b2 100755 (executable)
@@ -16,6 +16,7 @@ usage() {
 $0 [containerfile] (defaults to 'Containerfile')
 For a CI build (from ceph-ci.git, built and pushed to shaman):
 CI_CONTAINER: must be 'true'
+FROM_IMAGE: defaults to quay.io/centos/centos9:stream
 FLAVOR (OSD flavor, default or crimson)
 BRANCH (of Ceph. <remote>/<ref>)
 CEPH_SHA1 (of Ceph)
@@ -165,6 +166,16 @@ if [[ ${CI_CONTAINER} == "true" ]] ; then
     branch_repo_tag=${repopath}:${BRANCH}
     sha1_repo_tag=${repopath}:${CEPH_SHA1}
 
+    # while we have more than just centos9 containers:
+    # anything that's not gets suffixed with its fromtag
+    # for the branch and sha1 tags (for example, <branch>-rocky-10).
+    # The default can change when it needs to.
+
+    if [[ "${fromtag}" != "centos-stream9" ]] ; then
+        branch_repo_tag=${repopath}:${BRANCH}-${fromtag}
+        sha1_repo_tag=${repopath}:${CEPH_SHA1}-${fromtag}
+    fi
+
     if [[ "${ARCH}" == "arm64" ]] ; then
         branch_repo_tag=${branch_repo_tag}-arm64
         sha1_repo_tag=${sha1_repo_tag}-arm64