You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by "gansheer (via GitHub)" <gi...@apache.org> on 2023/03/20 16:06:28 UTC

[GitHub] [camel-k] gansheer commented on issue #1656: jib builder

gansheer commented on issue #1656:
URL: https://github.com/apache/camel-k/issues/1656#issuecomment-1476519489

   I am trying to understand the reason behind some code designs. This is partially related to the #4024 discussion.
   
   From what I can see the effective build code consist of **2 Tasks**: a **BuildTask** and a **PublishTask**. The BuildTask itself contains many **Steps** separated in 5 phases:
   * InitPhase
   * ProjectGenerationPhase
   * ProjectBuildPhase
   * ApplicationPackagePhase
   * ApplicationPublishPhase
   
   ![Camel-k build flow](https://user-images.githubusercontent.com/6067789/226393084-b06cb931-fa0c-4a99-815b-7a3fda8594e1.jpg)
   
   I want to find a right way to add the maven command for the Jib build in the new Publish strategy. From the current code, I don't get the information about the build maven command already generated by the build task (passed through the steps in the builderContext), that leaves me 3 choices (that I can see):
   * generate it again as it was done in build code
   * create a BuilderTask Step instead of a publish task
   * find a way to communicate it from the build task to the publish task
   
   Before making any design choice I would like to understand the following points:
   * Why has the code been separated in 2 Tasks ? Is there a technical reason why the PublishTask code is not a BuilderTask Step ?
   * Is there a purpose to the presence of the ApplicationPublishPhase or is it some dead code ? There is no step associated to it.
   * What are the possible way to pass information from a Task to another (here the BuilderTask to the PublishTask) ? There might some possibility in the CRs, but I can't see it.
   
   I would really like your opinions and any input that could help me avoid any known pitfall.
   
   cc @squakez  @claudio4j @christophd @lburgazzoli @astefanutti @oscerd @tadayosi 


-- 
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