Accelerate Your Development and CI/CD Pipelines with Dagger

Márk Sági-Kazár


2025-05-05 @ Cloud Native Days Romania

whoami

Márk Sági-Kazár

Cloud Native Ambassador

Dagger Commander


YAML engineer for life 😭



@sagikazarmark

https://sagikazarmark.com

hello@sagikazarmark.com

Agenda

  • Introduction
  • Module 1: Getting to know Dagger
  • Module 2: Let’s Daggerize
  • Module 3: Working with modules
  • Module 4: Integrating with GitHub Actions
  • Module 5: Publishing artifacts
  • Q&A

CI/CD today

…aka the pain we all know

Day 1…

…how it starts 😃

name: CI

on:
  push:
    branches: [main]

jobs:
  build:
    name: build the software
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v3
      - run: |
          build
          test
          lint

Day 101…

…760 lines of YAML & Bash 😟

# Foobar pipeline
# Include the Common CI pipeline parameters.
include:
  - project: 'foo/bar/foobarproject/cicdtemplate'
    file: '/Common.gitlab-ci.yml'
  #- /force-app/ui-tests/pipeline.yml

stages:
  - build-metadata-package
  - run-js-tests
  - validate-package
  - deploy-package
  - run-unit-tests
  - run-api-tests
  - run-ui-tests
  - integration

####################################################
# Builds the Metadata Package, builds the Package
# files and Destructive changes
####################################################
build-metadata-package:
  stage: build-metadata-package
  except:
    ...

Push and pray 🙏

Developer environment

brew install go
brew install golangci-lint

make build
make test
make lint

CI/CD environment

- uses: actions/setup-go@v5
  with:
    go-version: "1.24.0"

- run: go build .
- run: go test -race -v ./…

- uses: golangci/golangci-lint-action@v7
  with:
    version: "v2.0.0"

We are still dealing with drift in 2025?!

All is well until you need to make changes

  • Upgrades (eg. new version of Go)
  • New tooling (eg. new security scanner)
  • Moving to a new platform

Lessons learned

YAML…

  • is not reusable 1
  • is not composable
  • provides poor flow control
  • is not portable

YAML is a poor choice of “language” for software development workflows.

CI/CD is just an interface

  • Developer and CI environments overlap
  • Drift between them is annoying
  • Time wasted due to “push and pray”
  • CI/CD is no longer a dev or platform only domain

Dev + CI = Software development workflows

No more YAML

  • Use a general-purpose programming language
  • One that developers/platform engineers already know
  • Reusable components

Workflows that run anywhere

  • Run CI locally
  • No more push and pray
  • No more drift between dev and CI
  • Bridge between developers and platform engineers

Workshop

Let’s get our hands dirty!

Workshop environment

skm.li/cndro25/play

Prerequisites

  • Make sure Docker is installed and running.
  • Make sure Go is installed.
  • Install the latest Dagger CLI.
  • Make sure you have a GitHub account set up with SSH keys.
  • Last, but not least: you’ll need your favorite text editor or IDE.

Workshop materials

https://github.com/sagikazarmark/workshop-cnd-romania-2025

skm.li/cndro25

Real world exampes

github.com/openmeterio/openmeter

github.com/twirphp/twirp

Feedback

https://forms.gle/ffDQhySWwfUByZAWA

skm.li/cndro25/feedback

Thank you

Any questions?



@sagikazarmark

https://sagikazarmark.com

hello@sagikazarmark.com