Hey! I'm working on a pants plugin for <pulumi>, a...
# plugins
f
Hey! I'm working on a pants plugin for pulumi, and since pulumi is distributed as a pre-compiled go binary I want to use ExternalTool to install it. Only problem is that pulumi has multiple executables in it's archive that it expects to be on the PATH in runtime, but AFAICT you can only specify one executable with
generate_exe
. Is there a mechanism I am missing to get multiple executables with the same archive? Or maybe I can make an ExternalTool for each executable I need and rely on caching to not download the archive n times?
f
The entire archive should be unpacked into the relevant
Digest
. Just generate the particular path to the executable you need and use that when invoking the executable with a
Process
.
That worked fine with the Go SDK for the Go backend.
(although for performance reasons, we removed use of downloading the Go SDK for now so you would have to go back in the commit history to see the use of Go SDK from downloading via ExternalTool)
the
generate_exe
was set to an unused value basically:
Copy code
def generate_exe(self, plat: Platform) -> str:
        return "./bin"
f
Got it, thank you!
f
(and it may not even be necessary to override
generate_exe
. not sure why I did way back when.)
l
Any chance your work on the Pulumi plugin will be publicly available? It's been on my list to do a similar project.
b
@faint-businessperson-86903 thanks for sharing this with the community!
🙌 1
l
Thanks! Unfortunately I'm not seeing the zip... If it's easier then you can email me at tmacey@mit.edu
Nevermind, just downloaded it. I'll take a look and see if there's anything I can help to clean up or give feedback. I appreciate it!
f
You're welcome! Feel free to send thoughts/feedback my way anytime, here or by email