@startuml

== configure ==
root --> fs: read configuration file
root --> fs: detect and validate sdk
root --> root: determine outputs
root --> root: validate build graph
root --> fs: collect build, publish and deploy parameters
root --> sdk: detect and validate build target

== build/docker ==
root --> root: determine image name
root --> root: determine tag/version
root --> sdk: generate multi-stage dockerfile
sdk --> sdk: determine base image for builder
sdk --> sdk: detect any mid-stage base builders
sdk --> sdk: determine final base image
root --> root: run docker build
root --> slsa: generate signature and attestation

== publish/gar ==
root --> gar: upload docker image
root --> gar: upload signature and attestation

== publish/github ==
root --> github: create release in repo
root --> github: upload assets

== deploy/nais ==
root --> root: assemble metadata
root --> root: insert variables into nais.yaml
root --> deploy: run deploy

== deploy/cdn ==
root --> root: determine destination directory
root --> cdn: upload directory

@enduml
