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/21 13:57:17 UTC

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

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

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

commit c41b6c8279271d24440a3a7d7fe68ae1daaa4f6e
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Tue Dec 21 14:54:10 2021 +0100

    Added Github Commit Source Kamelet
---
 kamelets/github-commit-source.kamelet.yaml | 85 ++++++++++++++++++++++++++++++
 1 file changed, 85 insertions(+)

diff --git a/kamelets/github-commit-source.kamelet.yaml b/kamelets/github-commit-source.kamelet.yaml
new file mode 100644
index 0000000..95e8d8c
--- /dev/null
+++ b/kamelets/github-commit-source.kamelet.yaml
@@ -0,0 +1,85 @@
+# ---------------------------------------------------------------------------
+# 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-commit-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 Commit Source"
+    description: |-
+      Receive commit From Github.
+    required:
+      - repoName
+      - repoOwner
+      - oauthToken
+      - startingSha
+      - branch
+    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
+      startingSha:
+        title: Starting SHA
+        description: The SHA from which we want to consume, possible values beginning, last or a specific SHA
+        type: string
+        default: last
+      branch:
+        title: Branch 
+        description: The branch we want to consume commit from
+        type: string
+  types:
+    out:
+      mediaType: application/json
+  dependencies:
+  - "camel:jackson"
+  - "camel:github"
+  - "camel:kamelet"
+  flow:
+    from:
+      uri: "github://commit/{{branch}}"
+      parameters:
+        repoName: "{{repoName}}"
+        repoOwner: "{{repoOwner}}"
+        oauthToken: "{{oauthToken}}"
+        startingSha: "{{startingSha}}"
+      steps:
+      - marshal:
+          json: {}
+      - to: "kamelet:sink"