#How to create a 2-task dependency?
1 messages · Page 1 of 1 (latest)
Hey! There's two ways. The natural way is if build has an actual dependency on an output from lint and unit-test. I doesn't sound like it has, so you can just use the language's natural concurrency features. Meaning that you can run lint and unit-test concurrently, and return on any error. If they succeed than code continues and build gets executed. Pseudo in Node.js:
await Promise.all([lint, unitTest])
await build
Here errors will throw an exception so it'll naturally exit, but you may want to catch or handle them somewhere.
More on concurrency: https://github.com/dagger/dagger/issues/4766
thank you, that's what I was looking for.
cannot define new methods on non-local type dagger.Container