Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generate catalog for 4.17 with olm.csv.metadata #3012

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

😅 nice level argument

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah.

ᐅ opm alpha render-template basic -h
Generate a file-based catalog from a single 'basic template' file
When FILE is '-' or not provided, the template is read from standard input

Usage:
  opm alpha render-template basic basic-template-file [flags]

Flags:
  -h, --help                   help for basic
      --migrate-level string   Name of the last migration to run (default: none)
                               
                               The migrator will run all migrations up to and including the selected level.
                               
                               Available migrators:
                                 - none                          : do nothing
                                 - bundle-object-to-csv-metadata : migrates bundles' "olm.bundle.object" to "olm.csv.metadata"

# 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
Loading