Skip to content

Commit

Permalink
fix(controller): make simple engine short-circuit step execution on n…
Browse files Browse the repository at this point in the history
…on-success (#2602)

Signed-off-by: Kent Rancourt <[email protected]>
  • Loading branch information
krancour authored Sep 29, 2024
1 parent e8ccd50 commit 1ef5edd
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions internal/directives/simple_engine.go
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,10 @@ func (e *SimpleEngine) Promote(
fmt.Errorf("failed to run step %q: %w", step.Kind, err)
}

if result.Status != PromotionStatusSuccess {
return PromotionResult{Status: result.Status}, nil
}

if step.Alias != "" {
state[step.Alias] = result.Output
}
Expand Down

0 comments on commit 1ef5edd

Please sign in to comment.