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/12/22 14:26:05 UTC

[camel-kamelets] branch events-github-source created (now bead68e)

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

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


      at bead68e  Added Github Events Source Kamelet - Templates

This branch includes the following new commits:

     new 0ed9165  Added Github Events Source Kamelet
     new 56f6b9f  Added Github Events Source Kamelet
     new 5694317  Added Github Events Source Kamelet
     new fbca467  Added Github Events Source Kamelet - Docs
     new bead68e  Added Github Events Source Kamelet - Templates

The 5 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] 02/05: Added Github Events 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 events-github-source
in repository https://gitbox.apache.org/repos/asf/camel-kamelets.git

commit 56f6b9f547d3efcb036db9d3463197a517019178
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Wed Dec 22 15:24:27 2021 +0100

    Added Github Events Source Kamelet
---
 .../kamelets/github-event-source.kamelet.yaml      | 73 ++++++++++++++++++++++
 1 file changed, 73 insertions(+)

diff --git a/library/camel-kamelets/src/main/resources/kamelets/github-event-source.kamelet.yaml b/library/camel-kamelets/src/main/resources/kamelets/github-event-source.kamelet.yaml
new file mode 100644
index 0000000..57e6d3a
--- /dev/null
+++ b/library/camel-kamelets/src/main/resources/kamelets/github-event-source.kamelet.yaml
@@ -0,0 +1,73 @@
+# ---------------------------------------------------------------------------
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# ---------------------------------------------------------------------------
+apiVersion: camel.apache.org/v1alpha1
+kind: Kamelet
+metadata:
+  name: github-event-source
+  annotations:
+    camel.apache.org/kamelet.support.level: "Preview"
+    camel.apache.org/catalog.version: "main-SNAPSHOT"
+    camel.apache.org/kamelet.icon: "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTAyNCIgaGVpZ2h0PSIxMDI0IiB2aWV3Qm94PSIwIDAgMTAyNCAxMDI0IiBmaWxsPSJub25lIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPgo8cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0iTTggMEMzLjU4IDAgMCAzLjU4IDAgOEMwIDExLjU0IDIuMjkgMTQuNTMgNS40NyAxNS41OUM1Ljg3IDE1LjY2IDYuMDIgMTUuNDIgNi4wMiAxNS4yMUM2LjAyIDE1LjAyIDYuMDEgMTQuMzkgNi4wMSAxMy43MkM0IDE0LjA5IDMuNDggMTMuMjMgMy4zMiAxMi43OEMzLjIzIDEyLjU1IDIuODQgMTEuOD [...]
+    camel.apache.org/provider: "Apache Software Foundation"
+    camel.apache.org/kamelet.group: "GitHub"
+  labels:
+    camel.apache.org/kamelet.type: "source"
+spec:
+  definition:
+    title: "Github Event Source"
+    description: |-
+      Receive Events From a Github Repository.
+    required:
+      - repoName
+      - repoOwner
+      - oauthToken
+    type: object
+    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
+        format: password
+        x-descriptors:
+        - urn:alm:descriptor:com.tectonic.ui:password
+        - urn:camel:group:credentials
+  types:
+    out:
+      mediaType: application/json
+  dependencies:
+  - "camel:jackson"
+  - "camel:github"
+  - "camel:kamelet"
+  flow:
+    from:
+      uri: "github://event"
+      parameters:
+        repoName: "{{repoName}}"
+        repoOwner: "{{repoOwner}}"
+        oauthToken: "{{oauthToken}}"
+      steps:
+      - marshal:
+          json: {}
+      - to: "kamelet:sink"

[camel-kamelets] 03/05: Added Github Events 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 events-github-source
in repository https://gitbox.apache.org/repos/asf/camel-kamelets.git

commit 569431787933ea5ee43116ecf606070296cc8a21
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Wed Dec 22 15:25:06 2021 +0100

    Added Github Events Source Kamelet
