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 <jmulligan@redhat.com>
(cherry picked from commit a1d49d557c)
This commit is contained in:
John Mulligan 2025-02-14 11:24:29 -05:00
parent 98be912957
commit 4304f848e6
2 changed files with 4 additions and 4 deletions

View File

@ -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

View File

@ -26,7 +26,7 @@ fi
# ceph for the given <branch>~<distro_kind> 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