Open peterzxu-crm opened 4 months ago
Had same issue and did dig into plugin code. There is an undocumented param 'buildx' that need to be true for param like 'platform' to be considered. Then you could write like this :
docker { ... buildx true platform 'linux/amd64' ... }
A list of strings is supported, i.e. { platform 'linux/amd64','linux/arm64' }, but then :
ERROR: Multi-platform build is not supported for the docker driver. Switch to a different driver, or turn on the containerd image store, and try again. Learn more at https://docs.docker.com/go/build-multi-platform/
But that is docker related, not an issue with this plugin
What happened?
I want to use buildx to build cross platforms. I am seeing that there is a platform variable to specify. However, it does not work for me. If I specify
docker { platform ['linux/amd64'] }
The debug shows that it does not add --platform parameter at all.
But if I specify
docker { platform 'linux/amd64' }
it complains about
`
What did you want to happen?
I expect that if I specify platform ['linux/amd64'], it should add to command line --platform linux/amd64