Skip to content

Commit

Permalink
fixes raw/cloudstack builds (#2404)
Browse files Browse the repository at this point in the history
  • Loading branch information
jaxesn authored Aug 19, 2023
1 parent 79acc44 commit ce32426
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 4 deletions.
9 changes: 9 additions & 0 deletions projects/kubernetes-sigs/image-builder/build/build_image.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,15 @@ elif [[ "$image_os" == "redhat" ]]; then
image_os_version_arg="--os-version $image_os_version"
fi

if [ ! -f "${HOME}/image-builder" ]; then
ARCH="arm64"
if [[ "$(uname -m)" == "x86_64" ]]; then
ARCH="amd64"
fi

cp "$MAKE_ROOT/../../aws/image-builder/_output/bin/image-builder/linux-$ARCH/image-builder" "${HOME}"
fi

image_builder_config_file="${HOME}/image_builder_config_file"
redhat_config_file="${HOME}/redhat_config_file"
if [[ $image_os == "redhat" ]]; then
Expand Down
2 changes: 1 addition & 1 deletion projects/kubernetes-sigs/image-builder/buildspecs/ami.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,5 @@ phases:

build:
commands:
- make binaries -C $CLI_FOLDER && cp $CLI_FOLDER/_output/bin/image-builder/linux-$(go env GOARCH)/image-builder $HOME
- make binaries -C $CLI_FOLDER
- if make check-for-supported-release-branch -C $PROJECT_PATH; then make release IMAGE_OS=$IMAGE_OS IMAGE_FORMAT=ami RELEASE_BRANCH=$RELEASE_BRANCH -C $PROJECT_PATH; fi
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,5 @@ phases:

build:
commands:
- make binaries -C $CLI_FOLDER && cp $CLI_FOLDER/_output/bin/image-builder/linux-$(go env GOARCH)/image-builder $HOME
- make binaries -C $CLI_FOLDER
- if make check-for-supported-release-branch -C $PROJECT_PATH; then make release IMAGE_OS=$IMAGE_OS IMAGE_FORMAT=cloudstack RELEASE_BRANCH=$RELEASE_BRANCH -C $PROJECT_PATH; fi
2 changes: 1 addition & 1 deletion projects/kubernetes-sigs/image-builder/buildspecs/ova.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,5 @@ phases:

build:
commands:
- make binaries -C $CLI_FOLDER && cp $CLI_FOLDER/_output/bin/image-builder/linux-$(go env GOARCH)/image-builder $HOME
- make binaries -C $CLI_FOLDER
- if make check-for-supported-release-branch -C $PROJECT_PATH; then make release IMAGE_OS=$IMAGE_OS IMAGE_FORMAT=ova RELEASE_BRANCH=$RELEASE_BRANCH -C $PROJECT_PATH; fi
2 changes: 1 addition & 1 deletion projects/kubernetes-sigs/image-builder/buildspecs/raw.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,5 @@ phases:

build:
commands:
- make binaries -C $CLI_FOLDER && cp $CLI_FOLDER/_output/bin/image-builder/linux-$(go env GOARCH)/image-builder $HOME
- make binaries -C $CLI_FOLDER
- if make check-for-supported-release-branch -C $PROJECT_PATH; then make release IMAGE_OS=$IMAGE_OS IMAGE_FORMAT=raw RELEASE_BRANCH=$RELEASE_BRANCH -C $PROJECT_PATH; fi

0 comments on commit ce32426

Please sign in to comment.