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/03/12 17:24:00 UTC

[camel-kamelets] branch github-source created (now 833db40)

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

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


      at 833db40  Github Source Kamelet documentation

This branch includes the following new commits:

     new ccaa45d  Added Github Source Kamelet
     new 833db40  Github Source Kamelet documentation

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.



[camel-kamelets] 01/02: Added Github Source Kamelet

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

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

commit ccaa45d8ae8390e5c0364f1327b4a4f9e35365a4
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Fri Mar 12 18:23:13 2021 +0100

    Added Github Source Kamelet
---
 github-source.kamelet.yaml | 55 ++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 55 insertions(+)

diff --git a/github-source.kamelet.yaml b/github-source.kamelet.yaml
new file mode 100644
index 0000000..0adf74c
--- /dev/null
+++ b/github-source.kamelet.yaml
@@ -0,0 +1,55 @@
+apiVersion: camel.apache.org/v1alpha1
+kind: Kamelet
+metadata:
+  name: github-source
+  annotations:
+    camel.apache.org/kamelet.icon: "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTAyNCIgaGVpZ2h0PSIxMDI0IiB2aWV3Qm94PSIwIDAgMTAyNCAxMDI0IiBmaWxsPSJub25lIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPgo8cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0iTTggMEMzLjU4IDAgMCAzLjU4IDAgOEMwIDExLjU0IDIuMjkgMTQuNTMgNS40NyAxNS41OUM1Ljg3IDE1LjY2IDYuMDIgMTUuNDIgNi4wMiAxNS4yMUM2LjAyIDE1LjAyIDYuMDEgMTQuMzkgNi4wMSAxMy43MkM0IDE0LjA5IDMuNDggMTMuMjMgMy4zMiAxMi43OEMzLjIzIDEyLjU1IDIuODQgMTEuOD [...]
+    camel.apache.org/provider: "Apache Software Foundation"
+  labels:
+    camel.apache.org/kamelet.type: "source"
+spec:
+  definition:
+    title: "Github Source"
+    description: |-
+      Receive events From Github.
+    required:
+      - repoName
+      - repoOwner
+      - oauthToken
+      - type
+    properties:
+      repoName:
+        title: Repository Name
+        description: The Github Repository name
+        type: string
+      repoOwner:
+        title: Repository Owner
+        description: The repository owner
+        type: string
+      oauthToken:
+        title: OAuth Token
+        description: Oauth token
+        type: string
+        x-descriptors:
+        - urn:alm:descriptor:com.tectonic.ui:password
+      type:
+        title: Event type
+        description: The type of event to consume. One of event, pullRequest, pullRequestComment or tag
+        type: string
+        default: event
+  types:
+    out:
+      mediaType: application/json
+  dependencies:
+  - "camel:jackson"
+  flow:
+    from:
+      uri: "github://{{type}}"
+      parameters:
+        repoName: "{{repoName}}"
+        repoOwner: "{{repoOwner}}"
+        oauthToken: "{{oauthToken}}"
+      steps:
+      - marshal:
+          json: {}
+      - to: "kamelet:sink"


[camel-kamelets] 02/02: Github Source Kamelet documentation

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

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

commit 833db40b34ad5c2f5e0a4d5e6b2508025341b562
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Fri Mar 12 18:23:37 2021 +0100

    Github Source Kamelet documentation
---
 .../ROOT/assets/images/kamelets/github-source.svg  |  3 +
 docs/modules/ROOT/nav.adoc                         |  1 +
 docs/modules/ROOT/pages/github-source.adoc         | 65 ++++++++++++++++++++++
 3 files changed, 69 insertions(+)

