robertonav20 commented on issue #1238:
URL: https://github.com/apache/camel-k/issues/1238#issuecomment-1137042501

   Yes i have a look yesterday, below i describe the code:
   
   Inside the package builder i add buildah.go file to manage buildah constants 
properties
   ```
   package builder
   
   const BuildahArchitecturePlatform = "BuildahArchitecturePlatform"
   const BuildahPlatform = "BuildahPlatform"
   ```
   
   Here you can find the mapping to buildah builder
   ```
        case v1.IntegrationPlatformBuildPublishStrategyBuildah:
                var architecture string
                var found bool
                if architecture, found = 
e.Platform.Status.Build.PublishStrategyOptions[builder.BuildahPlatform]; !found 
{
                        architecture = platforms.DefaultSpec().OS + "/" + 
platforms.DefaultSpec().Architecture + "/" + platforms.DefaultSpec().Variant
                }
   
                e.BuildTasks = append(e.BuildTasks, v1.Task{Buildah: 
&v1.BuildahTask{
                        BaseTask: v1.BaseTask{
                                Name: "buildah",
                        },
                        PublishTask: v1.PublishTask{
                                Architecture: architecture,
                                Image:        getImageName(e),
                                Registry:     e.Platform.Status.Build.Registry,
                        },
                        Verbose: t.Verbose,
                }})
   ```
   Then map architecture attribute to buildah command.
   
   I see a difference between https://github.com/apache/camel-k/pull/3032 and 
this task, that task introduce a command parameter for **install**, but in our 
case we must manage the architecture of build for integration kit, so it's 
necessary introduce this parameter inside **run** command
   
   My questions are:
   -  Where is the point of the code ? I suppose **run.go** inside **pkg/cmd** 
and here i can add the new buildah parameter (exmaple: **buildah-platform**)
   - The variable `platform` inside `run.go` method `createOrUpdateIntegration` 
is empty, How to fill it ?
   - How to check if that map `PublishStrategyOptions` contains that parameter?
   
   I'm hope you understand my questions.
   
   Thanks in advance


-- 
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-unsubscr...@camel.apache.org

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

Reply via email to