---
 docs/modules/ROOT/nav.adoc | 1 +
 1 file changed, 1 insertion(+)

diff --git a/docs/modules/ROOT/nav.adoc b/docs/modules/ROOT/nav.adoc
index 94912f2..7715c77 100644
--- a/docs/modules/ROOT/nav.adoc
+++ b/docs/modules/ROOT/nav.adoc
@@ -54,6 +54,7 @@
 * xref:ROOT:ftps-sink.adoc[image:kamelets/ftps-sink.svg[] FTPS Sink]
 * xref:ROOT:ftps-source.adoc[image:kamelets/ftps-source.svg[] FTPS Source]
 * xref:ROOT:github-commit-source.adoc[image:kamelets/github-commit-source.svg[] Github Commit Source]
+* xref:ROOT:github-event-source.adoc[image:kamelets/github-event-source.svg[] Github Event Source]
 * xref:ROOT:github-source.adoc[image:kamelets/github-source.svg[] Github Source]
 * xref:ROOT:github-tag-source.adoc[image:kamelets/github-tag-source.svg[] Github Tag Source]
 * xref:ROOT:google-calendar-source.adoc[image:kamelets/google-calendar-source.svg[] Google Calendar Source]

[camel-kamelets] 04/05: Added Github Events Source Kamelet - Docs

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

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

commit fbca467e810ce5a17523d9cf292744644077195b
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Wed Dec 22 15:25:14 2021 +0100

    Added Github Events Source Kamelet - Docs
---
 .../assets/images/kamelets/github-event-source.svg |   3 +
 docs/modules/ROOT/pages/github-event-source.adoc   | 153 +++++++++++++++++++++
 2 files changed, 156 insertions(+)

