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

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


The following commit(s) were added to refs/heads/main by this push:
     new 582157914 chore(doc): Integration from Git
582157914 is described below

commit 5821579148af1cf514dfcdfe9097f838d5da1a47
Author: Pasquale Congiusti <pasquale.congiu...@gmail.com>
AuthorDate: Mon May 12 18:09:22 2025 +0200

    chore(doc): Integration from Git
    
    Closes #6136
---
 docs/modules/ROOT/nav.adoc                         |  1 +
 .../modules/ROOT/pages/running/build-from-git.adoc | 48 ++++++++++++++++++++++
 2 files changed, 49 insertions(+)

diff --git a/docs/modules/ROOT/nav.adoc b/docs/modules/ROOT/nav.adoc
index 85867dc57..d7832331e 100644
--- a/docs/modules/ROOT/nav.adoc
+++ b/docs/modules/ROOT/nav.adoc
@@ -21,6 +21,7 @@
 *** xref:installation/advanced/pruning-registry.adoc[Pruning Registry]
 * xref:running/running.adoc[Run an Integration]
 ** xref:running/running-cli.adoc[kamel run CLI]
+** xref:running/build-from-git.adoc[Git hosted Integrations]
 ** xref:running/self-managed.adoc[Self managed Integrations]
 ** xref:running/synthetic.adoc[Synthetic Integrations]
 ** xref:running/promoting.adoc[Promote an Integration]
diff --git a/docs/modules/ROOT/pages/running/build-from-git.adoc 
b/docs/modules/ROOT/pages/running/build-from-git.adoc
new file mode 100644
index 000000000..8f5dcd05c
--- /dev/null
+++ b/docs/modules/ROOT/pages/running/build-from-git.adoc
@@ -0,0 +1,48 @@
+= Build project hosted in a Git repository
+
+The Camel K operator traditionally run an Integration from a Camel DSL source. 
There are however use cases where instead of a Camel route, the user wants to 
provide entirely a Camel project. With the Integration `.spec.git` 
configuration you can instruct the operator to build and run a new Camel 
application directly from a project stored in a Git repository.
+
+The project has to be a regular Camel Maven project with no other major 
constraints. The operator will take care to clone the project, build it and run 
it as it uses to do with any other Camel application.
+
+NOTE: no intermediate IntegrationKit object will be generated, hence, the 
project won't be reused for any incremental builds.
+
+This feature matches very well with the output of Camel JBang (ie, `camel 
export`), which can be a great tool for local prototyping and testing.
+
+== How to configure it
+
+You can use the `git` specification available in the Integration custom 
resource:
+
+```yaml
+apiVersion: camel.apache.org/v1
+kind: Integration
+metadata:
+  name: sample
+spec:
+  git:
+    url: https://github.com/squakez/sample.git
+    secret: my-secret (optional)
+```
+
+If the project is not public (like it probably happens) you will need to 
provide the token as expected by the Git technology used. The secret has to be 
a regular Kubernetes Secret in the same namespace of the Integration.
+
+NOTE: the feature still allows running projects in the `main` branch only.
+
+The operator will start a Build custom resource, whose goal is to build and 
package the project into a container how it is happening for any other 
Integration. You can continue to use normally any trait, although certain build 
traits will be ignored as it also happens in Self Managed Build Integrations.
+
+== CLI
+
+The `kamel` CLI is equipped with a `--git` option that you can use to provide 
the project repository.
+
+== Rebuild
+
+In order to trigger a rebuild of an Integration you will need to `kamel reset` 
or to wipe off the Integration `status` as it normally happens for any other 
regular Integration.
+
+== GitOps
+
+The possibility to build directly from the Git repo will give you more 
flexibility to close the loop between your CICD which is taking care to build 
an application and to deploy it.
+
+== Future developments
+
+This feature is in its early stage and will be possibly the base for the 
future Camel K developments. Feel free to vote or to add your requirement into 
the 
https://github.com/apache/camel-k/issues?q=is%3Aissue%20state%3Aopen%20label%3Aarea%2Fgit[git
 area issues we are collecting].
+
+

Reply via email to