3 ms·
Act works pretty well in my experience, but it's tied to GHA. Once nice thing about Earthly + Dagger is that your build + pipeline code are bundled together, a
by shepherdjerred 3y ago
Act works pretty well in my experience, but it's tied to GHA.
Once nice thing about Earthly + Dagger is that your build + pipeline code are bundled together, and you can run them on any compute.
As for YAML, it is ubiquitous and more accessible to those who are less comfortable writing code. One thing that I don't like about YAML si that for larger GHA workflows become hard to understand quite quickly. It's nice to work in "real" languages like Go/TypeScript where you can create and compose functions, especially if the language you're writing your pipeline in is the same language as your app -- I think that's a very powerful use case where all devs can feel comfortable/empowered to tweak CI/build steps.
> It also seems to me that the argument you make is mostly focused on the building step? Earthly certainly seems focused on that aspect.
Earthly and Dagger solve both builds and CI pipelines. They're essentially identical aside from the syntax that you use.
Earthly and Dagger fit into CI in the same way, too. You'll have a GHA that installs Earthly/Dagger, and then calls your pipeline/build step. For Dagger, this is invoking your pipeline code. For Earthly, you'd want to define a `ci` target, and invoke it, e.g. `earthly +ci` (this means that locally you can run the entire pipeline with the same command). In both cases, you'd want your GHA (or whatever runner you're using) to be as dumb as possible, e.g. it should literally clone the repo, install the CLI, and run one shell command. Maybe it can also upload test reports/annotate PRs/etc, but the more you add to your GHA/test runner code outside of these tools, the less these tools can help you.
Here's an example using Earthly for CI:
https://github.com/shepherdjerred/glitter-boys/blob/main/.github/workflows/deploy.yml https://github.com/shepherdjerred/glitter-boys/blob/main/.gi...
A similar example using Dagger:
https://github.com/shepherdjerred/shepherdjerred.com/blob/main/.github/workflows/dagger.yml https://github.com/shepherdjerred/shepherdjerred.com/blob/ma...
- shepherdjerred 3y agoI'll follow up on this and say: give Earthly a try! It's super easy to figure out if you've ever written a Dockerfile/Makefile. If you like Earthly and feel limited by syntax, then try out Dagger.