From 901a3cac2f94c6d67fec643fcac386379ffd1396 Mon Sep 17 00:00:00 2001 From: David Galloway Date: Thu, 23 Oct 2025 11:57:10 -0400 Subject: [PATCH] Support building rocky10 containers Signed-off-by: David Galloway --- ceph-dev-pipeline/build/Jenkinsfile | 17 +++++------------ scripts/build_container | 4 ++-- 2 files changed, 7 insertions(+), 14 deletions(-) diff --git a/ceph-dev-pipeline/build/Jenkinsfile b/ceph-dev-pipeline/build/Jenkinsfile index 151bdbef..766dac21 100644 --- a/ceph-dev-pipeline/build/Jenkinsfile +++ b/ceph-dev-pipeline/build/Jenkinsfile @@ -604,8 +604,9 @@ pipeline { } stage("container") { when { - environment name: "CI_CONTAINER", value: "true" - environment name: "DIST", value: "centos9" + expression { + env.CI_CONTAINER == 'true' && ['centos9', 'rocky10'].contains(env.DIST) + } } environment { CONTAINER_REPO_CREDS = credentials('quay-ceph-io-ceph-ci') @@ -614,18 +615,10 @@ pipeline { script { env.CONTAINER_REPO_USERNAME = env.CONTAINER_REPO_CREDS_USR env.CONTAINER_REPO_PASSWORD = env.CONTAINER_REPO_CREDS_PSW - distro = sh( - script: '. /etc/os-release && echo -n $ID', - returnStdout: true, - ) - release = sh( - script: '. /etc/os-release && echo -n $VERSION_ID', - returnStdout: true, - ) cephver = env.VERSION.trim() sh """#!/bin/bash - export DISTRO=${distro} - export RELEASE=${release} + export DISTRO=${os.name} + export RELEASE=${os.version} export cephver=${cephver} ./scripts/build_container """ diff --git a/scripts/build_container b/scripts/build_container index aef0d97d..31e3be15 100755 --- a/scripts/build_container +++ b/scripts/build_container @@ -6,12 +6,12 @@ PS4="\$(date --rfc-3339=seconds) + " # XXX perhaps use job parameters instead of literals; then # later stages can also use them to compare etc. # build container image that supports building crimson-osd -if [[ $CI_CONTAINER == "true" && $DISTRO == "centos" && "$RELEASE" =~ 8|9 ]] ; then +if [[ $CI_CONTAINER == "true" && $DISTRO =~ ^(centos|rocky)$ && "$RELEASE" =~ ^(8|9|10)$ ]]; then podman login -u $CONTAINER_REPO_USERNAME -p $CONTAINER_REPO_PASSWORD $CONTAINER_REPO_HOSTNAME/$CONTAINER_REPO_ORGANIZATION loop=0 ready=false while ((loop < 15)); do - curl -s "https://shaman.ceph.com/api/search/?project=ceph&distros=centos/${RELEASE}/${ARCH}&sha1=${SHA1}&ref=${BRANCH}&flavor=${FLAVOR}" > shaman.status + curl -s "https://shaman.ceph.com/api/search/?project=ceph&distros=${DISTRO}/${RELEASE}/${ARCH}&sha1=${SHA1}&ref=${BRANCH}&flavor=${FLAVOR}" > shaman.status if [[ ($(jq -r '.[0].status' < shaman.status) == 'ready') ]]; then # If we skipped compilation, we will not have generated a shaman build, # so skip validating against extra.build_url -- 2.39.5