Skip to content

Commit

Permalink
Add support for arm64 users to build scripts (#306)
Browse files Browse the repository at this point in the history
* add platform env var for arm64 users

Signed-off-by: Jordan Dubrick <[email protected]>

* update readme for comments

Signed-off-by: Jordan Dubrick <[email protected]>

---------

Signed-off-by: Jordan Dubrick <[email protected]>
  • Loading branch information
Jdubrick authored Feb 28, 2024
1 parent ab9c539 commit e86508a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .ci/build_and_deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ INDEX_IMAGE="${INDEX_IMAGE:-quay.io/app-sre/devfile-index}"
VIEWER_IMAGE="${VIEWER_IMAGE:-quay.io/app-sre/registry-viewer}"
IMAGE_TAG="${IMAGE_TAG:-${GIT_REV}}"
USE_PODMAN=${USE_PODMAN:-false}
# PLATFORM_EV is required by the devfile-web/scripts/build_viewer.sh script
PLATFORM_EV=${PLATFORM_EV:-"linux/amd64"}

# Ensure container engine is set properly for devfile-web scripts
if [[ ${USE_PODMAN} == true ]]; then
Expand All @@ -37,6 +39,8 @@ then
fi
git clone https://github.com/devfile/devfile-web.git $ABSOLUTE_PATH/devfile-web

# export PLATFORM_EV so build_viewer.sh does not fail for MacOS users
export PLATFORM_EV
# Build registry-viewer
bash $ABSOLUTE_PATH/devfile-web/scripts/build_viewer.sh

Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ To build this devfile registry into a container image run `bash .ci/build.sh`. A

From there, push the container image to a container registry of your choice and deploy using a [devfile adopted devtool](https://devfile.io/docs/2.2.0/developing-with-devfiles#tools-that-provide-devfile-support) or one of the methods outlined [here](https://github.com/devfile/registry-support#deploy).

If you are trying to run `bash .ci/build_and_deploy.sh` and are experiencing errors while using MacOS with an apple silicon chip, you should first run `export PLATFORM_EV=linux/arm64` to properly set the container config. By default the containers will be built for `linux/amd64`.

## Devfile Deployments

### Prerequisites
Expand Down

0 comments on commit e86508a

Please sign in to comment.