From a3f26c8ab781a5ffe54aedf45be9e373bede4d6c Mon Sep 17 00:00:00 2001 From: Kefu Chai Date: Thu, 2 Jul 2020 21:29:15 +0800 Subject: [PATCH] ceph-dev-*-build: reset CI_CONTAINER when building octopus for el7 because the consumers of ceph container images are referencing the required images using "${CONTAINER_REPO_HOSTNAME}/${CONTAINER_REPO_ORGANIZATION}/ceph:${SHA1}". see ceph-container/contrib/build-push-ceph-container-imgs.sh. but in a recent change, we push both the images built for el7 and for el8 with the same tag. and the last one wins. this breaks the tests which expect the cephadm and other tools included in an image built for el8. but these tools are not included by el7 because of the missing dependencies. so we have at least two options - stop building octopus+el7 container images - use a different tag for octopus+el7 to avoid the racing and name collision. before the 2nd change lands on ceph-container, we should have the 1st one in ceph-build to unblock the builds of octopus. Fixes: https://tracker.ceph.com/issues/48162 Signed-off-by: Kefu Chai --- ceph-dev-build/build/build_rpm | 2 ++ ceph-dev-new-build/build/build_rpm | 2 ++ scripts/build_utils.sh | 10 ++++++++++ 3 files changed, 14 insertions(+) diff --git a/ceph-dev-build/build/build_rpm b/ceph-dev-build/build/build_rpm index c36d33ec..f4d12b72 100644 --- a/ceph-dev-build/build/build_rpm +++ b/ceph-dev-build/build/build_rpm @@ -6,6 +6,8 @@ set -ex # set of shell scripts and repos involved. CI_CONTAINER=${CI_CONTAINER:-false} +maybe_reset_ci_container + # create a release directory for ceph-build tools mkdir -p release cp -a dist release/${vers} diff --git a/ceph-dev-new-build/build/build_rpm b/ceph-dev-new-build/build/build_rpm index 9c094b09..e09408c1 100644 --- a/ceph-dev-new-build/build/build_rpm +++ b/ceph-dev-new-build/build/build_rpm @@ -7,6 +7,8 @@ set -ex # set of shell scripts and repos involved. CI_CONTAINER=${CI_CONTAINER:-false} +maybe_reset_ci_container + # create a release directory for ceph-build tools mkdir -p release cp -a dist release/${vers} diff --git a/scripts/build_utils.sh b/scripts/build_utils.sh index 9eb683ca..df9c08ac 100644 --- a/scripts/build_utils.sh +++ b/scripts/build_utils.sh @@ -1287,3 +1287,13 @@ EOF ${build_area}/SPECS/ceph-release.spec fi } + +maybe_reset_ci_container() { + if ! "$CI_CONTAINER"; then + return + fi + if [[ "$BRANCH" =~ octopus && "$DIST" == centos7 ]]; then + echo "disabling CI container build for $BRANCH" + CI_CONTAINER=false + fi +} -- 2.39.5