]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
container/build.sh: add 'rocky-10' suffix if necessary 66046/head
authorDan Mick <dan.mick@redhat.com>
Thu, 23 Oct 2025 21:58:12 +0000 (14:58 -0700)
committerDan Mick <dan.mick@redhat.com>
Thu, 23 Oct 2025 22:19:34 +0000 (15:19 -0700)
'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>
container/build.sh

index 4f7a34a913194c8383fd0885ed91afe77a20dd6c..ebfd2263a5a987d80edaec1f4fe77fcd0f48ac93 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)
@@ -166,6 +167,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