diff --git a/docs/modules/ROOT/assets/images/kamelets/github-source.svg b/docs/modules/ROOT/assets/images/kamelets/github-source.svg
new file mode 100644
index 0000000..a8d1174
--- /dev/null
+++ b/docs/modules/ROOT/assets/images/kamelets/github-source.svg
@@ -0,0 +1,3 @@
+<svg width="1024" height="1024" viewBox="0 0 1024 1024" fill="none" xmlns="http://www.w3.org/2000/svg">
+<path fill-rule="evenodd" clip-rule="evenodd" d="M8 0C3.58 0 0 3.58 0 8C0 11.54 2.29 14.53 5.47 15.59C5.87 15.66 6.02 15.42 6.02 15.21C6.02 15.02 6.01 14.39 6.01 13.72C4 14.09 3.48 13.23 3.32 12.78C3.23 12.55 2.84 11.84 2.5 11.65C2.22 11.5 1.82 11.13 2.49 11.12C3.12 11.11 3.57 11.7 3.72 11.94C4.44 13.15 5.59 12.81 6.05 12.6C6.12 12.08 6.33 11.73 6.56 11.53C4.78 11.33 2.92 10.64 2.92 7.58C2.92 6.71 3.23 5.99 3.74 5.43C3.66 5.23 3.38 4.41 3.82 3.31C3.82 3.31 4.49 3.1 6.02 4.13C6.66 3.95 7. [...]
+</svg>
diff --git a/docs/modules/ROOT/nav.adoc b/docs/modules/ROOT/nav.adoc
index 3aee334..b0ff6ba 100644
--- a/docs/modules/ROOT/nav.adoc
+++ b/docs/modules/ROOT/nav.adoc
@@ -6,6 +6,7 @@
 * xref:ROOT:earthquake-source.adoc[image:kamelets/earthquake-source.svg[] Earthquake Source]
 * xref:ROOT:ftp-source.adoc[image:kamelets/ftp-source.svg[] FTP Source]
 * xref:ROOT:ftps-source.adoc[image:kamelets/ftps-source.svg[] FTPS Source]
+* xref:ROOT:github-source.adoc[image:kamelets/github-source.svg[] Github Source]
 * xref:ROOT:google-calendar-source.adoc[image:kamelets/google-calendar-source.svg[] Google Calendar Source]
 * xref:ROOT:google-mail-source.adoc[image:kamelets/google-mail-source.svg[] Google Mail Source]
 * xref:ROOT:google-sheets-source.adoc[image:kamelets/google-sheets-source.svg[] Google Sheets Source]
diff --git a/docs/modules/ROOT/pages/github-source.adoc b/docs/modules/ROOT/pages/github-source.adoc
new file mode 100644
index 0000000..8ed2d86
--- /dev/null
+++ b/docs/modules/ROOT/pages/github-source.adoc
@@ -0,0 +1,65 @@
+// THIS FILE IS AUTOMATICALLY GENERATED: DO NOT EDIT
+= image:kamelets/github-source.svg[] Github Source
+
+*Provided by: "Apache Software Foundation"*
+
+Receive events From Github.
+
+== Configuration Options
+
+The following table summarizes the configuration options available for the `github-source` Kamelet:
+[width="100%",cols="2,^2,3,^2,^2,^3",options="header"]
+|===
+| Property| Name| Description| Type| Default| Example
+| *oauthToken {empty}* *| OAuth Token| Oauth token| string| | 
+| *repoName {empty}* *| Repository Name| The Github Repository name| string| | 
+| *repoOwner {empty}* *| Repository Owner| The repository owner| string| | 
+| *type {empty}* *| Event type| The type of event to consume. One of event, pullRequest, pullRequestComment or tag| string| `"event"`| 
+|===
+
+NOTE: Fields marked with ({empty}*) are mandatory.
+
+== Usage
+
+This section summarizes how the `github-source` can be used in various contexts.
+
+=== Knative Source
+
+The `github-source` Kamelet can be used as Knative source by binding it to a Knative object.
+
+.github-source-binding.yaml
+[source,yaml]
+----
+apiVersion: camel.apache.org/v1alpha1
+kind: KameletBinding
+metadata:
+  name: github-source-binding
+spec:
+  source:
+    ref:
+      kind: Kamelet
+      apiVersion: camel.apache.org/v1alpha1
+      name: github-source
+    properties:
+      oauthToken: "The OAuth Token"
+      repoName: "The Repository Name"
+      repoOwner: "The Repository Owner"
+  sink:
+    ref:
+      kind: InMemoryChannel
+      apiVersion: messaging.knative.dev/v1
+      name: mychannel
+
+----
+
+Make sure you have xref:latest@camel-k::installation/installation.adoc[Camel K installed] into the Kubernetes cluster you're connected to.
+
+Save the `github-source-binding.yaml` file into your hard drive, then configure it according to your needs.
+
+You can run the source using the following command:
+
+[source,shell]
+----
+kubectl apply -f github-source-binding.yaml
+----
+// THIS FILE IS AUTOMATICALLY GENERATED: DO NOT EDIT