From 4304f848e63c12239b7ffc3adc70a9b04eb33056 Mon Sep 17 00:00:00 2001 From: John Mulligan Date: Fri, 14 Feb 2025 11:24:29 -0500 Subject: [PATCH] src/script: rename CEPH_BRANCH to CEPH_BASE_BRANCH for build container Previously, we were passing build argument of CEPH_BRANCH, but that was a bit misleading as we expect the current branch to vary a bit (as users will be using branches to develop and test the code). What we actually care about is the base branch ('main', 'squid', etc) as that is fed into our bootstrap script and we want the option to simple variations based on the name of said base branch. Rename CEPH_BRANCH to CEPH_BASE_BRANCH for clarity. Signed-off-by: John Mulligan (cherry picked from commit a1d49d557cfcc75bab6121e652350a6bfec3409f) --- Dockerfile.build | 4 ++-- src/script/buildcontainer-setup.sh | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Dockerfile.build b/Dockerfile.build index cece359e13a..405d201f955 100644 --- a/Dockerfile.build +++ b/Dockerfile.build @@ -21,12 +21,12 @@ ENV FOR_MAKE_CHECK=1 ARG DISTRO ARG CEPH_CTR_SRC=/usr/local/src/ceph ARG CLEAN_DNF=yes -ARG CEPH_BRANCH=main +ARG CEPH_BASE_BRANCH=main COPY --from=bootstrap ${CEPH_CTR_SRC} ${CEPH_CTR_SRC} # Note that we do not use ENV for the following. This is because we do not # want them permamently stored in the container's layer. RUN DISTRO=$DISTRO \ - CEPH_BRANCH=$CEPH_BRANCH \ + CEPH_BASE_BRANCH=$CEPH_BASE_BRANCH \ CLEAN_DNF=$CLEAN_DNF \ CEPH_CTR_SRC=${CEPH_CTR_SRC} \ bash -x ${CEPH_CTR_SRC}/buildcontainer-setup.sh diff --git a/src/script/buildcontainer-setup.sh b/src/script/buildcontainer-setup.sh index 82ca11e88ed..1920883e552 100644 --- a/src/script/buildcontainer-setup.sh +++ b/src/script/buildcontainer-setup.sh @@ -26,7 +26,7 @@ fi # ceph for the given ~ pair. Some distros need extra # tools in the container image vs. vm hosts or extra tools needed to build # packages etc. -case "${CEPH_BRANCH}~${DISTRO_KIND}" in +case "${CEPH_BASE_BRANCH}~${DISTRO_KIND}" in *~*centos*8) dnf install -y java-1.8.0-openjdk-headless /usr/bin/rpmbuild wget install_container_deps @@ -43,7 +43,7 @@ case "${CEPH_BRANCH}~${DISTRO_KIND}" in install_container_deps ;; *) - echo "Unknown action, branch or build: ${CEPH_BRANCH}~${DISTRO_KIND}" >&2 + echo "Unknown action, branch or build: ${CEPH_BASE_BRANCH}~${DISTRO_KIND}" >&2 exit 2 ;; esac