The only example I could find of this is from a little over a year ago
#1055207709730930808 message
and uses a connect method which doesn't seem to be the way to do things anymore.
What is the recommended way to get this behavior using modern dagger?
What I have currently is a loop that takes the urls of git repos from an array and iterates over it cloning each repos' default branch.
It works for public git repos but not for private ones.
// Downloads all dependencies needed to install the plugin from an array of git repos
func (m *PluginCi) GetDependencies(
ctx context.Context,
dependencyList []string,
) *Directory {
dependencies := dag.Directory()
for _, dependency := range dependencyList {
dependencies = dependencies.
// Add Git repo to dependency list
WithDirectory(
dependency,
dag.Git(
dependency,
GitOpts{
SSHAuthSocket: //Something here?,
}
).
Head().
Tree(),
)
}
return dependencies
}
Thank you for any help