#How to create a 2-task dependency?

1 messages · Page 1 of 1 (latest)

ionic relic
#

I'm trying to recreate a gitlab pipeline with dagger.
I have a build job that depends on the success of 2 other jobs [lint, unit-test].
How can I recreate this double dependency?

winged pier
#

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.

ionic relic
#

thank you, that's what I was looking for.

crimson pawn
#

cannot define new methods on non-local type dagger.Container