Skip to content

Conversation

estroz
Copy link
Member

@estroz estroz commented Jan 19, 2021

Description of the change:

  • internal/plugins/manifests: added catalog-build, catalog-push, and opm targets to Makefile, and improve variables/comments for ease of use.

Motivation for the change: this addition to the Makefile allows users to create catalog images with opm index add. They can string together make rules like so:

make bundle-build bundle-push catalog-build catalog-push BUNDLE_IMG=${SOME_BUNDLE_IMG} CATALOG_IMG=${SOME_CATALOG_IMG}

or if IMAGE_TAG_BASE is set to an existing repo:

export IMAGE_TAG_BASE=quay.io/example/my-operator make bundle-build bundle-push catalog-build catalog-push

which will build and push quay.io/example/my-operator-bundle:v0.0.1 and quay.io/example/my-operator-catalog:v0.0.1.

Enhancement: enhancements/operator-sdk-builds-catalogs.md

Signed-off-by: Eric Stroczynski ericstroczynski@gmail.com

Checklist

If the pull request includes user-facing changes, extra documentation is required:

@estroz
Copy link
Member Author

estroz commented Jan 20, 2021

@camilamacedo86 this is the opm integration I was talking about earlier today.

Copy link
Contributor

@camilamacedo86 camilamacedo86 left a comment

Choose a reason for hiding this comment

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

just a few questions and nits. Otherwise, it shows great. 🥇

@estroz estroz force-pushed the feature/build-catalog branch 2 times, most recently from 8853d20 to 215f778 Compare February 22, 2021 20:58
Copy link
Member

@rashmigottipati rashmigottipati left a comment

Choose a reason for hiding this comment

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

Missing changelog fragment.

Overall, it looks great.

targets to Makefile Signed-off-by: Eric Stroczynski <ericstroczynski@gmail.com>
@estroz estroz force-pushed the feature/build-catalog branch from 21b7891 to a075a66 Compare February 23, 2021 00:18
@estroz estroz changed the title (manifests/v1) add 'opm index add' and 'opm' download targets to Makefile (manifests/v2) add catalog targets to Makefile Feb 23, 2021
Copy link
Member

@rashmigottipati rashmigottipati left a comment

Choose a reason for hiding this comment

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

/lgtm

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Feb 23, 2021
@estroz estroz closed this Mar 4, 2021
@estroz estroz reopened this Mar 4, 2021
@estroz estroz temporarily deployed to deploy March 4, 2021 19:07 Inactive
@estroz estroz temporarily deployed to deploy March 4, 2021 19:07 Inactive
@estroz estroz temporarily deployed to deploy March 4, 2021 19:07 Inactive
@estroz estroz temporarily deployed to deploy March 4, 2021 19:07 Inactive
@estroz estroz temporarily deployed to deploy March 4, 2021 19:07 Inactive
@estroz estroz temporarily deployed to deploy March 4, 2021 19:07 Inactive
@openshift-ci-robot openshift-ci-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Mar 4, 2021
# https://github.com/operator-framework/community-operators/blob/7f1438c/docs/packaging-operator.md#updating-your-existing-operator
.PHONY: catalog-build
catalog-build: opm ## Build a catalog image.
$(OPM) index add --mode semver --tag $(CATALOG_IMG) --bundles $(BUNDLE_IMGS) $(FROM_INDEX_OPT)
Copy link
Contributor

Choose a reason for hiding this comment

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

$ make catalog-build
./bin/opm index add --mode semver --tag my.domain/testcas-catalog:v0.0.1 --bundles my.domain/testcas-bundle:v0.0.1
INFO[0000] building the index bundles="[my.domain/testcas-bundle:v0.0.1]"
Error: Binary was compiled with 'CGO_ENABLED=0', go-sqlite3 requires cgo to work. This is a stub
Usage:
opm index add [flags]

Copy link
Member Author

Choose a reason for hiding this comment

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

How did you install opm? It looks like you installed it from source locally, since the released binaries are all installed with CGO_ENABLED=1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lgtm Indicates that a PR is ready to be merged.
4 participants