Reference unstable bundle in unstable index by digests
This is done to avoid unaligned contents between the csv version/timestamp in the bundle, to the one in the index db.
@@ -43,11 +43,9 @@ function create_index_image() {
docker build -t "${BUNDLE_IMAGE_NAME}" -f bundle.Dockerfile --build-arg "VERSION=${CURRENT_VERSION}" .
docker push "${BUNDLE_IMAGE_NAME}"
- # In case of stable version, extract the digest of the bundle image, to be added to the index image
- # Otherwise use a floating tag for the unstable bundle image.
- if [[ "${UNSTABLE}" != "UNSTABLE" ]]; then
+ # Referencing the unstable bundle digest in the index image, rather than the floating tag, to avoid
+ # unalignment between cached index image and fetched bundle image.
BUNDLE_IMAGE_NAME=$("${PROJECT_ROOT}/tools/digester/digester" --image "${BUNDLE_IMAGE_NAME}")
- fi
# shellcheck disable=SC2086
${OPM} index add --bundles "${BUNDLE_IMAGE_NAME}" ${INDEX_IMAGE_PARAM} --tag "${INDEX_IMAGE_NAME}" -u docker --mode semver