diff --git a/docs/modules/ROOT/assets/images/kamelets/github-event-source.svg b/docs/modules/ROOT/assets/images/kamelets/github-event-source.svg
new file mode 100644
index 0000000..a8d1174
--- /dev/null
+++ b/docs/modules/ROOT/assets/images/kamelets/github-event-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/pages/github-event-source.adoc b/docs/modules/ROOT/pages/github-event-source.adoc
new file mode 100644
index 0000000..f68542e
--- /dev/null
+++ b/docs/modules/ROOT/pages/github-event-source.adoc
@@ -0,0 +1,153 @@
+// THIS FILE IS AUTOMATICALLY GENERATED: DO NOT EDIT
+
+= image:kamelets/github-event-source.svg[] Github Event Source
+
+*Provided by: "Apache Software Foundation"*
+
+*Support Level for this Kamelet is: "Preview"*
+
+Receive Events From a Github Repository.
+
+== Configuration Options
+
+The following table summarizes the configuration options available for the `github-event-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| | 
+|===
+
+NOTE: Fields marked with an asterisk ({empty}*) are mandatory.
+
+
+== Dependencies
+
+At runtime, the `github-event-source` Kamelet relies upon the presence of the following dependencies:
+
+- camel:jackson
+- camel:github
+- camel:kamelet 
+
+== Usage
+
+This section describes how you can use the `github-event-source`.
+
+=== Knative Source
+
+You can use the `github-event-source` Kamelet as a Knative source by binding it to a Knative object.
+
+.github-event-source-binding.yaml
+[source,yaml]
+----
+apiVersion: camel.apache.org/v1alpha1
+kind: KameletBinding
+metadata:
+  name: github-event-source-binding
+spec:
+  source:
+    ref:
+      kind: Kamelet
+      apiVersion: camel.apache.org/v1alpha1
+      name: github-event-source
+    properties:
+      oauthToken: "The OAuth Token"
+      repoName: "The Repository Name"
+      repoOwner: "The Repository Owner"
+  sink:
+    ref:
+      kind: Channel
+      apiVersion: messaging.knative.dev/v1
+      name: mychannel
+  
+----
+
+==== *Prerequisite*
+
+You have xref:{camel-k-version}@camel-k::installation/installation.adoc[Camel K installed] on the cluster.
+
+==== *Procedure for using the cluster CLI*
+
+. Save the `github-event-source-binding.yaml` file to your local drive, and then edit it as needed for your configuration.
+
+. Run the source by using the following command:
++
+[source,shell]
+----
+kubectl apply -f github-event-source-binding.yaml
+----
+
+==== *Procedure for using the Kamel CLI*
+
+Configure and run the source by using the following command:
+
+[source,shell]
+----
+kamel bind github-event-source -p "source.oauthToken=The OAuth Token" -p "source.repoName=The Repository Name" -p "source.repoOwner=The Repository Owner" channel:mychannel
+----
+
+This command creates the KameletBinding in the current namespace on the cluster.
+
+=== Kafka Source
+
+You can use the `github-event-source` Kamelet as a Kafka source by binding it to a Kafka topic.
+
+.github-event-source-binding.yaml
+[source,yaml]
+----
+apiVersion: camel.apache.org/v1alpha1
+kind: KameletBinding
+metadata:
+  name: github-event-source-binding
+spec:
+  source:
+    ref:
+      kind: Kamelet
+      apiVersion: camel.apache.org/v1alpha1
+      name: github-event-source
+    properties:
+      oauthToken: "The OAuth Token"
+      repoName: "The Repository Name"
+      repoOwner: "The Repository Owner"
+  sink:
+    ref:
+      kind: KafkaTopic
+      apiVersion: kafka.strimzi.io/v1beta1
+      name: my-topic
+  
+----
+
+==== *Prerequisites*
+
+* You've installed https://strimzi.io/[Strimzi].
+* You've created a topic named `my-topic` in the current namespace.
+* You have xref:{camel-k-version}@camel-k::installation/installation.adoc[Camel K installed] on the cluster.
+
+==== *Procedure for using the cluster CLI*
+
+. Save the `github-event-source-binding.yaml` file to your local drive, and then edit it as needed for your configuration.
+
+. Run the source by using the following command:
++
+[source,shell]
+----
+kubectl apply -f github-event-source-binding.yaml
+----
+
+==== *Procedure for using the Kamel CLI*
+
+Configure and run the source by using the following command:
+
+[source,shell]
+----
+kamel bind github-event-source -p "source.oauthToken=The OAuth Token" -p "source.repoName=The Repository Name" -p "source.repoOwner=The Repository Owner" kafka.strimzi.io/v1beta1:KafkaTopic:my-topic
+----
+
+This command creates the KameletBinding in the current namespace on the cluster.
+
+== Kamelet source file
+
+https://github.com/apache/camel-kamelets/blob/main/kamelets/github-event-source.kamelet.yaml
+
+// THIS FILE IS AUTOMATICALLY GENERATED: DO NOT EDIT

[camel-kamelets] 01/05: Added Github Events 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 events-github-source
in repository https://gitbox.apache.org/repos/asf/camel-kamelets.git

commit 0ed9165d606f34922342b4524cf4ae5388e07d84
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Wed Dec 22 15:24:07 2021 +0100

    Added Github Events Source Kamelet
---
 kamelets/github-event-source.kamelet.yaml | 73 +++++++++++++++++++++++++++++++
 1 file changed, 73 insertions(+)

diff --git a/kamelets/github-event-source.kamelet.yaml b/kamelets/github-event-source.kamelet.yaml
new file mode 100644
index 0000000..57e6d3a
--- /dev/null
+++ b/kamelets/github-event-source.kamelet.yaml
@@ -0,0 +1,73 @@
+# ---------------------------------------------------------------------------
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# ---------------------------------------------------------------------------
+apiVersion: camel.apache.org/v1alpha1
+kind: Kamelet
+metadata:
+  name: github-event-source
+  annotations:
+    camel.apache.org/kamelet.support.level: "Preview"
+    camel.apache.org/catalog.version: "main-SNAPSHOT"
+    camel.apache.org/kamelet.icon: "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTAyNCIgaGVpZ2h0PSIxMDI0IiB2aWV3Qm94PSIwIDAgMTAyNCAxMDI0IiBmaWxsPSJub25lIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPgo8cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0iTTggMEMzLjU4IDAgMCAzLjU4IDAgOEMwIDExLjU0IDIuMjkgMTQuNTMgNS40NyAxNS41OUM1Ljg3IDE1LjY2IDYuMDIgMTUuNDIgNi4wMiAxNS4yMUM2LjAyIDE1LjAyIDYuMDEgMTQuMzkgNi4wMSAxMy43MkM0IDE0LjA5IDMuNDggMTMuMjMgMy4zMiAxMi43OEMzLjIzIDEyLjU1IDIuODQgMTEuOD [...]
+    camel.apache.org/provider: "Apache Software Foundation"
+    camel.apache.org/kamelet.group: "GitHub"
+  labels:
+    camel.apache.org/kamelet.type: "source"
+spec:
+  definition:
+    title: "Github Event Source"
+    description: |-
+      Receive Events From a Github Repository.
+    required:
+      - repoName
+      - repoOwner
+      - oauthToken
+    type: object
+    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
+        format: password
+        x-descriptors:
+        - urn:alm:descriptor:com.tectonic.ui:password
+        - urn:camel:group:credentials
+  types:
+    out:
+      mediaType: application/json
+  dependencies:
+  - "camel:jackson"
+  - "camel:github"
+  - "camel:kamelet"
+  flow:
+    from:
+      uri: "github://event"
+      parameters:
+        repoName: "{{repoName}}"
+        repoOwner: "{{repoOwner}}"
+        oauthToken: "{{oauthToken}}"
+      steps:
+      - marshal:
+          json: {}
+      - to: "kamelet:sink"

[camel-kamelets] 05/05: Added Github Events Source Kamelet - Templates

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

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

commit bead68e184a2018a0941ae17a310de317658d5a3
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Wed Dec 22 15:25:30 2021 +0100

    Added Github Events Source Kamelet - Templates
---
 .../camel-k/github-event-source-binding.yaml         | 20 ++++++++++++++++++++
 .../bindings/core/github-event-source-binding.yaml   | 11 +++++++++++
 2 files changed, 31 insertions(+)

diff --git a/templates/bindings/camel-k/github-event-source-binding.yaml b/templates/bindings/camel-k/github-event-source-binding.yaml
new file mode 100644
index 0000000..74d6ec0
--- /dev/null
+++ b/templates/bindings/camel-k/github-event-source-binding.yaml
@@ -0,0 +1,20 @@
+apiVersion: camel.apache.org/v1alpha1
+kind: KameletBinding
+metadata:
+  name: github-event-source-binding
+spec:
+  source:
+    ref:
+      kind: Kamelet
+      apiVersion: camel.apache.org/v1alpha1
+      name: github-event-source
+    properties:
+      oauthToken: "The OAuth Token"
+      repoName: "The Repository Name"
+      repoOwner: "The Repository Owner"
+  sink:
+    ref:
+      kind: KafkaTopic
+      apiVersion: kafka.strimzi.io/v1beta1
+      name: my-topic
+  
\ No newline at end of file
diff --git a/templates/bindings/core/github-event-source-binding.yaml b/templates/bindings/core/github-event-source-binding.yaml
new file mode 100644
index 0000000..eee3262
--- /dev/null
+++ b/templates/bindings/core/github-event-source-binding.yaml
@@ -0,0 +1,11 @@
+- route:
+    from:
+      uri: "kamelet:github-event-source"
+      parameters:
+        oauthToken: "The OAuth Token"
+        repoName: "The Repository Name"
+        repoOwner: "The Repository Owner"
+    steps:
+      - to:
+          uri: "log:info"
+    
\ No newline at end of file