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

Enable Multi-Arch Building and Pushing for registry viewer #125

Merged
merged 9 commits into from
Jun 6, 2024

Conversation

Jdubrick
Copy link
Contributor

What does this PR do / why we need it

Updates CI to allow for the registry viewer to be built for multiple architectures. A list of changes are explained below:

  • Added scripts/build_multi_arch.sh which allows for the registry viewer to be built and pushed for multiple architectures. This script also supports both podman and docker so we are free to use whatever engine is available. Currently we are using docker as part of the github actions where this script is being called.
  • Added github action setups for both qemu and docker buildx to ci.yaml and pushimage-next.yaml to support the building of multi-arch images.
  • Added a new timeout value to our main Dockerfile so that Yarn install will not timeout prematurely. When building for a different architecture the emulation can be slow and Yarn was timing out before completion.
  • Previously the landing-page and registry-viewer apps were calling a docker-build command as part of our CI to check the builds. These commands have been split so there are dedicated commands for each architecture. Previously by combining them and building with buildx for multi-arch was running into context issues.

Which issue(s) does this PR fix

fixes devfile/api#1548

PR acceptance criteria

  • Unit Tests
  • E2E Tests
  • Documentation
    Update the sidebar if there is a new file added or an existing filename is changed

How to test changes / Special notes to the reviewer

@Jdubrick Jdubrick force-pushed the feat/multi-arch-build branch from 1e0757c to c8ef2d3 Compare June 6, 2024 15:39
# This increases the timeout period so it can properly download dependencies
# Value is in milliseconds and is set to 60 minutes
# To increase/decrease you can override via --build-arg YARN_TIMEOUT=x in your build command
ARG YARN_TIMEOUT=3600000
Copy link
Member

Choose a reason for hiding this comment

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

Does this mean a build might take close to one hour when this action runs?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The longest I've observed so far is around 30 minutes, I just increased it so we have a buffer since it is known to take a while. If GitHub supports arm64 runners in the future (the ones we use and not the large runners in which they now support arm), we'd be able to build the arm64 image in minutes.

Copy link
Member

@maysunfaisal maysunfaisal left a comment

Choose a reason for hiding this comment

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

/lgtm

just one simple Q.

Copy link

openshift-ci bot commented Jun 6, 2024

[APPROVALNOTIFIER] This PR is APPROVED

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

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 2a3e569 into devfile:main Jun 6, 2024
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Implement multi-arch image building for registry-viewer
2 participants