Build is not getting published when using docker buildx metadata file with multiple tags
Describe the bug
When using the command rt build-docker-create and providing an image file, if the image file contains multiple tags the build will not get published.
Example:
Docker build with metadata output file:
docker buildx build --pull --push --metadata-file=build-metadata --platform linux/arm64,linux/amd64 -t myorg.jfrog.io/myrepo/jfrog/myimage:tag1 -t myorg.jfrog.io/myrepo/jfrog/myimage:tag2 -f Dockerfile .
build-docker-create:
jf rt build-docker-create repo --image-file build-metadata --build-name mybuild --build-number 1
Output the error 11:57:17 [Error] Could not find docker image in Artifactory, expecting image tag: myorg.jfrog.io/myrepo/jfrog/myimage:tag1,myorg.jfrog.io/myrepo/jfrog/myimage:tag2
This is because the metadata file will contain a field image.name with comma separated list of tags (probably not a great decision by docker, the better solution would have been to use an array, but it is what it is) and the jfrog cli parse it as it, and expect this to be a single image name.
Current behavior
11:57:17 [Error] Could not find docker image in Artifactory, expecting image tag: myorg.jfrog.io/myrepo/jfrog/myimage:tag1,myorg.jfrog.io/myrepo/jfrog/myimage:tag2
Reproduction steps
Docker build with metadata output file:
docker buildx build --pull --push --metadata-file=build-metadata --platform linux/arm64,linux/amd64 -t myorg.jfrog.io/myrepo/jfrog/myimage:tag1 -t myorg.jfrog.io/myrepo/jfrog/myimage:tag2 -f Dockerfile .
build-docker-create:
jf rt build-docker-create repo --image-file build-metadata --build-name mybuild --build-number 1
Output the error 11:57:17 [Error] Could not find docker image in Artifactory, expecting image tag: myorg.jfrog.io/myrepo/jfrog/myimage:tag1,myorg.jfrog.io/myrepo/jfrog/myimage:tag2
Expected behavior
No error and the build will get published later with the publish command and have all the data.
JFrog CLI version
2.73.2
Operating system type and version
Linux Ubuntu 20
JFrog Artifactory version
SaaS
JFrog Xray version
No response