You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by "claudio4j (via GitHub)" <gi...@apache.org> on 2023/08/25 01:50:02 UTC

[GitHub] [camel-k] claudio4j commented on a diff in pull request #4680: feat(#1656) : Add Jib publish strategy

claudio4j commented on code in PR #4680:
URL: https://github.com/apache/camel-k/pull/4680#discussion_r1305035712


##########
pkg/builder/project.go:
##########
@@ -195,13 +195,19 @@ func sanitizeDependencies(ctx *builderContext) error {
 	return camel.SanitizeIntegrationDependencies(ctx.Maven.Project.Dependencies)
 }
 
-func injectProfile(ctx *builderContext) error {
-	val, err := kubernetes.ResolveValueSource(ctx.C, ctx.Client, ctx.Namespace, &ctx.Build.Maven.Profile)
-	if err != nil {
-		return err
-	}
-	if val != "" {
-		ctx.Maven.Project.AddProfile(val)
+func injectProfiles(ctx *builderContext) error {
+	if ctx.Build.Maven.Profiles != nil {
+		profiles := ""
+		for i := range ctx.Build.Maven.Profiles {
+			val, err := kubernetes.ResolveValueSource(ctx.C, ctx.Client, ctx.Namespace, &ctx.Build.Maven.Profiles[i])
+			if err != nil {
+				return err

Review Comment:
   WDYT to return or print in the log a more descriptive error message about not able to load the configmap profile ?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org