Skip to content

Commit

Permalink
Report correct build status in case of failure
Browse files Browse the repository at this point in the history
  • Loading branch information
oscerd authored and lburgazzoli committed Sep 25, 2018
1 parent fa97045 commit ed658ba
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions pkg/stub/action/integration/build.go
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,15 @@ func (action *buildAction) Handle(integration *v1alpha1.Integration) error {
return sdk.Update(target)
}

if ctx.Status.Phase == v1alpha1.IntegrationContextPhaseError {
target := integration.DeepCopy()
target.Status.Image = ctx.Status.Image
target.Spec.Context = ctx.Name
target.Status.Phase = v1alpha1.IntegrationPhaseError
target.Status.Digest = digest.ComputeForIntegration(target)
return sdk.Update(target)
}

if integration.Spec.Context == "" {
// We need to set the context
target := integration.DeepCopy()
Expand Down

0 comments on commit ed658ba

Please sign in to comment.