#Improving Output on Dagger Job With Pipeline Labels

1 messages · Page 1 of 1 (latest)

tired parrot
#

If I have a more complex mage task running build but additional some steps for pre-setup is it possible to group them under seperate equally level pipelines? Is that not the correct way to use?


golang = golang.Pipeline("build")

// do setup
golang = golang.Pipeline("build").Pipeline("setup")

// now run goreleaser
golang = golang.Pipeline("build").Pipeline("goreleaser")

I know that's not write as it's just appending, but that's the general idea I was trying to wrap my head around.

#

i see that nice in the new output. Without losing caching if there's a way to signify a new execution of the next action that would be cool

earnest badger
#

cc @karmic python

karmic python
#

sorry, not sure I grok the question. I see you're running with --debug though which will make things a bit more verbose - is that intentional?

seems like you're already configuring pipelines appropriately, is that not working?

tired parrot
#

Yeah just wondering if I can group section of a mage target or it's only meant to be grouped at the level of a target/task.

Not a huge deal as is, just trying to see how to better reflect in logs/TUI the section of code it's on.

karmic python
#

I'd say group things in whatever way feels most useful to you, and let us know if something looks confusing or misleading 🙂

The Pipeline API is pretty open-ended, so I'd try to imagine them as a tool to encapsulate parts of your pipeline that you're OK with summarizing into a simple ✅ [Name]. Common setup that feeds into a bunch of your commands is a good example, but also discrete 'leaf' nodes like test / build / etc

tired parrot
#

But once I’ve created a pipeline reassignment of the pipeline name isn’t in scope right? That makes no sense. I’d have to break the next steps up similar to perhaps what a multistage build example uses?

karmic python
#

not sure what you mean by reassignment of the pipeline name, but maybe the problem is in this example:

golang = golang.Pipeline("build")

// do setup
golang = golang.Pipeline("build").Pipeline("setup")

// now run goreleaser
golang = golang.Pipeline("build").Pipeline("goreleaser")

With this code you're continuously nesting, which would result in a pipeline path like build/build/setup/build/goreleaser. Seems like you just need to assign different pipelines to a different variable?

build = golang.Pipeline("build")

// do setup
setup = build.Pipeline("setup")

// now run goreleaser
releaser = build.Pipeline("goreleaser")
brazen oak
#

@next hazel since this is the area of projects and entry points too