You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by nf...@apache.org on 2021/05/27 10:35:33 UTC

[camel-k] 05/11: refactor(trait): property names and error condition

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

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

commit 719b158f03dae64af6e8ac993ebf59a3912c26d7
Author: Pasquale Congiusti <pa...@gmail.com>
AuthorDate: Thu May 20 16:19:00 2021 +0200

    refactor(trait): property names and error condition
---
 pkg/cmd/run.go       | 4 ++++
 pkg/trait/builder.go | 6 ++++++
 2 files changed, 10 insertions(+)

diff --git a/pkg/cmd/run.go b/pkg/cmd/run.go
index fc0516e..77e59c9 100644
--- a/pkg/cmd/run.go
+++ b/pkg/cmd/run.go
@@ -571,6 +571,7 @@ func (o *runCmdOptions) updateIntegrationCode(c client.Client, sources []string,
 	}
 	// convert each build configuration to a builder trait property
 	for _, item := range o.BuildProperties {
+<<<<<<< HEAD
 		props, err := extractProperties(item)
 		if err != nil {
 			return nil, err
@@ -583,6 +584,9 @@ func (o *runCmdOptions) updateIntegrationCode(c client.Client, sources []string,
 				return nil, err
 			}
 		}
+=======
+		o.Traits = append(o.Traits, fmt.Sprintf("builder.properties=%s", item))
+>>>>>>> refactor(trait): property names and error condition
 	}
 	for _, item := range o.LoggingLevels {
 		integration.Spec.AddConfiguration("property", "logging.level."+item)
diff --git a/pkg/trait/builder.go b/pkg/trait/builder.go
index 8828d3a..dacc00c 100644
--- a/pkg/trait/builder.go
+++ b/pkg/trait/builder.go
@@ -26,9 +26,12 @@ import (
 	"github.com/apache/camel-k/pkg/builder"
 	corev1 "k8s.io/api/core/v1"
 <<<<<<< HEAD
+<<<<<<< HEAD
 	metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
 =======
 >>>>>>> refactor(trait): property names and error condition
+=======
+>>>>>>> refactor(trait): property names and error condition
 )
 
 // The builder trait is internally used to determine the best strategy to
@@ -74,11 +77,14 @@ func (t *builderTrait) Apply(e *Environment) error {
 		e.IntegrationKit.Status.SetCondition("IntegrationKitPropertiesFormatValid", corev1.ConditionFalse,
 			"IntegrationKitPropertiesFormatValid", fmt.Sprintf("One or more properties where not formatted as expected: %s", err.Error()))
 <<<<<<< HEAD
+<<<<<<< HEAD
 		if _, err := e.Client.CamelV1().IntegrationKits(e.IntegrationKit.Namespace).UpdateStatus(e.C, e.IntegrationKit, metav1.UpdateOptions{}); err != nil {
 			return err
 		}
 =======
 >>>>>>> refactor(trait): property names and error condition
+=======
+>>>>>>> refactor(trait): property names and error condition
 		return nil
 	}