The base image (quay.io/ceph/daemon-base:latest-main) may lag behind
the source tree for any number of mgr Python modules. Rather than
copying files individually as mismatches are discovered, copy all
*.py files from src/pybind/mgr/ into /usr/share/ceph/mgr/ so the
test image always reflects the current state of the codebase.
Signed-off-by: David Galloway <david.galloway@ibm.com>
COPY ./tmp_build/orchestrator /usr/share/ceph/mgr/orchestrator
COPY ./tmp_build/rook /usr/share/ceph/mgr/rook
COPY ./tmp_build/ceph/ /usr/lib/python3.9/site-packages/ceph/
+COPY ./tmp_build/*.py /usr/share/ceph/mgr/
+
cp ./../../orchestrator/*.py tmp_build/orchestrator
cp ../*.py tmp_build/rook
cp -r ../../../../../src/python-common/ceph/ tmp_build/
+ # Copy all mgr Python modules from source tree to override stale versions in base image
+ cp ${CEPH_DEV_FOLDER}/src/pybind/mgr/*.py tmp_build/
$CONTAINER_RUNTIME build --tag ${LOCAL_CEPH_IMG} .
$CONTAINER_RUNTIME tag ${LOCAL_CEPH_IMG} ${CURR_CEPH_IMG}