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

SDCICD-1358: custom task to get OLM bundle version #1255

Merged
merged 1 commit into from
Aug 9, 2024

Commits on Aug 6, 2024

  1. SDCICD-1358: custom task to get OLM bundle version

    this is needed to string together the dynamic bundle generation task to
    the catalog generation task. The bundle ref is stored as a param in the
    catalog pipeline (nudged), we need to fetch the version that was put in
    the bundle to add an entry into the catalog with it.
    
    ```
    ❯ opm render ${BUNDLE_IMAGE}
    {
        "schema": "olm.bundle",
        "name": "osd-example-operator.v4.16.0-28f1940",
        "package": "osd-example-operator",
        "image": "quay.io/redhat-user-workloads/oeo-cicada-tenant/osd-example-operator/bundle@sha256:5485652c17ab8ac5cf44452f67e15ed06dc9d2d7d67a7f079e76248878d5370e",
        "properties": [
            {
                "type": "olm.gvk",
                "value": {
                    "group": "managed.openshift.io",
                    "kind": "Example",
                    "version": "v1alpha1"
                }
            },
            {
                "type": "olm.package",
                "value": {
                    "packageName": "osd-example-operator",
                    "version": "4.16.0-28f1940"
                }
            },
    ...
    ❯ opm render ${BUNDLE_IMAGE} \
              | sed -n '/"type": "olm.package"/,/}/p' \
              | sed -n 's/.*"version": "\(.*\)".*/\1/p'
              | tr -d '\n'
    4.16.0-28f1940
    ```
    
    https://github.com/openshift/osd-example-operator/blob/971083313e7eb4c7383c04a2067ac80ae535946c/.tekton/catalog-push.yaml#L176-L211
    
    https://issues.redhat.com/browse/SDCICD-1358
    
    Signed-off-by: Brady Pratt <[email protected]>
    jbpratt committed Aug 6, 2024
    Configuration menu
    Copy the full SHA
    13f5b5f View commit details
    Browse the repository at this point in the history