build: Automatically trigger the first BuildRun

Why?

  • Improve the experience for running the first build execution.

How?

  • On creation of a Build, automatically trigger the creation of a BuildRun.
  • Use an annotation to disable this behaviour.
  • ~Have the controller add/update an annotation to record the creation of a BuildRun.~

About this issue

  • Original URL
  • State: open
  • Created 4 years ago
  • Reactions: 1
  • Comments: 17 (17 by maintainers)

Most upvoted comments

@otaviof hi, for:

I would like to add that when creating a BuildRun returns errors, what would the operator do?

If the creation of the BuildRun happens in the Build reconciler, I think it should be manage as yet another validation in the Build reconciliation. If a validation fails in the Build, we reconcile again and again and again … 😃

Sounds good, @otaviof .

How would the controller, in subsequent reconciliations understand that the first build has already been triggered? Would that be by looking at status information?

Same annotation.

  1. If I create a Build with no annotation, then the controller creates the first BuildRun, and sets an annotation pending=false ( default behaviour )

  2. If I create a Build with an annotation pending=false, then do nothing.

  3. If I create a Build with an annotation pending=true, do same as (1)

What do you think?