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

Multi Arch Support for Registry Operator #90

Merged
merged 9 commits into from
Jun 10, 2024

Conversation

Jdubrick
Copy link
Contributor

@Jdubrick Jdubrick commented May 22, 2024

Please specify the area for this PR
CI and multi-arch building

What does does this PR do / why we need it:
This PR enables the images built for the registry-operator to be multi-arch. Previously there was a make command make docker-buildx that built and pushed multi-arch images but it was not included in any of our CI. This PR updates that command to incorporate it into our CI alongside a new command, make docker-bundle-buildx to allow the bundle to also be built for multiple architectures.

Since buildx is a docker command I also created a make podman-buildx command, this is a clone of make docker-buildx but redesigned to work with podman and its specific commands.

Both ci.yaml and dockerimage-push.yaml were updated to now reference the buildx commands for building and pushing our images so that they support multiple architectures. Due to the nature of how buildx works with the --push flag, I had to create the make variable PUSH_IMAGE which defaults to true. This variable allows us to control if we want the image to be pushed to a repository or not, in the case of ci.yaml we only want to test the builds when a PR is opened and this enables it to do so.

Which issue(s) this PR fixes:

fixes devfile/api#1549

PR acceptance criteria:

  • Test Coverage
    • Are your changes sufficiently tested, and are any applicable test cases added or updated to cover your changes?
  • Gosec scans

Documentation

  • Does the registry operator documentation need to be updated with your changes?

Testing changes

Running Unit Tests

Running Integration Tests

Special notes to the reviewer:
You can test the commands locally by performing the following:

  • Run IMG=<your repo> make docker-buildx-push to create a multi-arch operator image and have it pushed to your repo of choice
  • Run BUNDLE_IMG=<your repo> make docker-bundle-buildx-push to create a multi-arch bundle image and have it pushed to your repo of choice
  • Run IMG=<your repo> make podman-buildx-build && make podman-buildx-push to create a multi-arch operator image using podman and have it pushed
  • Run IMG=<your repo> infront of make docker-buildx-build, or make podman-buildx-build to build the images but not have them pushed to your repo
    • E.g. IMG=<your repo> make docker-buildx-build
  • Run BUNDLE_IMG=<your repo> make docker-bundle-buildx-build to build the bundle but not have it pushed

Signed-off-by: Jordan Dubrick <jdubrick@redhat.com>
Signed-off-by: Jordan Dubrick <jdubrick@redhat.com>
Signed-off-by: Jordan Dubrick <jdubrick@redhat.com>
Signed-off-by: Jordan Dubrick <jdubrick@redhat.com>
Signed-off-by: Jordan Dubrick <jdubrick@redhat.com>
Copy link
Member

@johnmcollier johnmcollier left a comment

Choose a reason for hiding this comment

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

Just one comment

.github/workflows/ci.yaml Outdated Show resolved Hide resolved
Signed-off-by: Jordan Dubrick <jdubrick@redhat.com>
Signed-off-by: Jordan Dubrick <jdubrick@redhat.com>
Signed-off-by: Jordan Dubrick <jdubrick@redhat.com>
Signed-off-by: Jordan Dubrick <jdubrick@redhat.com>
Copy link

openshift-ci bot commented Jun 10, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: Jdubrick, johnmcollier

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:
  • OWNERS [Jdubrick,johnmcollier]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@Jdubrick Jdubrick merged commit 1e66505 into devfile:main Jun 10, 2024
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants