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 oci-registry builds and CI #240

Merged
merged 12 commits into from
May 21, 2024

Conversation

Jdubrick
Copy link
Contributor

Please specify the area for this PR
Updating CI to support multi-arch image building

What does does this PR do / why we need it:
This PR contains the following changes:

  • Updated build.sh script to allow for easy building of different architecture images, by default linux/amd64 will be built with no arguments passed
  • Updated oci-registry/README.md to reflect the additional functionality of build.sh
  • Updated ci.yaml to include QEMU for Docker so that the workflow can build linux/arm64 images
  • Updated ci.yaml to test the builds for both linux/amd64 and linux/arm64 oci-registry images
  • Created build-multi-arch.sh to enable multi-arch building and pushing for the oci-registry images. This by default will use Docker as github workflows supports that, however, it also allows for podman to be used if we ever switch. This script handles the building of both linux/amd64 and linux/arm64 images, the creation of the image manifest, and the pushing of all 3 items to quay.io/devfile/oci-registry. The architecture specific images will be tagged amd64 and arm64 for their respective images, and the manifest will be tagged next. Users should see no change in their workflow for pulling the quay.io/devfile/oci-registry:next image, it will pull the proper architecture for the OS pulling.
  • Updated pushimage-next.yaml to include QEMU for Docker as well as run the multi-arch script.

Which issue(s) this PR fixes:

fixes devfile/api#1546

PR acceptance criteria:

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

Documentation (WIP)

How to test changes / Special notes to the reviewer:

… functionality

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>
Signed-off-by: Jordan Dubrick <jdubrick@redhat.com>
Signed-off-by: Jordan Dubrick <jdubrick@redhat.com>
Signed-off-by: Jordan Dubrick <jdubrick@redhat.com>
@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label May 16, 2024
Signed-off-by: Jordan Dubrick <jdubrick@redhat.com>
Signed-off-by: Jordan Dubrick <jdubrick@redhat.com>
Copy link
Contributor

@thepetk thepetk left a comment

Choose a reason for hiding this comment

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

Tested locally the scripts and left some comments. One question in general I have is for the manifests and their importance on the script. Mostly because while I've seen this feature in the pas is the first time I see it in action :D

oci-registry/build-multi-arch.sh Outdated Show resolved Hide resolved
oci-registry/build-multi-arch.sh Show resolved Hide resolved
Signed-off-by: Jordan Dubrick <jdubrick@redhat.com>
Signed-off-by: Jordan Dubrick <jdubrick@redhat.com>
Copy link
Contributor

@thepetk thepetk left a comment

Choose a reason for hiding this comment

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

/lgtm tested the scripts locally using my personal quay.io account and they were working correctly.

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label May 20, 2024
Copy link

openshift-ci bot commented May 20, 2024

[APPROVALNOTIFIER] This PR is APPROVED

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

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:

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 6694f0a into devfile:main May 21, 2024
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged.
Projects
None yet
2 participants