From b8fac618fe0c490b414a2f4e4126f3c1d337e8c6 Mon Sep 17 00:00:00 2001 From: Martin Gencur Date: Thu, 17 Oct 2024 17:38:20 +0200 Subject: [PATCH] Option to force Konflux Index This is for periodic runs where we'll use the latest available Konflux index. Periodic runs in CI have OPENSHIFT_CI variable set so we need to have an option to force the Konflux index. --- hack/lib/catalogsource.bash | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/hack/lib/catalogsource.bash b/hack/lib/catalogsource.bash index d2acaf309a..6dda5f422d 100644 --- a/hack/lib/catalogsource.bash +++ b/hack/lib/catalogsource.bash @@ -23,9 +23,9 @@ function install_catalogsource { index_image="${INDEX_IMAGE}" - # Build bundle and index images only when running in CI or when DOCKER_REPO_OVERRIDE is defined. - # Otherwise the latest nightly build will be used for CatalogSource. - if [ -n "$OPENSHIFT_CI" ] || [ -n "$DOCKER_REPO_OVERRIDE" ]; then + # Build bundle and index images only when running in CI or when DOCKER_REPO_OVERRIDE is defined, + # unless overridden by FORCE_KONFLUX_INDEX. + if { [ -n "$OPENSHIFT_CI" ] || [ -n "$DOCKER_REPO_OVERRIDE" ]; } && [ -z "$FORCE_KONFLUX_INDEX" ]; then index_image=image-registry.openshift-image-registry.svc:5000/$OLM_NAMESPACE/serverless-index:latest rootdir="$(dirname "$(dirname "$(dirname "$(realpath "${BASH_SOURCE[0]}")")")")"