Replies: 2 comments 2 replies
-
Hi @e3b0c442 👋 Improving the DX for this situation is ongoing: #4205 (comment) Here's an example that might help illustrate this approach: https://github.com/jpadams/dagger-examples/blob/parallel/go/npm-build/ci.go Notice below that the pull of the dagger engine and The If we didn't want both of these to have to finish before
There are ideas like making P.S. We answer a lot of questions like this over in our Discord server, especially in the #help channel. |
Beta Was this translation helpful? Give feedback.
-
👋 // Both return a `dagger.Container`, full async
testResult := test()
lintResult := lint()
// Do *something* that forces a wait on both
_, err := c.Container().From("alpine").
WithMountedDirectory("/a", testResult).
WithMountedDirectory("/b", lintResult).
WithExec([]string{"ls"}).
ExitCode(ctx)
return err This works because it takes advantage of the lazy execution model to make the final pipeline dependent on lint and test using More conversation can be found in that issue for what the ideal solution should be, as well as the issue @jpadams linked and #4766 |
Beta Was this translation helpful? Give feedback.
-
Is there a way to run tasks in parallel aside from creating child pipelines?
Basic example, I have a Node app that I'm testing. I would like to install the deps, and then run the linting and unit testing tasks in parallel, then rejoin for the production container build.
Are pipelines the ideal way to accomplish this?
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions