diff --git a/.ci/build_and_deploy.sh b/.ci/build_and_deploy.sh index 105f6ecb..6b0326dc 100755 --- a/.ci/build_and_deploy.sh +++ b/.ci/build_and_deploy.sh @@ -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 @@ -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 diff --git a/README.md b/README.md index 3a48bdbd..cd403247 100644 --- a/README.md +++ b/README.md @@ -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