From cc3c18c6d03a25921b0e008c931438c9a1d3af69 Mon Sep 17 00:00:00 2001 From: Patryk Matuszak <305846+pmtk@users.noreply.github.com> Date: Thu, 9 Feb 2023 11:41:36 +0100 Subject: [PATCH] optional pull-secret for extracting lvms bundle --- scripts/auto-rebase/rebase.sh | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/scripts/auto-rebase/rebase.sh b/scripts/auto-rebase/rebase.sh index 1e481d4d356..59aa89b4df4 100755 --- a/scripts/auto-rebase/rebase.sh +++ b/scripts/auto-rebase/rebase.sh @@ -53,12 +53,19 @@ download_lvms_operator_bundle_manifest(){ title 'downloading LVMS operator bundles' local LVMS_STAGING="${STAGING_DIR}/lvms" + authentication="" + if [ -f "${PULL_SECRET_FILE}" ]; then + authentication="--registry-config ${PULL_SECRET_FILE}" + else + >&2 echo "Warning: no pull secret found at ${PULL_SECRET_FILE}" + fi + for arch in ${ARCHS[@]}; do mkdir -p "$LVMS_STAGING/$arch" pushd "$LVMS_STAGING/$arch" || return 1 title "extracting lvms operator bundle for \"$arch\" architecture" oc image extract \ - --registry-config "$PULL_SECRET_FILE" \ + ${authentication} \ --path /manifests/:. "$bundle_manifest" \ --filter-by-os "$arch" \ || {