The build reef

Every command that builds an image from a Workload's source inside the cluster

O reef build

Todos os comandos que constroem uma imagem a partir do código de um Workload dentro do cluster

Opening · the kind

A Build is one image, from one commit, never changed

  • Build: spec has workload, commit, owner and mandate; status has nereid, phase, commit, image, digest and job
  • Its name is the tag: the image goes to the Repository named after the Workload
  • One writer per field: the person writes spec, the Nereid writes status
Abertura · o kind

Um Build é uma imagem, de um commit, nunca alterado

  • Build: o spec tem workload, commit, owner e mandate; o status tem nereid, phase, commit, image, digest e job
  • O nome é a tag: a imagem vai para o Repository com o nome do Workload
  • Um escritor por campo: a pessoa escreve o spec, o Nereid escreve o status
Build · build createbuilt #1067

create builds a Workload at the commit its Nereid read

Build · build createpronto #1067

O create constrói um Workload no commit que o Nereid leu

~/example
# Two Jobs in the namespace builds: fetch, then build and push$ nereus build create hello-1 \    --workload hellobuild/builds/hello-1 created (mandate: buildkit, nereid: buildkit) Next steps:   nereus build get hello-1
Build · build getbuilt #1067

get shows the digest the registry answered

Build · build getpronto #1067

O get mostra o digest que o registry respondeu

~/example
# Its phase, image and digest$ nereus build get hello-1Name:      hello-1Workload:  helloCommit:    a1b2c3d4e5f60718293a4b5c6d7e8f9012345678Owner:     -Mandate:   -Nereid:    buildkitPhase:     SucceededImage:     localhost:31874/hello:hello-1Digest:    sha256:3517762d3517762d3517762d3517762d3517762d3517762d3517762d3517762dJob:       hello-1
Build · build listbuilt #1067

list shows every build, a line each

Build · build listpronto #1067

O list mostra cada build, uma linha cada

~/example
# The Workload, the commit, the phase and the digest$ nereus build listBUILD    WORKLOAD  COMMIT   STATUS     DIGESThello-1  hello     a1b2c3d  Succeeded  sha256:3517762d3517hello-2  hello     -        Pending    -
Build · a private repositorybuilt #1070

A private repository is fetched with a token for that build alone

Build · um repositório privadopronto #1070

Um repositório privado é buscado com um token só daquele build

~/example
# An allow line for builds on the App's Mandate, then the Build$ nereus build get app-1Name:      app-1Workload:  appPhase:     RunningMessage:   source fetched at a1b2c3d from https://github.com/example/app with a token for example/app (contents=read)
Build · build deletebuilt #1067

delete removes the Build and its Job, never the image

Build · build deletepronto #1067

O delete remove o Build e o seu Job, nunca a imagem

~/example
# The image it pushed stays in its Repository$ nereus build delete hello-1build/builds/hello-1 deleted Next steps:   nereus build list
Trigger · build trigger createbuilt #914

trigger create builds a Workload on each new commit of its Mirror

Trigger · build trigger createpronto #914

O trigger create constrói um Workload a cada commit novo do seu Mirror

~/example
# The Mirror nereus copies the source of the Workload triton$ nereus build trigger create triton \    --workload tritonbuild/triggers/triton created (mandate: buildkit, nereid: buildkit) Next steps:   nereus build trigger get triton
Trigger · build trigger listbuilt #914

trigger list shows the commit each one saw and its last Build

Trigger · build trigger listpronto #914

O trigger list mostra o commit que cada um viu e o seu último Build

~/example
# After a push, once the Mirror pulled it$ nereus build trigger listTRIGGER  WORKLOAD  MIRROR  COMMIT   LAST BUILD      STATUStriton   triton    nereus  a1b2c3d  triton-a1b2c3d  Ready
Trigger · build trigger getbuilt #914

trigger get shows the Mirror it follows and the commit it saw

Trigger · build trigger getpronto #914

O trigger get mostra o Mirror que segue e o commit que viu

~/example
# Its Mirror, branch, commit and last Build$ nereus build trigger get tritonName:        tritonWorkload:    tritonOwner:       Project/tritonMandate:     -Nereid:      buildkitMirror:      nereusBranch:      mainCommit:      a1b2c3d4e5f60718293a4b5c6d7e8f9012345678Last Build:  triton-a1b2c3dStatus:      Ready
Trigger · build trigger deletebuilt #914

trigger delete stops new Builds and leaves the ones it made

Trigger · build trigger deletepronto #914

O trigger delete para os Builds novos e mantém os que fez

~/example
# No new Build of triton; triton-a1b2c3d stays$ nereus build trigger delete tritonbuild/triggers/triton deleted; the Builds it created stay Next steps:   nereus build trigger list
References · references

Where the ideas came from

Referências · referências

De onde vieram as ideias