That’s an interesting use case. You can execute arbitrary commands with tools that Garden bundles by running
garden tools <provider>.<tool> -- <params>.
That being said, I don’t think we’ve properly thought of this use case and the fact that the Helm binary Garden uses is not installed in the default location might cause issues.
I tried running
garden tools kubernetes.helm -- plugin install https://github.com/lrills/helm-unittest on my end and bumped into this issue. I’m guessing that’s because the Helm location Garden uses doesn’t have the plugins dir. You could create it manually but that would break if we update the Helm version Garden uses internally, since each one gets installed at their own path (you can check out the
.garden/tools dir to see what I mean).
However, you can run arbitrary local tasks and build commands from an exec module if you set
So just to give you an example, you can do something like this:
- name: install-helm-plugin
command: [helm, plugin, install, https://github.com/lrills/helm-unittest]
- name: helm-unittest
command: ["helm unittest"]
But sounds like that’s not what you’re after since it relies on system Helm and may not be repeatable across environments.
We’d be happy to receive a feature request on GitHub for this functionality though but I don’t have a good feel for the scope of the work as things stand.