diff --git a/core/files_artifacts_expander/scripts/build.sh b/core/files_artifacts_expander/scripts/build.sh index 0bbd9e7a11..ba8bfedc10 100755 --- a/core/files_artifacts_expander/scripts/build.sh +++ b/core/files_artifacts_expander/scripts/build.sh @@ -15,7 +15,7 @@ source "${script_dirpath}/_constants.env" BUILD_DIRNAME="build" DEFAULT_SKIP_DOCKER_IMAGE_BUILDING=false -DEFAULT_ARCHITECTURE_TO_BUILD="$(arch)" +DEFAULT_ARCHITECTURE_TO_BUILD=amd64 MAIN_GO_FILEPATH="${expander_root_dirpath}/main.go" MAIN_BINARY_OUTPUT_FILENAME="files-artifacts-expander" diff --git a/core/server/api_container/server/startosis_engine/startosis_validator.go b/core/server/api_container/server/startosis_engine/startosis_validator.go index 5b21fcda19..cfaadf52d5 100644 --- a/core/server/api_container/server/startosis_engine/startosis_validator.go +++ b/core/server/api_container/server/startosis_engine/startosis_validator.go @@ -23,13 +23,15 @@ import ( const ( validationInProgressMsg = "Validating Starlark code and downloading container images - execution will begin shortly" - containerDownloadedImagesMsgHeader = "Container images used in this run:" - containerDownloadedImagesMsgFromLocal = "locally cached" - containerDownloadedImagesMsgFromRemote = "remotely downloaded" - containerDownloadedImagesMsgLineFormat = "> %s - %s - %s" + containerDownloadedImagesMsgHeader = "Container images used in this run:" + containerDownloadedImagesMsgFromLocal = "locally cached" + containerDownloadedImagesMsgFromRemote = "remotely downloaded" + containerDownloadedImagesMsgLineFormat = "> %s - %s" + containerImageArchWarningHeaderFormat = "Container images with different architecture than expected(%s):" containerImageArchitectureMsgLineFormat = "> %s - %s" - linebreak = "\n" + + linebreak = "\n" ) type StartosisValidator struct { @@ -221,12 +223,12 @@ func sendContainerImageSummaryInfoMsg( architecture := validatedImage.GetArchitecture() - if validatedImage.GetArchitecture() != runtime.GOARCH { - imageWithIncorrectArchLine := fmt.Sprintf(containerImageArchitectureMsgLineFormat, image, validatedImage.GetArchitecture()) + if architecture != runtime.GOARCH { + imageWithIncorrectArchLine := fmt.Sprintf(containerImageArchitectureMsgLineFormat, image, architecture) imagesWithIncorrectArchLines = append(imagesWithIncorrectArchLines, imageWithIncorrectArchLine) } - imageLine := fmt.Sprintf(containerDownloadedImagesMsgLineFormat, image, pulledFromStr, architecture) + imageLine := fmt.Sprintf(containerDownloadedImagesMsgLineFormat, image, pulledFromStr) imageLines = append(imageLines, imageLine) } diff --git a/core/server/scripts/build.sh b/core/server/scripts/build.sh index e5dcd576fc..4c85ba2f0e 100755 --- a/core/server/scripts/build.sh +++ b/core/server/scripts/build.sh @@ -13,7 +13,7 @@ source "${script_dirpath}/_constants.env" BUILD_DIRNAME="build" DEFAULT_SKIP_DOCKER_IMAGE_BUILDING=false -DEFAULT_ARCHITECTURE_TO_BUILD="$(arch)" +DEFAULT_ARCHITECTURE_TO_BUILD=amd64 MAIN_DIRNAME="api_container" MAIN_GO_FILEPATH="${server_root_dirpath}/${MAIN_DIRNAME}/main.go" diff --git a/engine/server/scripts/build.sh b/engine/server/scripts/build.sh index a2c34de090..b4b0ee5e6d 100755 --- a/engine/server/scripts/build.sh +++ b/engine/server/scripts/build.sh @@ -14,7 +14,7 @@ source "${script_dirpath}/_constants.env" BUILD_DIRNAME="build" DEFAULT_SKIP_DOCKER_IMAGE_BUILDING=false -DEFAULT_ARCHITECTURE_TO_BUILD="$(arch)" +DEFAULT_ARCHITECTURE_TO_BUILD=amd64 MAIN_DIRNAME="engine" MAIN_GO_FILEPATH="${engine_root_dirpath}/${MAIN_DIRNAME}/main.go" diff --git a/scripts/docker-image-builder.sh b/scripts/docker-image-builder.sh index 22b404f117..dffcd64f56 100755 --- a/scripts/docker-image-builder.sh +++ b/scripts/docker-image-builder.sh @@ -41,8 +41,7 @@ if "${push_to_registry_container}"; then buildx_platform_arg='linux/arm64/v8,linux/amd64' push_flag='--push' else - arch="$(arch)" - buildx_platform_arg="linux/${arch}" + buildx_platform_arg='linux/amd64' # TODO: infer the local arch if that's reasonable push_flag='--load' fi echo "Building docker image for architecture '${buildx_platform_arg}' with flag '${push_flag}'"