You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by ac...@apache.org on 2021/04/20 12:58:14 UTC

[camel-kamelets] branch exec-sink updated (307f113 -> 8af5996)

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

acosentino pushed a change to branch exec-sink
in repository https://gitbox.apache.org/repos/asf/camel-kamelets.git.


    from 307f113  Added Exec Sink Kamelet
     new 7f24658  Added Exec Sink Kamelet
     new 8af5996  Added Exec Sink Kamelet

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 docs/modules/ROOT/pages/exec-sink.adoc |  8 ++++++--
 exec-sink.kamelet.yaml                 | 24 ++++++++++++++++++------
 2 files changed, 24 insertions(+), 8 deletions(-)

[camel-kamelets] 01/02: Added Exec Sink Kamelet

Posted by ac...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

acosentino pushed a commit to branch exec-sink
in repository https://gitbox.apache.org/repos/asf/camel-kamelets.git

commit 7f24658f5fc6964243bbb35dfff3f956a45430e9
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Tue Apr 20 14:57:45 2021 +0200

    Added Exec Sink Kamelet
---
 exec-sink.kamelet.yaml | 24 ++++++++++++++++++------
 1 file changed, 18 insertions(+), 6 deletions(-)

diff --git a/exec-sink.kamelet.yaml b/exec-sink.kamelet.yaml
index bafa104..78bbadf 100644
--- a/exec-sink.kamelet.yaml
+++ b/exec-sink.kamelet.yaml
@@ -12,6 +12,12 @@ spec:
     title: Exec Sink
     description: |-
       Execute system commands
+
+      The Kamelet expects the following headers to be set:
+
+      - `args/ `ce-args`: as the args to be set on the executable.
+
+      If the header won't be set the executable will be run without arguments.
     required:
       - executable
       - args
@@ -20,17 +26,23 @@ spec:
         title: Executable command
         description: The command to execute
         type: string
-      args:
-        title: The arguments
-        description: Arguments to pass to the executables
-        type: string
   flow:
     from:
       uri: kamelet:source
       steps:
+      - choice:
+          when:
+          - simple: "${header[args]}"
+            steps:
+            - set-header:
+                name: CamelExecCommandArgs
+                simple: "${header[args]}"
+          - simple: "${header[ce-args]}"
+            steps:
+            - set-header:
+                name: CamelExecCommandArgs
+                simple: "${header[ce-args]}"
       - to:
           uri: "exec:{{executable}}"
-          parameters:
-            args: "{{args}}"
       - set-body:
           simple: "${body.stdout}"

[camel-kamelets] 02/02: Added Exec Sink Kamelet

Posted by ac...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

acosentino pushed a commit to branch exec-sink
in repository https://gitbox.apache.org/repos/asf/camel-kamelets.git

commit 8af5996ef80dbd5590c6055947a26d68d11d734b
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Tue Apr 20 14:57:57 2021 +0200

    Added Exec Sink Kamelet
---
 docs/modules/ROOT/pages/exec-sink.adoc | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/docs/modules/ROOT/pages/exec-sink.adoc b/docs/modules/ROOT/pages/exec-sink.adoc
index 68531da..0b7defa 100644
--- a/docs/modules/ROOT/pages/exec-sink.adoc
+++ b/docs/modules/ROOT/pages/exec-sink.adoc
@@ -5,13 +5,18 @@
 
 Execute system commands
 
+The Kamelet expects the following headers to be set:
+
+- `args/ `ce-args`: as the args to be set on the executable.
+
+If the header won't be set the executable will be run without arguments.
+
 == Configuration Options
 
 The following table summarizes the configuration options available for the `exec-sink` Kamelet:
 [width="100%",cols="2,^2,3,^2,^2,^3",options="header"]
 |===
 | Property| Name| Description| Type| Default| Example
-| *args {empty}* *| The arguments| Arguments to pass to the executables| string| | 
 | *executable {empty}* *| Executable command| The command to execute| string| | 
 |===
 
@@ -44,7 +49,6 @@ spec:
       apiVersion: camel.apache.org/v1alpha1
       name: exec-sink
     properties:
-      args: "The The arguments"
       executable: "The Executable command"
 
 ----