Skip to content

Commit

Permalink
Generate catalog for 4.17 with olm.csv.metadata (#3012)
Browse files Browse the repository at this point in the history
  • Loading branch information
mgencur authored Nov 12, 2024
1 parent 410b797 commit 7f68aff
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion hack/generate/catalog.sh
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,15 @@ function generate_catalog {
add_channel "${catalog_template}" "$channel" "$(metadata.get 'olm.replaces')"
done < <(metadata.get 'olm.channels.list[*]')

level=none
# For 4.17 and newer the olm.bundle.object must be converted to olm.csv.metadata
# See https://github.com/konflux-ci/build-definitions/blob/main/task/fbc-validation/0.1/USAGE.md#bundle-metadata-in-the-appropriate-format.
if versions.ge "$ocp_version" "4.17" ; then
level="bundle-object-to-csv-metadata"
fi

# Generate full catalog
opm alpha render-template basic "${catalog_template}" -oyaml \
opm alpha render-template basic --migrate-level="$level" "${catalog_template}" -oyaml \
> "${index_dir}/v${ocp_version}/catalog/serverless-operator/catalog.yaml"

# Replace quay.io with registry.redhat.io for bundle image.
Expand Down

0 comments on commit 7f68aff

Please sign in to comment.