Skip to content

Commit

Permalink
Fix condition for release pipe
Browse files Browse the repository at this point in the history
  • Loading branch information
jaroslav-fedor-swi committed Oct 17, 2024
1 parent a7fa75e commit f598fb5
Showing 1 changed file with 12 additions and 11 deletions.
23 changes: 12 additions & 11 deletions cmake/docker-utils.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ function(build_custom_docker_image IMAGE_NAME)
endforeach()

# Get the value of the environment variable ENABLE_ARM64_BUILD
if (DEFINED ENV{ENABLE_ARM64_BUILD} AND ENV{ENABLE_ARM64_BUILD})
if (DEFINED ENV{ENABLE_ARM64_BUILD} AND "$ENV{ENABLE_ARM64_BUILD}" STREQUAL "TRUE")
set(ENABLE_ARM64_BUILD TRUE)
else()
set(ENABLE_ARM64_BUILD FALSE)
Expand All @@ -164,18 +164,19 @@ function(build_custom_docker_image IMAGE_NAME)
COMMAND
docker buildx build --platform linux/amd64 -t "${IMAGE_NAME}" ${DOCKER_ARGS} .
)
if (ENABLE_ARM64_BUILD)
add_custom_command(
TARGET
"${IMAGE_NAME}-docker"
WORKING_DIRECTORY
"${out_path}"
COMMAND
docker buildx build --platform linux/arm64 -t "${IMAGE_NAME}-arm64" ${DOCKER_ARGS} .
)
endif()
endif()

if (RUN_DOCKER_COMMANDS AND ENABLE_ARM64_BUILD)
add_custom_command(
TARGET
"${IMAGE_NAME}-docker"
WORKING_DIRECTORY
"${out_path}"
COMMAND
docker buildx build --platform linux/arm64 -t "${IMAGE_NAME}-arm64" ${DOCKER_ARGS} .
)
endif()


###########################
# push to docker registry #
Expand Down

0 comments on commit f598fb5

Please sign in to comment.