1 of 27

Future-Proof Your Platform’s CI/CD Without Developers Noticing a Thing

Except 🦄 and 🌈

2 of 27

We’re glad to be with you

Mark

Head of OSS, OpenMeter�CNCF Ambassador

Jeremy

Head of Ecosystem, Dagger

3 of 27

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

😃 How it starts…�� Day 1

4 of 27

# 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:

...

😟 …760 lines of YAML & Bash�� Day 101

5 of 27

Ah, YAML 🙃

6 of 27

YAML Ain't Markup Language

&

YAML ain’t a programming language

FACTS

Jump to Definition, Modules, Tests, Loops, Conditionals

7 of 27

🙏

😞

5 to 30 mins

8 of 27

9 of 27

Phase 1: Developer interface

brew install go

brew install golangci-lint

make build

make test

make lint

10 of 27

Phase 1: Developer interface

brew install go

brew install golangci-lint

make build

make test

make lint

brew vs nix vs

golang.org vs

...

11 of 27

Phase 1: Developer interface

brew install go

brew install golangci-lint

make build

make test

make lint

versions of

go ?

golangci-lint ?

12 of 27

Phase 1: Developer interface

brew install go

brew install golangci-lint

make build

make test

make lint

BSD make & sed

vs

GNU make & sed

13 of 27

Phase 1: Platform CI interfaceuses:actions/setup-go@v4

with:

go-version: "1.21.3"

run: go build .

run: go test -race -v ./…

uses:

golangci/golangci-lint-action@v3

with:

version: "v1.54.2"

versions of

go ?

golangci-lint ?

14 of 27

Phase 1: Platform CI interfaceuses:actions/setup-go@v4

with:

go-version: "1.21.3"

run: go build .

run: go test -race -v ./…

uses:

golangci/golangci-lint-action@v3

with:

version: "v1.54.2"

GH Actions vs

Jenkins,Circle,

GitLab CI,...

15 of 27

note: we’re still dealing with DRIFT

in 2023?!

16 of 27

Phase 2: Platform CI interface

New! Security requirement

Add new security scans locally AND in CI!!

17 of 27

Phase 2: Developer interface

Developers don’t really want things to change...

no more shift left! 🙏

18 of 27

Phase 2: Platform CI interface

How do we improve the platform AND keep developers happy?!�🤔

19 of 27

Phase 2: Platform CI interface

we want need:

CI == local dev

CI == code

Runs anywhere

20 of 27

CI/CD as Code that Runs Anywhere!

21 of 27

CI/CD as code in your languages�

Works with existing tools

All in containers��Automatic caching

Cross-language modules

22 of 27

CUElang ⇨�

Multi-language SDKs ⇨

(go, python, node.js, java, rust, elixir, aml, ...)

Zenith (modules/cli)

dagger call, shell, print, download, ...

23 of 27

Less talk...

more code!

24 of 27

Drift in 2023?

Went through config mgmt era

Containers exist!

Kubernetes

25 of 27

name: CI

on:

push:

branches: [main]�

jobs:

dagger:

name: dagger

runs-on: ubuntu-latest

steps:

- uses: actions/checkout@v3

- run: dagger <build/test/deploy>

pipeline { agent { label 'dagger' }

stages {

stage("dagger") {

steps {

sh '''

dagger <build/test/deploy>

'''

}

}

}

}�

$ dagger <build/test/deploy>

CLI

GitHub Actions

Jenkins

26 of 27

MOAR

CODE!!!

27 of 27

DEMO�TIME