This is an automated email from the ASF dual-hosted git repository.

lburgazzoli pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel-k.git


The following commit(s) were added to refs/heads/master by this push:
     new ed658ba  Report correct build status in case of failure
ed658ba is described below

commit ed658ba9bed1285a64e449cbdfdedff66c676295
Author: Andrea Cosentino <anco...@gmail.com>
AuthorDate: Tue Sep 25 14:39:42 2018 +0200

    Report correct build status in case of failure
---
 pkg/stub/action/integration/build.go | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/pkg/stub/action/integration/build.go 
b/pkg/stub/action/integration/build.go
index 4dcf728..20cd506 100644
--- a/pkg/stub/action/integration/build.go
+++ b/pkg/stub/action/integration/build.go
@@ -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()

Reply via email to