#CI/CD workflows in Github Actions to use Dagger + Moon?

1 messages ยท Page 1 of 1 (latest)

shy lake
#

In this time we use moon https://moonrepo.dev/docs to handle our tasks. On local and on Github Actions.
I thinking to migrate our Pipelines to use Dagger + Moon, question is it good idea?
I mean like keep moon do a job for tasks and tasks orchestration and use Dagger to handle Pipeline like build, test, publish Docker images, artifacts and so on.
For example i can have in Dagger build() function and than task in moon

build:
  command: dagger call build
  deps: ['check']

and in ci.yml i will than just run something like moon ci :build
What do you think will this two tools works together in tandem? Is it good idea to use it like this?

moonrepo is a productivity platform that aims to eliminate pain points for both developers and

sullen basalt
#

@shy lake I think it could work, yes. It's pretty common for teams to combine a build tool like moon, with dagger.

BUT, if you're starting from scratch, I would think carefully whether you really need both. They can work together, but they definitely overlap.

I think you should first try a design with only one. Then, if you find a specific reason where you need both, you'll know for sure that the overhead of 2 tools is worth it

#

Obviously if you're only going to use one, I recommend to start with Dagger ๐Ÿ™‚ But that's a biased, subjective opinion

#

If you do combine both (again, it's possible and sometimes the right approach), I strongly recommend wrapping moon inside dagger, rather than the other way around

shy lake
#

In this time we already using moon. But i think its good idea to have reproducible build in containers and pipelines handled by code e.g. Typescript or Java which can anybody write. Why i thinking about Dagger.

#

moon is great for monorepo and different langs. in repo, task orchestration.

#

What you mean by wrap moon inside dagger?

sullen basalt
#

Just know that Dagger can do everything moon does.

#

Something to watch out for is overlapping caching systems. Dagger and Moon both have their own cache. So the "outer" tool will have to make sure to hand off correctly to the "inner" tool

shy lake
sullen basalt
#

(Dagger's big blind spot is native builds eg. Mac, Windows)

shy lake
sullen basalt
shy lake
#

We cant use remote cache security reason, and its not implemented.

#

I tried to use moon cache for persistance but its change to ofen on every run so its useless in Github Actions

#

I really hope Dagger can help us with faster build ๐Ÿ™‚ and cache

#

Its pretty fast on local will see tomorrow on GHA ๐Ÿ˜‰