You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kie.apache.org by "ricardozanini (via GitHub)" <gi...@apache.org> on 2025/02/25 23:59:22 UTC

[PR] Fix #709 - Adding Maven Mirror configuration guide to docs [incubator-kie-kogito-docs]

ricardozanini opened a new pull request, #710:
URL: https://github.com/apache/incubator-kie-kogito-docs/pull/710

   <!-- Please don't forget your Issue link -->
   Fixes #709
   
   <!-- Please provide a short description of what this PR does -->
   **Description:**
   In this PR, we added a new guide to instruct users on configuring a custom maven mirror URL in different contexts. I also slightly edited the nav bar to group items related to the deployment model.
   
   Please note that this guide is not within the `Operator` section because it can be expanded to the `kn workflow` CLI and more Maven configurations we may have.
   
   <!-- Link to related PRs: -->
   
   Please make sure that your PR meets the following requirements:
   
   - [ ] You have read the [contributions doc](https://github.com/apache/incubator-kie-kogito-docs/blob/main/CONTRIBUTING.md)
   - [ ] Pull Request title is properly formatted: `Issue-XYZ Subject`
   - [ ] Pull Request title contains the target branch if not targeting main: `[0.9.x] Issue-XYZ Subject`
   - [ ] The nav.adoc file has a link to this guide in the proper category
   - [ ] The index.adoc file has a card to this guide in the proper category, with a meaningful description
   
   <details>
   <summary>
   How to backport a pull request to a different branch?
   </summary>
   
   In order to automatically create a **backporting pull request** please add one or more labels having the following format `backport-<branch-name>`, where `<branch-name>` is the name of the branch where the pull request must be backported to (e.g., `backport-7.67.x` to backport the original PR to the `7.67.x` branch).
   
   > **NOTE**: **backporting** is an action aiming to move a change (usually a commit) from a branch (usually the main one) to another one, which is generally referring to a still maintained release branch. Keeping it simple: it is about to move a specific change or a set of them from one branch to another.
   
   Once the original pull request is successfully merged, the automated action will create one backporting pull request per each label (with the previous format) that has been added.
   
   If something goes wrong, the author will be notified and at this point a manual backporting is needed.
   
   > **NOTE**: this automated backporting is triggered whenever a pull request on `main` branch is labeled or closed, but both conditions must be satisfied to get the new PR created.
   </details>


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

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


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org


Re: [PR] Fix #709 - Adding Maven Mirror configuration guide to docs [incubator-kie-kogito-docs]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #710:
URL: https://github.com/apache/incubator-kie-kogito-docs/pull/710#issuecomment-2683557882

   🎊 PR Preview eea37f7090a50842c547763bc9f091d4b0a88884 has been successfully built and deployed. See the documentation preview: https://sonataflow-docs-preview-pr-710.surge.sh
   <!-- Sticky Pull Request Comment -->
   <!-- Sticky Pull Request Comment -->


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

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


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org


Re: [PR] Fix #709 - Adding Maven Mirror configuration guide to docs [incubator-kie-kogito-docs]

Posted by "ricardozanini (via GitHub)" <gi...@apache.org>.
ricardozanini merged PR #710:
URL: https://github.com/apache/incubator-kie-kogito-docs/pull/710


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

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


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org


Re: [PR] Fix #709 - Adding Maven Mirror configuration guide to docs [incubator-kie-kogito-docs]

Posted by "ricardozanini (via GitHub)" <gi...@apache.org>.
ricardozanini commented on PR #710:
URL: https://github.com/apache/incubator-kie-kogito-docs/pull/710#issuecomment-2683557184

   @wmedvede @jakubschwan can you please help validating it?
   
   @jakubschwan this is closed related to the disconnected environment support story.


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

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


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org


Re: [PR] Fix #709 - Adding Maven Mirror configuration guide to docs [incubator-kie-kogito-docs]

Posted by "ricardozanini (via GitHub)" <gi...@apache.org>.
ricardozanini commented on code in PR #710:
URL: https://github.com/apache/incubator-kie-kogito-docs/pull/710#discussion_r2004373600


##########
serverlessworkflow/modules/ROOT/pages/cloud/config-maven.adoc:
##########
@@ -0,0 +1,115 @@
+// Note: This section can grow over time to add more Maven-related configuration and guides
+= Adding a custom Maven Mirror to {product_name} images
+:compat-mode!:
+// Metadata:
+:description: Adding a custom maven mirror to images
+:keywords: maven, mirror, central, sonatype
+// links
+:maven_mirror_guide: https://maven.apache.org/guides/mini/guide-mirror-settings.html
+
+This document describes how to configure the internal Maven settings on {product_name} images so that the maven process can access a custom mirror registry.
+
+By default either the {product_name} Builder and Devmode images have all the required Java libraries to run. In some scenarios, such as adding a custom Quarkus Extension, the internal system will require to 
+access the Maven Central registry. 
+
+In case you are running under restricted network access, you may point the container to access an internal mirror instead. See more information about this procedure on the link:{maven_mirror_guide}[Guide to Mirror Settings] on the Maven documentation.
+
+== Configuring the Maven Mirror on the Operator
+
+=== Adding a Maven Mirror when building workflows
+
+You may edit either the `SonataFlowBuild` or `SonataFlowPlatform` custom resources and add the variable `MAVEN_MIRROR_URL`.
+
+.Maven Mirror configuration example on SonataFlowBuild
+[source,yaml,subs="attributes+"]
+----
+apiVersion: sonataflow.org/v1alpha08

Review Comment:
   Yes, there's this problem. The SFB should be kicked if changed, I opened an issue: https://github.com/apache/incubator-kie-tools/issues/3016
   
   But in this case, I missed an important annotation in the guide:
   
   ```yaml
   apiVersion: sonataflow.org/v1alpha08
   kind: SonataFlowBuild
   metadata:
     name: greeting
     annotations:
       sonataflow.org/restartBuild: true
   ```



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

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


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org


Re: [PR] Fix #709 - Adding Maven Mirror configuration guide to docs [incubator-kie-kogito-docs]

Posted by "ricardozanini (via GitHub)" <gi...@apache.org>.
ricardozanini commented on PR #710:
URL: https://github.com/apache/incubator-kie-kogito-docs/pull/710#issuecomment-2738268308

   @wmedvede many thanks for the detailed review. Much appreciated! I've updated the guide with the missing info, can you take another look?


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

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


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org


Re: [PR] Fix #709 - Adding Maven Mirror configuration guide to docs [incubator-kie-kogito-docs]

Posted by "wmedvede (via GitHub)" <gi...@apache.org>.
wmedvede commented on code in PR #710:
URL: https://github.com/apache/incubator-kie-kogito-docs/pull/710#discussion_r1995400512


##########
serverlessworkflow/modules/ROOT/pages/cloud/config-maven.adoc:
##########
@@ -0,0 +1,115 @@
+// Note: This section can grow over time to add more Maven-related configuration and guides
+= Adding a custom Maven Mirror to {product_name} images
+:compat-mode!:
+// Metadata:
+:description: Adding a custom maven mirror to images
+:keywords: maven, mirror, central, sonatype
+// links
+:maven_mirror_guide: https://maven.apache.org/guides/mini/guide-mirror-settings.html
+
+This document describes how to configure the internal Maven settings on {product_name} images so that the maven process can access a custom mirror registry.
+
+By default either the {product_name} Builder and Devmode images have all the required Java libraries to run. In some scenarios, such as adding a custom Quarkus Extension, the internal system will require to 
+access the Maven Central registry. 
+
+In case you are running under restricted network access, you may point the container to access an internal mirror instead. See more information about this procedure on the link:{maven_mirror_guide}[Guide to Mirror Settings] on the Maven documentation.
+
+== Configuring the Maven Mirror on the Operator
+
+=== Adding a Maven Mirror when building workflows
+
+You may edit either the `SonataFlowBuild` or `SonataFlowPlatform` custom resources and add the variable `MAVEN_MIRROR_URL`.
+
+.Maven Mirror configuration example on SonataFlowBuild
+[source,yaml,subs="attributes+"]
+----
+apiVersion: sonataflow.org/v1alpha08
+kind: SonataFlowBuild
+metadata:
+  name: my-workflow
+spec:
+  # supreessed for brevity
+  envs:
+    - name: MAVEN_MIRROR_URL
+      value: http://my.company.registry.local
+----
+
+Changing the `SonataFlowBuild` it will only impact the given workflow instance it represents. In this case, a workflow instance in the same namespace with the name `my-workflow`.
+
+To change the Maven mirror for all build instances for the `preview` profile, you have to change the given `SonataFlowPlatform` within the same namespace.
+
+.Maven Mirror configuration example on SonataFlowPlatform
+[source,yaml,subs="attributes+"]
+----
+apiVersion: sonataflow.org/v1alpha08
+kind: SonataFlowPlatform
+metadata:
+  name: my-platform
+spec:
+  build:
+    template:
+      envs:
+        - name: MAVEN_MIRROR_URL
+          value: http://my.company.registry.local
+----
+
+When a workflow builder instance runs, it will use this information to configure the internal Maven settings file to use this URL as the default mirror to external locations, such as the Maven Central repository.
+
+For more information about building workflows with the operator see xref:cloud/operator/build-and-deploy-workflows.adoc[].
+
+=== Adding a Maven Mirror when deploying on Development Mode
+
+When deploying workflows in `devmode`, you may also add the Maven Mirror to the `SonataFlow` custom resource.
+
+.Maven Mirror configuration example on SonataFlow 
+[source,yaml,subs="attributes+"]
+----
+apiVersion: sonataflow.org/v1alpha08
+kind: SonataFlow
+metadata:
+  name: greeting
+  annotations:
+    sonataflow.org/description: Greeting example on k8s!
+    sonataflow.org/version: 0.0.1
+    sonataflow.org/profile: dev
+spec:  
+  podTemplate:
+    container:
+      envs:
+        - name: MAVEN_MIRROR_URL
+          value: http://my.company.registry.local
+  flow: #supreessed for brevity
+----
+
+[IMPORTANT]
+====
+Only workflows deployed with `dev` profile can use Maven Mirrors. Other deployment models only execute compiled code which won't need to connect to a Maven registry to run.
+====
+
+To know more about running workflows in development mode, see xref:cloud/operator/developing-workflows.adoc[].
+
+== Configuring the Maven Mirror on a custom image
+
+When building workflows in an external system using the {product_name} Builder image, you may set this environment variable preferrebly in your build context. Alternatively, you may also set it in your custom container file.
+
+.Custom Container File with Maven Mirror set as an environment variable
+[source,Dockerfile,subs="attributes+"]
+----
+FROM {sonataflow_builder_imagename}:{operator_version} AS builder
+
+# Content supressed for brevity
+
+# The Maven Mirror URL set as an env var during the build process.
+ENV MAVEN_MIRROR_URL=http://my.company.registry.local
+----
+
+.Custom Container File with Maven Mirror set as an argument
+[source,Dockerfile,subs="attributes+"]
+----
+FROM {sonataflow_builder_imagename}:{operator_version} AS builder
+
+# Content supressed for brevity
+
+# The Maven Mirror URL will be passed as an argument to the build process.
+ARG MAVEN_MIRROR_URL

Review Comment:
   This is good :+1: 



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

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


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org


Re: [PR] Fix #709 - Adding Maven Mirror configuration guide to docs [incubator-kie-kogito-docs]

Posted by "wmedvede (via GitHub)" <gi...@apache.org>.
wmedvede commented on code in PR #710:
URL: https://github.com/apache/incubator-kie-kogito-docs/pull/710#discussion_r1995324050


##########
serverlessworkflow/modules/ROOT/pages/cloud/config-maven.adoc:
##########
@@ -0,0 +1,115 @@
+// Note: This section can grow over time to add more Maven-related configuration and guides
+= Adding a custom Maven Mirror to {product_name} images
+:compat-mode!:
+// Metadata:
+:description: Adding a custom maven mirror to images
+:keywords: maven, mirror, central, sonatype
+// links
+:maven_mirror_guide: https://maven.apache.org/guides/mini/guide-mirror-settings.html
+
+This document describes how to configure the internal Maven settings on {product_name} images so that the maven process can access a custom mirror registry.
+
+By default either the {product_name} Builder and Devmode images have all the required Java libraries to run. In some scenarios, such as adding a custom Quarkus Extension, the internal system will require to 
+access the Maven Central registry. 
+
+In case you are running under restricted network access, you may point the container to access an internal mirror instead. See more information about this procedure on the link:{maven_mirror_guide}[Guide to Mirror Settings] on the Maven documentation.
+
+== Configuring the Maven Mirror on the Operator
+
+=== Adding a Maven Mirror when building workflows
+
+You may edit either the `SonataFlowBuild` or `SonataFlowPlatform` custom resources and add the variable `MAVEN_MIRROR_URL`.
+
+.Maven Mirror configuration example on SonataFlowBuild
+[source,yaml,subs="attributes+"]
+----
+apiVersion: sonataflow.org/v1alpha08
+kind: SonataFlowBuild
+metadata:
+  name: my-workflow
+spec:
+  # supreessed for brevity
+  envs:
+    - name: MAVEN_MIRROR_URL
+      value: http://my.company.registry.local
+----
+
+Changing the `SonataFlowBuild` it will only impact the given workflow instance it represents. In this case, a workflow instance in the same namespace with the name `my-workflow`.
+
+To change the Maven mirror for all build instances for the `preview` profile, you have to change the given `SonataFlowPlatform` within the same namespace.
+
+.Maven Mirror configuration example on SonataFlowPlatform
+[source,yaml,subs="attributes+"]
+----
+apiVersion: sonataflow.org/v1alpha08
+kind: SonataFlowPlatform

Review Comment:
   With SFP like this:
   
   ```
   apiVersion: sonataflow.org/v1alpha08
   kind: SonataFlowPlatform
   metadata:
     name: sonataflow-platform
   spec:
     services:
       dataIndex:
         enabled: true
       jobService:
         enabled: true
     build:
       template:
         envs:
           - name: MAVEN_MIRROR_URL
             value: http://my.company.registry.local
   ```
   
   We can see the generated build working as expected, i.e., I picked-up the mirror configuration:
   
   ![image](https://github.com/user-attachments/assets/974c12e5-cd1b-4e58-8a4e-d0c149e0a1f5)
   
   



##########
serverlessworkflow/modules/ROOT/pages/cloud/config-maven.adoc:
##########
@@ -0,0 +1,115 @@
+// Note: This section can grow over time to add more Maven-related configuration and guides
+= Adding a custom Maven Mirror to {product_name} images
+:compat-mode!:
+// Metadata:
+:description: Adding a custom maven mirror to images
+:keywords: maven, mirror, central, sonatype
+// links
+:maven_mirror_guide: https://maven.apache.org/guides/mini/guide-mirror-settings.html
+
+This document describes how to configure the internal Maven settings on {product_name} images so that the maven process can access a custom mirror registry.
+
+By default either the {product_name} Builder and Devmode images have all the required Java libraries to run. In some scenarios, such as adding a custom Quarkus Extension, the internal system will require to 
+access the Maven Central registry. 
+
+In case you are running under restricted network access, you may point the container to access an internal mirror instead. See more information about this procedure on the link:{maven_mirror_guide}[Guide to Mirror Settings] on the Maven documentation.
+
+== Configuring the Maven Mirror on the Operator
+
+=== Adding a Maven Mirror when building workflows
+
+You may edit either the `SonataFlowBuild` or `SonataFlowPlatform` custom resources and add the variable `MAVEN_MIRROR_URL`.
+
+.Maven Mirror configuration example on SonataFlowBuild
+[source,yaml,subs="attributes+"]
+----
+apiVersion: sonataflow.org/v1alpha08

Review Comment:
   I'm not sure this variant is 100% recommendable.  
   
   Note that the SonataFlowBuild is created by the recon cycle, so I think potential changes here might be overridden at any moment? I wasn't here at the time the build process was designed, maybe it's not overridden by design, and if a build exists, that build will be picked-up intentionally (see Use case 2 below), IDK this part, or maybe it can be overridden in the future. 
   
   **Use case 1:**
   
   1. created a SonataFlow
   2. I let the regular build to finish
   3. I have got locally the automatically generated SonataFlowBuild.
   4. I have modified that SonataFlowBuild
   ```
   apiVersion: sonataflow.org/v1alpha08
   kind: SonataFlowBuild
   metadata:
     name: greet2
     namespace: test
   spec:
     envs:
       - name: MAVEN_MIRROR_URL
         value: http://my.company.registry.local
   ```
   
   I have applied the modification, oc apply -f the_build.yaml
   
   With the following results:
   
   1. No new build is started 
   2. If I start a new build using the existing OpenShift BuildConfig
   3. The modifications in the SFB are not picked up, since the OpenShift BuildConfig was generated before.
   
   So in this flow, the modifications are not picked-up
   
   **Use Case 2:**
   
   1. I create the modifyed my_build.yaml **before deploying** the SonataFlow, since we know what the generated SonataFlowBuild name will be. 
   ```
   
   apiVersion: sonataflow.org/v1alpha08
   kind: SonataFlowBuild
   metadata:
     name: greet2
     namespace: test
   spec:
     envs:
       - name: MAVEN_MIRROR_URL
         value: http://my.company.registry.local
   ```
   In the operator logs we can see these errors:
   
   `E0314 09:55:57.361511 1 controller.go:316] "msg"="Reconciler error" "error"="SonataFlow.sonataflow.org \"greet2\" not found" "SonataFlowBuild"={"name":"greet2","namespace":"test"} "controller"="sonataflowbuild" "controllerGroup"="sonataflow.org" "controllerKind"="SonataFlowBuild" "logger"="sonataflow-manager" "name"="greet2" "namespace"="test" "reconcileID"="0185c1b2-974f-4d5d-ab93-d2ef969afc46"`
   
   and of course, no OpenShift build is created, etc.
   
   
   2) ok, now we deploy the SonataFlow. But no build is started immediately. We can see the workflow status like this:
   
   ```
   NAME     PROFILE   VERSION   URL   READY   REASON
   apiVersion: sonataflow.org/v1alpha08
   greet2   preview   1.0             False   WaitingForBuild
   ```
   
   3) After some time, on new recon cycle it looks like the like the existing build is picked up, and an OpenShit build starts.
   
   In the build logs we can see:
   
   ![image](https://github.com/user-attachments/assets/39258a20-b991-4b51-9c72-039c3a2ab666)
   
   So, it looks like the mirror configuration was picked up.
   
   In that particular configuration build won't work well, I'm using a fake mirror, but it in the presence of a real mirror, it's expected that the build will finish successfully.
   
   
   **Open questions:** IDK if this existing SonataFlowBuild is potentially merged with build template configurations that could exist in the existing SonataFlowPlatform if any? (if an existing SFB has precedence I'd expect that no)
   
   **Conclusion:**  If the existing build is picked-up by design and not overridden, I'd suggest explaining a bit more detailed the sequence on how to make "Use case 2" work.
   
   "Use case 1" is not working, if it's expected to do, will definitively need some love. 
   
   
   
   
   
   
   
   
   
   
   
   
   



##########
serverlessworkflow/modules/ROOT/pages/cloud/config-maven.adoc:
##########
@@ -0,0 +1,115 @@
+// Note: This section can grow over time to add more Maven-related configuration and guides
+= Adding a custom Maven Mirror to {product_name} images
+:compat-mode!:
+// Metadata:
+:description: Adding a custom maven mirror to images
+:keywords: maven, mirror, central, sonatype
+// links
+:maven_mirror_guide: https://maven.apache.org/guides/mini/guide-mirror-settings.html
+
+This document describes how to configure the internal Maven settings on {product_name} images so that the maven process can access a custom mirror registry.
+
+By default either the {product_name} Builder and Devmode images have all the required Java libraries to run. In some scenarios, such as adding a custom Quarkus Extension, the internal system will require to 
+access the Maven Central registry. 
+
+In case you are running under restricted network access, you may point the container to access an internal mirror instead. See more information about this procedure on the link:{maven_mirror_guide}[Guide to Mirror Settings] on the Maven documentation.
+
+== Configuring the Maven Mirror on the Operator
+
+=== Adding a Maven Mirror when building workflows
+
+You may edit either the `SonataFlowBuild` or `SonataFlowPlatform` custom resources and add the variable `MAVEN_MIRROR_URL`.
+
+.Maven Mirror configuration example on SonataFlowBuild
+[source,yaml,subs="attributes+"]
+----
+apiVersion: sonataflow.org/v1alpha08
+kind: SonataFlowBuild
+metadata:
+  name: my-workflow
+spec:
+  # supreessed for brevity
+  envs:
+    - name: MAVEN_MIRROR_URL
+      value: http://my.company.registry.local
+----
+
+Changing the `SonataFlowBuild` it will only impact the given workflow instance it represents. In this case, a workflow instance in the same namespace with the name `my-workflow`.
+
+To change the Maven mirror for all build instances for the `preview` profile, you have to change the given `SonataFlowPlatform` within the same namespace.
+
+.Maven Mirror configuration example on SonataFlowPlatform
+[source,yaml,subs="attributes+"]
+----
+apiVersion: sonataflow.org/v1alpha08
+kind: SonataFlowPlatform
+metadata:
+  name: my-platform
+spec:
+  build:
+    template:
+      envs:
+        - name: MAVEN_MIRROR_URL
+          value: http://my.company.registry.local
+----
+
+When a workflow builder instance runs, it will use this information to configure the internal Maven settings file to use this URL as the default mirror to external locations, such as the Maven Central repository.
+
+For more information about building workflows with the operator see xref:cloud/operator/build-and-deploy-workflows.adoc[].
+
+=== Adding a Maven Mirror when deploying on Development Mode
+
+When deploying workflows in `devmode`, you may also add the Maven Mirror to the `SonataFlow` custom resource.
+
+.Maven Mirror configuration example on SonataFlow 
+[source,yaml,subs="attributes+"]
+----
+apiVersion: sonataflow.org/v1alpha08
+kind: SonataFlow
+metadata:
+  name: greeting
+  annotations:
+    sonataflow.org/description: Greeting example on k8s!
+    sonataflow.org/version: 0.0.1
+    sonataflow.org/profile: dev
+spec:  
+  podTemplate:
+    container:
+      envs:

Review Comment:
   Couple of considerations here:
   
   I think the configuration for this case should be using  the **env** field and not **envs**, still see my comments below:
   
   **Configuration using envs**
   
   I have used a configuration using **envs**
   In the generated POD, I can see this:
   
   ![image](https://github.com/user-attachments/assets/efa50ee0-cb81-44a2-8480-30656114d858)
   
   :point_up: It looks like no environment parameters were passed to the POD
   
   The POD starts as expected, etc., and looks to be working fine, see log here: https://gist.github.com/wmedvede/593fac2ed15e9a72a9b57e89bb46b987
   
   **Configuration using env**
   
   My workflow is like this:
   
   ```
   apiVersion: sonataflow.org/v1alpha08
   kind: SonataFlow
   metadata:
     name: greet
     annotations:
       sonataflow.org/description: YAML based greeting workflow
       sonataflow.org/version: '1.0'
       sonataflow.org/expressionLang: jsonpath
       sonataflow.org/profile: dev
   spec:
     podTemplate:
       container:
         env:
           - name: MAVEN_MIRROR_URL
             value: http://my.company.registry.local
   ```
   
   In the generated POD, I can see this:
   
   ![image](https://github.com/user-attachments/assets/3d9fd884-f6a7-4c5a-a3fe-523fc8a14ad5)
   
   :point_up: Good!, the POD has the expected env var.
   
   The pod starts and works like expected, see logs here: https://gist.github.com/wmedvede/c983bec2d0135749479c362ac3f082c5
   
   **Howerver I'd expect and error, since we have configured a fake mirror   http://my.company.registry.local** 
   
   Looks like this is not working well, or I'm doing something wrong.
   



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

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


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org


Re: [PR] Fix #709 - Adding Maven Mirror configuration guide to docs [incubator-kie-kogito-docs]

Posted by "wmedvede (via GitHub)" <gi...@apache.org>.
wmedvede commented on code in PR #710:
URL: https://github.com/apache/incubator-kie-kogito-docs/pull/710#discussion_r1995394406


##########
serverlessworkflow/modules/ROOT/pages/cloud/config-maven.adoc:
##########
@@ -0,0 +1,115 @@
+// Note: This section can grow over time to add more Maven-related configuration and guides
+= Adding a custom Maven Mirror to {product_name} images
+:compat-mode!:
+// Metadata:
+:description: Adding a custom maven mirror to images
+:keywords: maven, mirror, central, sonatype
+// links
+:maven_mirror_guide: https://maven.apache.org/guides/mini/guide-mirror-settings.html
+
+This document describes how to configure the internal Maven settings on {product_name} images so that the maven process can access a custom mirror registry.
+
+By default either the {product_name} Builder and Devmode images have all the required Java libraries to run. In some scenarios, such as adding a custom Quarkus Extension, the internal system will require to 
+access the Maven Central registry. 
+
+In case you are running under restricted network access, you may point the container to access an internal mirror instead. See more information about this procedure on the link:{maven_mirror_guide}[Guide to Mirror Settings] on the Maven documentation.
+
+== Configuring the Maven Mirror on the Operator
+
+=== Adding a Maven Mirror when building workflows
+
+You may edit either the `SonataFlowBuild` or `SonataFlowPlatform` custom resources and add the variable `MAVEN_MIRROR_URL`.
+
+.Maven Mirror configuration example on SonataFlowBuild
+[source,yaml,subs="attributes+"]
+----
+apiVersion: sonataflow.org/v1alpha08
+kind: SonataFlowBuild
+metadata:
+  name: my-workflow
+spec:
+  # supreessed for brevity
+  envs:
+    - name: MAVEN_MIRROR_URL
+      value: http://my.company.registry.local
+----
+
+Changing the `SonataFlowBuild` it will only impact the given workflow instance it represents. In this case, a workflow instance in the same namespace with the name `my-workflow`.
+
+To change the Maven mirror for all build instances for the `preview` profile, you have to change the given `SonataFlowPlatform` within the same namespace.
+
+.Maven Mirror configuration example on SonataFlowPlatform
+[source,yaml,subs="attributes+"]
+----
+apiVersion: sonataflow.org/v1alpha08
+kind: SonataFlowPlatform
+metadata:
+  name: my-platform
+spec:
+  build:
+    template:
+      envs:
+        - name: MAVEN_MIRROR_URL
+          value: http://my.company.registry.local
+----
+
+When a workflow builder instance runs, it will use this information to configure the internal Maven settings file to use this URL as the default mirror to external locations, such as the Maven Central repository.
+
+For more information about building workflows with the operator see xref:cloud/operator/build-and-deploy-workflows.adoc[].
+
+=== Adding a Maven Mirror when deploying on Development Mode
+
+When deploying workflows in `devmode`, you may also add the Maven Mirror to the `SonataFlow` custom resource.
+
+.Maven Mirror configuration example on SonataFlow 
+[source,yaml,subs="attributes+"]
+----
+apiVersion: sonataflow.org/v1alpha08
+kind: SonataFlow
+metadata:
+  name: greeting
+  annotations:
+    sonataflow.org/description: Greeting example on k8s!
+    sonataflow.org/version: 0.0.1
+    sonataflow.org/profile: dev
+spec:  
+  podTemplate:
+    container:
+      envs:

Review Comment:
   Hmmm, maybe it's working well because no extra quarkus extension is being used...., and thus no need to download anything.



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

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


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org


Re: [PR] Fix #709 - Adding Maven Mirror configuration guide to docs [incubator-kie-kogito-docs]

Posted by "ricardozanini (via GitHub)" <gi...@apache.org>.
ricardozanini commented on code in PR #710:
URL: https://github.com/apache/incubator-kie-kogito-docs/pull/710#discussion_r2004365342


##########
serverlessworkflow/modules/ROOT/pages/cloud/config-maven.adoc:
##########
@@ -0,0 +1,115 @@
+// Note: This section can grow over time to add more Maven-related configuration and guides
+= Adding a custom Maven Mirror to {product_name} images
+:compat-mode!:
+// Metadata:
+:description: Adding a custom maven mirror to images
+:keywords: maven, mirror, central, sonatype
+// links
+:maven_mirror_guide: https://maven.apache.org/guides/mini/guide-mirror-settings.html
+
+This document describes how to configure the internal Maven settings on {product_name} images so that the maven process can access a custom mirror registry.
+
+By default either the {product_name} Builder and Devmode images have all the required Java libraries to run. In some scenarios, such as adding a custom Quarkus Extension, the internal system will require to 
+access the Maven Central registry. 
+
+In case you are running under restricted network access, you may point the container to access an internal mirror instead. See more information about this procedure on the link:{maven_mirror_guide}[Guide to Mirror Settings] on the Maven documentation.
+
+== Configuring the Maven Mirror on the Operator
+
+=== Adding a Maven Mirror when building workflows
+
+You may edit either the `SonataFlowBuild` or `SonataFlowPlatform` custom resources and add the variable `MAVEN_MIRROR_URL`.
+
+.Maven Mirror configuration example on SonataFlowBuild
+[source,yaml,subs="attributes+"]
+----
+apiVersion: sonataflow.org/v1alpha08
+kind: SonataFlowBuild
+metadata:
+  name: my-workflow
+spec:
+  # supreessed for brevity
+  envs:
+    - name: MAVEN_MIRROR_URL
+      value: http://my.company.registry.local
+----
+
+Changing the `SonataFlowBuild` it will only impact the given workflow instance it represents. In this case, a workflow instance in the same namespace with the name `my-workflow`.
+
+To change the Maven mirror for all build instances for the `preview` profile, you have to change the given `SonataFlowPlatform` within the same namespace.
+
+.Maven Mirror configuration example on SonataFlowPlatform
+[source,yaml,subs="attributes+"]
+----
+apiVersion: sonataflow.org/v1alpha08
+kind: SonataFlowPlatform
+metadata:
+  name: my-platform
+spec:
+  build:
+    template:
+      envs:
+        - name: MAVEN_MIRROR_URL
+          value: http://my.company.registry.local
+----
+
+When a workflow builder instance runs, it will use this information to configure the internal Maven settings file to use this URL as the default mirror to external locations, such as the Maven Central repository.
+
+For more information about building workflows with the operator see xref:cloud/operator/build-and-deploy-workflows.adoc[].
+
+=== Adding a Maven Mirror when deploying on Development Mode
+
+When deploying workflows in `devmode`, you may also add the Maven Mirror to the `SonataFlow` custom resource.
+
+.Maven Mirror configuration example on SonataFlow 
+[source,yaml,subs="attributes+"]
+----
+apiVersion: sonataflow.org/v1alpha08
+kind: SonataFlow
+metadata:
+  name: greeting
+  annotations:
+    sonataflow.org/description: Greeting example on k8s!
+    sonataflow.org/version: 0.0.1
+    sonataflow.org/profile: dev
+spec:  
+  podTemplate:
+    container:
+      envs:

Review Comment:
   Hmm a missed typo. Wondering if it's a ctrl+s without the ctrl. What a mess. Nice catch!



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

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


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org


Re: [PR] Fix #709 - Adding Maven Mirror configuration guide to docs [incubator-kie-kogito-docs]

Posted by "wmedvede (via GitHub)" <gi...@apache.org>.
wmedvede commented on code in PR #710:
URL: https://github.com/apache/incubator-kie-kogito-docs/pull/710#discussion_r1995410965


##########
serverlessworkflow/modules/ROOT/pages/cloud/config-maven.adoc:
##########
@@ -0,0 +1,115 @@
+// Note: This section can grow over time to add more Maven-related configuration and guides
+= Adding a custom Maven Mirror to {product_name} images
+:compat-mode!:
+// Metadata:
+:description: Adding a custom maven mirror to images
+:keywords: maven, mirror, central, sonatype
+// links
+:maven_mirror_guide: https://maven.apache.org/guides/mini/guide-mirror-settings.html
+
+This document describes how to configure the internal Maven settings on {product_name} images so that the maven process can access a custom mirror registry.
+
+By default either the {product_name} Builder and Devmode images have all the required Java libraries to run. In some scenarios, such as adding a custom Quarkus Extension, the internal system will require to 
+access the Maven Central registry. 
+
+In case you are running under restricted network access, you may point the container to access an internal mirror instead. See more information about this procedure on the link:{maven_mirror_guide}[Guide to Mirror Settings] on the Maven documentation.
+
+== Configuring the Maven Mirror on the Operator
+
+=== Adding a Maven Mirror when building workflows
+
+You may edit either the `SonataFlowBuild` or `SonataFlowPlatform` custom resources and add the variable `MAVEN_MIRROR_URL`.
+
+.Maven Mirror configuration example on SonataFlowBuild
+[source,yaml,subs="attributes+"]
+----
+apiVersion: sonataflow.org/v1alpha08
+kind: SonataFlowBuild
+metadata:
+  name: my-workflow
+spec:
+  # supreessed for brevity
+  envs:
+    - name: MAVEN_MIRROR_URL
+      value: http://my.company.registry.local
+----
+
+Changing the `SonataFlowBuild` it will only impact the given workflow instance it represents. In this case, a workflow instance in the same namespace with the name `my-workflow`.
+
+To change the Maven mirror for all build instances for the `preview` profile, you have to change the given `SonataFlowPlatform` within the same namespace.
+
+.Maven Mirror configuration example on SonataFlowPlatform
+[source,yaml,subs="attributes+"]
+----
+apiVersion: sonataflow.org/v1alpha08
+kind: SonataFlowPlatform
+metadata:
+  name: my-platform
+spec:
+  build:
+    template:
+      envs:
+        - name: MAVEN_MIRROR_URL
+          value: http://my.company.registry.local
+----
+
+When a workflow builder instance runs, it will use this information to configure the internal Maven settings file to use this URL as the default mirror to external locations, such as the Maven Central repository.
+
+For more information about building workflows with the operator see xref:cloud/operator/build-and-deploy-workflows.adoc[].
+
+=== Adding a Maven Mirror when deploying on Development Mode
+
+When deploying workflows in `devmode`, you may also add the Maven Mirror to the `SonataFlow` custom resource.
+
+.Maven Mirror configuration example on SonataFlow 
+[source,yaml,subs="attributes+"]
+----
+apiVersion: sonataflow.org/v1alpha08
+kind: SonataFlow
+metadata:
+  name: greeting
+  annotations:
+    sonataflow.org/description: Greeting example on k8s!
+    sonataflow.org/version: 0.0.1
+    sonataflow.org/profile: dev
+spec:  
+  podTemplate:
+    container:
+      envs:

Review Comment:
   ```suggestion
         env:
   ```



##########
serverlessworkflow/modules/ROOT/pages/cloud/config-maven.adoc:
##########
@@ -0,0 +1,115 @@
+// Note: This section can grow over time to add more Maven-related configuration and guides
+= Adding a custom Maven Mirror to {product_name} images
+:compat-mode!:
+// Metadata:
+:description: Adding a custom maven mirror to images
+:keywords: maven, mirror, central, sonatype
+// links
+:maven_mirror_guide: https://maven.apache.org/guides/mini/guide-mirror-settings.html
+
+This document describes how to configure the internal Maven settings on {product_name} images so that the maven process can access a custom mirror registry.
+
+By default either the {product_name} Builder and Devmode images have all the required Java libraries to run. In some scenarios, such as adding a custom Quarkus Extension, the internal system will require to 
+access the Maven Central registry. 
+
+In case you are running under restricted network access, you may point the container to access an internal mirror instead. See more information about this procedure on the link:{maven_mirror_guide}[Guide to Mirror Settings] on the Maven documentation.
+
+== Configuring the Maven Mirror on the Operator
+
+=== Adding a Maven Mirror when building workflows
+
+You may edit either the `SonataFlowBuild` or `SonataFlowPlatform` custom resources and add the variable `MAVEN_MIRROR_URL`.
+
+.Maven Mirror configuration example on SonataFlowBuild
+[source,yaml,subs="attributes+"]
+----
+apiVersion: sonataflow.org/v1alpha08
+kind: SonataFlowBuild
+metadata:
+  name: my-workflow
+spec:
+  # supreessed for brevity
+  envs:
+    - name: MAVEN_MIRROR_URL
+      value: http://my.company.registry.local
+----
+
+Changing the `SonataFlowBuild` it will only impact the given workflow instance it represents. In this case, a workflow instance in the same namespace with the name `my-workflow`.
+
+To change the Maven mirror for all build instances for the `preview` profile, you have to change the given `SonataFlowPlatform` within the same namespace.
+
+.Maven Mirror configuration example on SonataFlowPlatform
+[source,yaml,subs="attributes+"]
+----
+apiVersion: sonataflow.org/v1alpha08
+kind: SonataFlowPlatform
+metadata:
+  name: my-platform
+spec:
+  build:
+    template:
+      envs:
+        - name: MAVEN_MIRROR_URL
+          value: http://my.company.registry.local
+----
+
+When a workflow builder instance runs, it will use this information to configure the internal Maven settings file to use this URL as the default mirror to external locations, such as the Maven Central repository.
+
+For more information about building workflows with the operator see xref:cloud/operator/build-and-deploy-workflows.adoc[].
+
+=== Adding a Maven Mirror when deploying on Development Mode
+
+When deploying workflows in `devmode`, you may also add the Maven Mirror to the `SonataFlow` custom resource.
+
+.Maven Mirror configuration example on SonataFlow 
+[source,yaml,subs="attributes+"]
+----
+apiVersion: sonataflow.org/v1alpha08
+kind: SonataFlow
+metadata:
+  name: greeting
+  annotations:
+    sonataflow.org/description: Greeting example on k8s!
+    sonataflow.org/version: 0.0.1
+    sonataflow.org/profile: dev
+spec:  
+  podTemplate:
+    container:
+      envs:

Review Comment:
   @ricardozanini YES, with a configuration like this:
   
   ```
   spec:
     podTemplate:
       container:
         env:
           - name: MAVEN_MIRROR_URL
             value: http://my.company.registry.local
           - name: QUARKUS_EXTENSIONS
             value: "io.quarkus:quarkus-jdbc-postgresql:3.8.6.redhat-00004,io.quarkus:quarkus-agroal:3.8.6.redhat-00004,org.kie:kie-addons-quarkus-persistence-jdbc:9.102.0.redhat-00005"
   ```
   
   The build starts trying to get the extensions from the fake mirror. See below.
   So I conclude we must simply use **env** instead of **envs**
   
   
   
   INFO Processed extensions to be added io.quarkus:quarkus-jdbc-postgresql:3.8.6.redhat-00004,io.quarkus:quarkus-agroal:3.8.6.redhat-00004,org.kie:kie-addons-quarkus-persistence-jdbc:9.102.0.redhat-00005
   [INFO] Scanning for projects...
   [INFO]
   [INFO] ----------------< org.acme:serverless-workflow-project >----------------
   [INFO] Building serverless-workflow-project 1.0.0-SNAPSHOT
   [INFO] --------------------------------[ jar ]---------------------------------
   [INFO]
   [INFO] --- quarkus-maven-plugin:3.15.3:add-extension (default-cli) @ serverless-workflow-project ---
   [INFO] Downloading from mirror.default: http://my.company.registry.local/io/quarkus/registry/quarkus-registry-descriptor/1.0-SNAPSHOT/maven-metadata.xml
   [WARNING] Could not transfer metadata io.quarkus.registry:quarkus-registry-descriptor:1.0-SNAPSHOT/maven-metadata.xml from/to mirror.default (http://my.company.registry.local): transfer failed for http://my.company.registry.local/io/quarkus/registry/quarkus-registry-descriptor/1.0-SNAPSHOT/maven-metadata.xml
   [INFO] Downloading from mirror.default: http://my.company.registry.local/io/quarkus/registry/quarkus-registry-descriptor/1.0-SNAPSHOT/quarkus-registry-descriptor-1.0-SNAPSHOT.json
   [WARNING] Failed to resolve the Quarkus extension registry descriptor of registry.quarkus.io from mirror.default (http://my.company.registry.local) having applied the mirrors and/or proxies from the Maven settings to registry.quarkus.io (https://registry.quarkus.io/maven). Re-trying with the original registry.quarkus.io repository configuration.
   [INFO] Downloading from registry.quarkus.io: https://registry.quarkus.io/maven/io/quarkus/registry/quarkus-registry-descriptor/1.0-SNAPSHOT/maven-metadata.xml
   [INFO] Downloaded from registry.quarkus.io: https://registry.quarkus.io/maven/io/quarkus/registry/quarkus-registry-descriptor/1.0-SNAPSHOT/maven-metadata.xml (50 kB at 223 kB/s)
   [INFO] Downloading from registry.quarkus.io: https://registry.quarkus.io/maven/io/quarkus/registry/quarkus-registry-descriptor/1.0-SNAPSHOT/quarkus-registry-descriptor-1.0-20250314.002336-1.json
   [INFO] Downloaded from registry.quarkus.io: https://registry.quarkus.io/maven/io/quarkus/registry/quarkus-registry-descriptor/1.0-SNAPSHOT/quarkus-registry-descriptor-1.0-20250314.002336-1.json (470 B at 7.1 kB/s)
   [INFO] Looking for the newly published extensions in registry.quarkus.io
   [INFO] Downloading from registry.quarkus.io: https://registry.quarkus.io/maven/io/quarkus/registry/quarkus-platforms/1.0-SNAPSHOT/maven-metadata.xml
   [INFO] Downloaded from registry.quarkus.io: https://registry.quarkus.io/maven/io/quarkus/registry/quarkus-platforms/1.0-SNAPSHOT/maven-metadata.xml (50 kB at 558 kB/s)
   [INFO] Downloading from registry.quarkus.io: https://registry.quarkus.io/maven/io/quarkus/registry/quarkus-platforms/1.0-SNAPSHOT/quarkus-platforms-1.0-20250314.002336-1-3.15.3.json
   [INFO] Downloaded from registry.quarkus.io: https://registry.quarkus.io/maven/io/quarkus/registry/quarkus-platforms/1.0-SNAPSHOT/quarkus-platforms-1.0-20250314.002336-1-3.15.3.json (929 B at 6.6 kB/s)
   [INFO] Downloading from registry.quarkus.io: https://registry.quarkus.io/maven/io/quarkus/registry/quarkus-non-platform-extensions/1.0-SNAPSHOT/maven-metadata.xml
   [INFO] Downloaded from registry.quarkus.io: https://registry.quarkus.io/maven/io/quarkus/registry/quarkus-non-platform-extensions/1.0-SNAPSHOT/maven-metadata.xml (50 kB at 534 kB/s)
   [INFO] Downloading from registry.quarkus.io: https://registry.quarkus.io/maven/io/quarkus/registry/quarkus-non-platform-extensions/1.0-SNAPSHOT/quarkus-non-platform-extensions-1.0-20250314.002336-1-3.15.3.json
   [INFO] Downloaded from registry.quarkus.io: https://registry.quarkus.io/maven/io/quarkus/registry/quarkus-non-platform-extensions/1.0-SNAPSHOT/quarkus-non-platfo
   



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

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


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org


Re: [PR] Fix #709 - Adding Maven Mirror configuration guide to docs [incubator-kie-kogito-docs]

Posted by "wmedvede (via GitHub)" <gi...@apache.org>.
wmedvede commented on code in PR #710:
URL: https://github.com/apache/incubator-kie-kogito-docs/pull/710#discussion_r1995400512


##########
serverlessworkflow/modules/ROOT/pages/cloud/config-maven.adoc:
##########
@@ -0,0 +1,115 @@
+// Note: This section can grow over time to add more Maven-related configuration and guides
+= Adding a custom Maven Mirror to {product_name} images
+:compat-mode!:
+// Metadata:
+:description: Adding a custom maven mirror to images
+:keywords: maven, mirror, central, sonatype
+// links
+:maven_mirror_guide: https://maven.apache.org/guides/mini/guide-mirror-settings.html
+
+This document describes how to configure the internal Maven settings on {product_name} images so that the maven process can access a custom mirror registry.
+
+By default either the {product_name} Builder and Devmode images have all the required Java libraries to run. In some scenarios, such as adding a custom Quarkus Extension, the internal system will require to 
+access the Maven Central registry. 
+
+In case you are running under restricted network access, you may point the container to access an internal mirror instead. See more information about this procedure on the link:{maven_mirror_guide}[Guide to Mirror Settings] on the Maven documentation.
+
+== Configuring the Maven Mirror on the Operator
+
+=== Adding a Maven Mirror when building workflows
+
+You may edit either the `SonataFlowBuild` or `SonataFlowPlatform` custom resources and add the variable `MAVEN_MIRROR_URL`.
+
+.Maven Mirror configuration example on SonataFlowBuild
+[source,yaml,subs="attributes+"]
+----
+apiVersion: sonataflow.org/v1alpha08
+kind: SonataFlowBuild
+metadata:
+  name: my-workflow
+spec:
+  # supreessed for brevity
+  envs:
+    - name: MAVEN_MIRROR_URL
+      value: http://my.company.registry.local
+----
+
+Changing the `SonataFlowBuild` it will only impact the given workflow instance it represents. In this case, a workflow instance in the same namespace with the name `my-workflow`.
+
+To change the Maven mirror for all build instances for the `preview` profile, you have to change the given `SonataFlowPlatform` within the same namespace.
+
+.Maven Mirror configuration example on SonataFlowPlatform
+[source,yaml,subs="attributes+"]
+----
+apiVersion: sonataflow.org/v1alpha08
+kind: SonataFlowPlatform
+metadata:
+  name: my-platform
+spec:
+  build:
+    template:
+      envs:
+        - name: MAVEN_MIRROR_URL
+          value: http://my.company.registry.local
+----
+
+When a workflow builder instance runs, it will use this information to configure the internal Maven settings file to use this URL as the default mirror to external locations, such as the Maven Central repository.
+
+For more information about building workflows with the operator see xref:cloud/operator/build-and-deploy-workflows.adoc[].
+
+=== Adding a Maven Mirror when deploying on Development Mode
+
+When deploying workflows in `devmode`, you may also add the Maven Mirror to the `SonataFlow` custom resource.
+
+.Maven Mirror configuration example on SonataFlow 
+[source,yaml,subs="attributes+"]
+----
+apiVersion: sonataflow.org/v1alpha08
+kind: SonataFlow
+metadata:
+  name: greeting
+  annotations:
+    sonataflow.org/description: Greeting example on k8s!
+    sonataflow.org/version: 0.0.1
+    sonataflow.org/profile: dev
+spec:  
+  podTemplate:
+    container:
+      envs:
+        - name: MAVEN_MIRROR_URL
+          value: http://my.company.registry.local
+  flow: #supreessed for brevity
+----
+
+[IMPORTANT]
+====
+Only workflows deployed with `dev` profile can use Maven Mirrors. Other deployment models only execute compiled code which won't need to connect to a Maven registry to run.
+====
+
+To know more about running workflows in development mode, see xref:cloud/operator/developing-workflows.adoc[].
+
+== Configuring the Maven Mirror on a custom image
+
+When building workflows in an external system using the {product_name} Builder image, you may set this environment variable preferrebly in your build context. Alternatively, you may also set it in your custom container file.
+
+.Custom Container File with Maven Mirror set as an environment variable
+[source,Dockerfile,subs="attributes+"]
+----
+FROM {sonataflow_builder_imagename}:{operator_version} AS builder
+
+# Content supressed for brevity
+
+# The Maven Mirror URL set as an env var during the build process.
+ENV MAVEN_MIRROR_URL=http://my.company.registry.local
+----
+
+.Custom Container File with Maven Mirror set as an argument
+[source,Dockerfile,subs="attributes+"]
+----
+FROM {sonataflow_builder_imagename}:{operator_version} AS builder
+
+# Content supressed for brevity
+
+# The Maven Mirror URL will be passed as an argument to the build process.
+ARG MAVEN_MIRROR_URL

Review Comment:
   :+1: 



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

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


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org