diff --git a/modules/administration-guide/attachments/restricted-environment/prepare-restricted-environment.sh b/modules/administration-guide/attachments/restricted-environment/prepare-restricted-environment.sh index bc1fcf56da..b91e21737c 100644 --- a/modules/administration-guide/attachments/restricted-environment/prepare-restricted-environment.sh +++ b/modules/administration-guide/attachments/restricted-environment/prepare-restricted-environment.sh @@ -31,7 +31,6 @@ declare devworkspace_operator_index="${devworkspace_operator_index:?Define the v declare devworkspace_operator_package_name="devworkspace-operator" declare devworkspace_operator_version="${devworkspace_operator_version:?Define the variable}" declare prod_operator_index="${prod_operator_index:?Define the variable}" -declare prod_operator_bundle_name="${prod_operator_bundle_name:?Define the variable}" declare prod_operator_package_name="${prod_operator_package_name:?Define the variable}" declare prod_operator_version="${prod_operator_version:?Define the variable}" @@ -46,24 +45,18 @@ mkdir -p "${my_catalog}/${devworkspace_operator_package_name}" "${my_catalog}/${ echo "Fetching metadata for the ${devworkspace_operator_package_name} operator catalog channel, packages, and bundles." opm render "${devworkspace_operator_index}" \ | jq "select(\ - .name == \"${devworkspace_operator_package_name}\" \ - or .package == \"${devworkspace_operator_package_name}\" \ + .name == \"${devworkspace_operator_package_name}.${devworkspace_operator_version}\" \ + and .schema == \"olm.bundle\" \ )" \ > "${my_catalog}/${devworkspace_operator_package_name}/render.json" -# FIXME: filter only the required version to limit the number of related images to mirror. - # or (.package == \"${devworkspace_operator_package_name}\" and .schema == \"olm.channel\" ) \ - # or .name == \"${devworkspace_operator_package_name}.${devworkspace_operator_version}\" \ echo "Fetching metadata for the ${prod_operator_package_name} operator catalog channel, packages, and bundles." opm render "${prod_operator_index}" \ | jq "select(\ - .name == \"${prod_operator_package_name}\" \ - or .package == \"${prod_operator_package_name}\" \ + .name == \"${prod_operator_package_name}.${prod_operator_version}\" \ + and .schema == \"olm.bundle\" \ )" \ > "${my_catalog}/${prod_operator_package_name}/render.json" -# FIXME: filter only the required version to limit the number of related images to mirror. - # or (.package == \"${prod_operator_package_name}\" and .schema == \"olm.channel\" ) \ - # or .name == \"${prod_operator_bundle_name}.${prod_operator_version}\" \ echo "Creating the catalog dockerfile." if [ -f "${my_catalog}.Dockerfile" ]; then @@ -106,7 +99,7 @@ apiVersion: org.eclipse.che/v2 spec: containerRegistry: hostname: "$my_registry" - organization: "${my_catalog}" + organization: "$my_catalog" EOF echo "Removing index image from mappings.txt to prepare mirroring." diff --git a/modules/administration-guide/partials/snip_preparing-images-for-a-restricted-environment.adoc b/modules/administration-guide/partials/snip_preparing-images-for-a-restricted-environment.adoc index 1a040d81cf..61cb457274 100644 --- a/modules/administration-guide/partials/snip_preparing-images-for-a-restricted-environment.adoc +++ b/modules/administration-guide/partials/snip_preparing-images-for-a-restricted-environment.adoc @@ -37,9 +37,9 @@ $ bash prepare-restricted-environment.sh \ --devworkspace_operator_index "{devworkspace-operator-index}" \ --devworkspace_operator_version "v{devworkspace-operator-version-patch}" \ --prod_operator_index "{prod-operator-index}" \ - --prod_operator_bundle_name "{prod-operator-bundle-name}" \ --prod_operator_package_name "{prod-operator-package-name}" \ --prod_operator_version "v{prod-ver-patch}" \ - --my_registry "____" + --my_registry "____" \ + --my_catalog "____" ----