]> git.apps.os.sepia.ceph.com Git - ceph-build.git/commitdiff
ceph-dev-*-build: reset CI_CONTAINER when building octopus for el7 1700/head
authorKefu Chai <kchai@redhat.com>
Thu, 2 Jul 2020 13:29:15 +0000 (21:29 +0800)
committerKefu Chai <kchai@redhat.com>
Thu, 12 Nov 2020 05:40:47 +0000 (13:40 +0800)
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 <kchai@redhat.com>
ceph-dev-build/build/build_rpm
ceph-dev-new-build/build/build_rpm
scripts/build_utils.sh

index c36d33ec526ecf26ace0b1a39a850e8b3f8726f0..f4d12b72676a3a3f2f34266824128d38f1a3dcc7 100644 (file)
@@ -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}
index 9c094b095a3a9f21d7ccf3902b7adff57d866f0e..e09408c136839a2118978a7bf27c86e681c3a109 100644 (file)
@@ -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}
index 9eb683ca12e2c7ac5ba2abb7d97f10f14ffff010..df9c08ac61d77f6e5248a563c05fca5a49d00192 100644 (file)
@@ -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
+}