Skip to content
D2 templates

CI/CD pipeline

PR → tests → build → staging → manual approve → prod.

Template previewD2
G cluster_ci ci dev dev github github dev->github pushes PR ci.lint lint github->ci.lint webhook registry registry staging staging registry->staging pull & deploy approve approve staging->approve smoke OK prod prod approve->prod blue/green monitor monitor prod->monitor ci.tests tests ci.lint->ci.tests ci.build build ci.tests->ci.build ci.docker docker ci.build->ci.docker ci.docker->registry push

What this template contains

Source
13 lines

Make it your own.

dev -> github: pushes PR
github -> ci: webhook

ci: {
  lint -> tests
  tests -> build
  build -> docker
}

ci.docker -> registry: push
registry -> staging: pull & deploy
staging -> approve: smoke OK

approve -> prod: blue/green
prod -> monitor

monitor.shape: page