#OK I think I got blocked trying to do
1 messages · Page 1 of 1 (latest)
I have been putting reusable Dagger code into it's own modules and I was trying to build Pulumi integration
This requires scripts to be mounted into the container
I can't find a way to mount these scripts from the shared code, because we don't really know where they are in relation to client.Host().Workdir()
with CUE, I used core.Source, but I guess I need an extension to replicate this behaviour?
@wispy pier You can use the WithLocalDir ClientOpt https://pkg.go.dev/dagger.io/dagger#WithLocalDir
in dagger.Connect: https://pkg.go.dev/dagger.io/dagger#Connect
To load any local/host directory into Buildkit when you initialize the client.
Then use client.Host().Directory(dagger.HostDirectoryID(path)).Read().ID(ctx) to get the DirectoryID
That should give you pretty much the same functionality as core.#Source.
I pass the client to the Pulumi code
Should the Pulumi code use it's own client?
Could we jump on a call, if you have 10 mins? Doesn't need to be now
Definitely! Happy to help figure it out. I can do whenever you're available.
I've got 10 mins now
Let's do it!