diff --git a/shell/lib/docker.sh b/shell/lib/docker.sh index 9af676a6..0c025a65 100644 --- a/shell/lib/docker.sh +++ b/shell/lib/docker.sh @@ -157,10 +157,12 @@ docker_buildx_args() { tags+=("$image") if [[ -n $arch ]]; then local remoteImageName - local pullRegistry - pullRegistry="$(get_docker_pull_registry)" - remoteImageName="$(determine_remote_image_name "$appName" "$pullRegistry" "$image")" - tags+=("$remoteImageName:latest-$arch" "$remoteImageName:$version-$arch") + local pushRegistries + pushRegistries="$(get_docker_push_registries)" + for pushRegistry in $pushRegistries; do + remoteImageName="$(determine_remote_image_name "$appName" "$pushRegistry" "$image")" + tags+=("$remoteImageName:latest-$arch" "$remoteImageName:$CIRCLE_TAG-$arch") + done fi fi for tag in "${tags[@]}"; do diff --git a/shell/lib/docker_test.bats b/shell/lib/docker_test.bats index 4947ec61..7923db6e 100644 --- a/shell/lib/docker_test.bats +++ b/shell/lib/docker_test.bats @@ -119,13 +119,42 @@ EOF } @test "docker_buildx_args adds tags when CIRCLE_TAG exists and arch specified" { + cat >"$BOXPATH" <"$YAML_FILE" <"$BOXPATH" <"$YAML_FILE" <