“Pipelines as code” is not exactly a new concept, I heard about it a few years ago with the launch of Tecton. I wrote a design document at that time to create a new CI that would accept various rules (Jenkins, CircleCI, TravisCI and Github Actions) and you wouldn’t have to learn new syntax. Unfortunately, the project never materialized, so I didn’t pursue this much longer.
Solomon Hykes left Docker a few years ago and started Dagger.io, where they started adopting Cue lang and working on an interesting new project. When I got access to early access I wasn’t too excited about it, because writing pipelines in Cue is not something I would recommend to developers. After experiencing how hard it was to push Grafana dashboards in Jsonnet, I’m cautious.
A few weeks ago, they launched a technical preview of Dagger Go SDK and when I tried out the basic demo based on the video, I thought it was great. I decided to test on my project
ga-badge that generates badge for Github Actions. Here’s the relevant PR with the changes, showing how simple the change is. Then here’s a log of when it’s dropped. I use Mage for dropping as recommended by the Dagger folks for the multi repository. I’m sure there are other ways to do it, but it seemed fine to me at first.
I’ll be talking about the Dagger Go SDK at Go Meetup #9 on November 30, 2022, and if you’re interested, stop by the discussion.