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

build-controller-release.sh should also optionally create the OLM bundle on disk to be committed #972

Closed
komish opened this issue Sep 22, 2021 · 1 comment · Fixed by aws-controllers-k8s/code-generator#207
Assignees
Labels
kind/enhancement Categorizes issue or PR as related to existing feature enhancements.

Comments

@komish
Copy link
Contributor

komish commented Sep 22, 2021

Is your feature request related to a problem?

No

Describe the solution you'd like

When build-controller-release.sh is called, the logic should go ahead and build all OLM assets. It's currently building most of them, but not actually building the bundle to commit to a repository.

The OLM workflow that already exists is conditional: https://github.com/aws-controllers-k8s/code-generator/blob/main/scripts/build-controller-release.sh#L241-L255.

We probably just want to extend this so that it also runs olm-create-bundle.sh with the proper inputs.

Describe alternatives you've considered

Doing this separately would also work, but I can't see a reason why wouldn't do it since we're already generating additional things conditionally. It also makes sense, considering a bundle represents a version, and the build-controller-release.sh gets tagged as a release here on Github.

Additional Info

As an example, something like this being added in this block would probably accomplish this. Note that I this strips out the v from the version tag.

    OLM_RELEASE_VERSION=$(echo $RELEASE_VERSION | tr -d "v")
    $SCRIPTS_DIR/olm-create-bundle.sh "$SERVICE" "$OLM_RELEASE_VERSION"

A PR that closes this would also need to account for the case where the user has no provided a release tag - the default value for RELEASE_VERSION (here) would not work with the above example.

@komish komish added the kind/enhancement Categorizes issue or PR as related to existing feature enhancements. label Sep 22, 2021
@trgeiger
Copy link
Contributor

/assign

trgeiger added a commit to trgeiger/ack-code-generator that referenced this issue Sep 23, 2021
in build-controller-release.sh.

Also includes renaming some variables and fixing up their default values
in olm-create-bundle.sh to match changes made in
build-controller-release, and to prevent any confusion between
ACK_GENERATE_IMAGE_REPOSITORY, which was being used in different ways in
these two scripts.

Addresses issue aws-controllers-k8s/community#972
ack-bot pushed a commit to aws-controllers-k8s/code-generator that referenced this issue Sep 24, 2021
…#207)

Issue #, if available: 972

Description of changes:
Adds `olm-create-bundle.sh` to the OLM conditional block of `build-controller-release.sh`. Also adds stripping the 'v' from `$BUNDLE_RELEASE` to prevent any breakage if the user has that variable including a 'v.'

fixes aws-controllers-k8s/community#972

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/enhancement Categorizes issue or PR as related to existing feature enhancements.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants