if you take a closer look, you will see, that the first --build-arg starts with a { and all following --build-args are then actually inside that “object/map” because the closing } is after the last --build-arg.
I believe the Kaniko plugin is based on the docker plugin. In the docker plugin builds_args is an array, where each array item is key=value format. Here is an example from the docker docs:
I am guessing the problem with your example is that build_args is a map structure as opposed to an array, and changing to an array would solve the problem.
Ok, thx for the info, nice to know that it is possible, but…that is more of a hack, because that way i would move all build-args into a secret, which nobody can inspect anymore and which has no version control.
I came here because the repo has no issue tracker and is under the drone organization. I think @shubham is the maintainer? So @shubham what do you think about making build-args work with an array and a map?
from_secret only works with top level keys, meaning this works:
settings:
foo:
from_secret: bar
but this does not work:
settings:
foo:
bar:
from_secret: baz
this is a limitation of drone, not a limitation of the plugin itself. So even if the plugin were modified to accept nested input you would still need a workaround to inject your secrets.