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

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

commit 1a6066536e0b4a37b2efcf74168f478943b6983e
Author: Andrea Cosentino <[email protected]>
AuthorDate: Wed Jun 8 10:13:39 2022 +0200

    Jira source Kamelet supporting oauth
---
 kamelets/jira-oauth-source.kamelet.yaml            | 108 +++++++++++++++++++++
 .../kamelets/jira-oauth-source.kamelet.yaml        | 102 +++++++++++++++++++
 2 files changed, 210 insertions(+)

diff --git a/kamelets/jira-oauth-source.kamelet.yaml 
b/kamelets/jira-oauth-source.kamelet.yaml
new file mode 100644
index 00000000..634dda3a
--- /dev/null
+++ b/kamelets/jira-oauth-source.kamelet.yaml
@@ -0,0 +1,108 @@
+# ---------------------------------------------------------------------------
+# 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: jira-oauth-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,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHN2ZyB3aWR0aD0iMjU2cHgiIGhlaWdodD0iMjU2cHgiIHZpZXdCb3g9IjAgMCAyNTYgMjU2IiB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHByZXNlcnZlQXNwZWN0UmF0aW89InhNaWRZTWlkIj4KICAgIDxkZWZzPgogICAgICAgIDxsaW5lYXJHcmFkaWVudCB4MT0iOTguMDMwODY3NSUiIHkxPSIwLjE2MDU5OTU3MiUiIHgyPSI1OC44ODc3MDYyJSIgeTI9IjQwLjc2NTUyNDYlIi
 [...]
+    camel.apache.org/provider: "Apache Software Foundation"
+    camel.apache.org/kamelet.group: "JIRA"
+  labels:
+    camel.apache.org/kamelet.type: "source"
+spec:
+  definition:
+    title: "Jira oauth Source"
+    description: |-
+      Receive notifications about new issues from Jira through OAuth 
authentication.
+    required:
+      - jiraUrl
+      - accessToken
+      - verificationCode
+      - consumerKey
+      - privateKey
+      - jql
+    type: object
+    properties:
+      jiraUrl:
+        title: Jira URL
+        description: The URL of your instance of Jira
+        type: string
+        example: http://my_jira.com:8081
+      accessToken:
+        title: Username
+        description: The access token generated by the Jira server.
+        type: string
+        format: password
+        x-descriptors:
+        - urn:alm:descriptor:com.tectonic.ui:password
+        - urn:camel:group:credentials
+      verificationCode:
+        title: Password
+        description: The verification code from Jira generated in the first 
step of the authorization proccess.
+        type: string
+        format: password
+        x-descriptors:
+        - urn:alm:descriptor:com.tectonic.ui:password
+        - urn:camel:group:credentials
+      consumerKey:
+        title: Password
+        description: The consumer key from Jira settings.
+        type: string
+        format: password
+        x-descriptors:
+        - urn:alm:descriptor:com.tectonic.ui:password
+        - urn:camel:group:credentials
+      privateKey:
+        title: Password
+        description: The private key generated by the client to encrypt the 
conversation to the server.
+        type: string
+        format: password
+        x-descriptors:
+        - urn:alm:descriptor:com.tectonic.ui:password
+        - urn:camel:group:credentials
+      jql:
+        title: JQL
+        description: A query to filter issues
+        type: string
+        example: project=MyProject
+  types:
+    out:
+      mediaType: application/json
+  dependencies:
+  - "camel:jackson"
+  - "camel:jira"
+  - "camel:kamelet"
+  - "mvn:com.fasterxml.jackson.datatype:jackson-datatype-joda:2.12.5"
+  template:
+    from:
+      uri: "jira:newIssues"
+      parameters:
+        jiraUrl: "{{jiraUrl}}"
+        accessToken: "{{accessToken}}"
+        verificationCode: "{{verificationCode}}"
+        privateKey: "RAW({{privateKey}})"
+        consumerKey: "{{consumerKey}}"
+        jql: "{{jql}}"
+      steps:
+      - marshal:
+          json: 
+            library: Jackson
+            module-class-names: com.fasterxml.jackson.datatype.joda.JodaModule
+      - to: "kamelet:sink"
diff --git 
a/library/camel-kamelets/src/main/resources/kamelets/jira-oauth-source.kamelet.yaml
 
b/library/camel-kamelets/src/main/resources/kamelets/jira-oauth-source.kamelet.yaml
new file mode 100644
index 00000000..74cafa79
--- /dev/null
+++ 
b/library/camel-kamelets/src/main/resources/kamelets/jira-oauth-source.kamelet.yaml
@@ -0,0 +1,102 @@
+# ---------------------------------------------------------------------------
+# 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: jira-oauth-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,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHN2ZyB3aWR0aD0iMjU2cHgiIGhlaWdodD0iMjU2cHgiIHZpZXdCb3g9IjAgMCAyNTYgMjU2IiB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHByZXNlcnZlQXNwZWN0UmF0aW89InhNaWRZTWlkIj4KICAgIDxkZWZzPgogICAgICAgIDxsaW5lYXJHcmFkaWVudCB4MT0iOTguMDMwODY3NSUiIHkxPSIwLjE2MDU5OTU3MiUiIHgyPSI1OC44ODc3MDYyJSIgeTI9IjQwLjc2NTUyNDYlIi
 [...]
+    camel.apache.org/provider: "Apache Software Foundation"
+    camel.apache.org/kamelet.group: "JIRA"
+  labels:
+    camel.apache.org/kamelet.type: "source"
+spec:
+  definition:
+    title: "Jira oauth Source"
+    description: |-
+      Receive notifications about new issues from Jira.
+    required:
+      - jiraUrl
+    type: object
+    properties:
+      jiraUrl:
+        title: Jira URL
+        description: The URL of your instance of Jira
+        type: string
+        example: http://my_jira.com:8081
+      accessToken:
+        title: Username
+        description: The username to access Jira
+        type: string
+        x-descriptors:
+        - urn:camel:group:credentials
+      verificationCode:
+        title: Password
+        description: The password to access Jira
+        type: string
+        format: password
+        x-descriptors:
+        - urn:alm:descriptor:com.tectonic.ui:password
+        - urn:camel:group:credentials
+      consumerKey:
+        title: Password
+        description: The password to access Jira
+        type: string
+        format: password
+        x-descriptors:
+        - urn:alm:descriptor:com.tectonic.ui:password
+        - urn:camel:group:credentials
+      privateKey:
+        title: Password
+        description: The password to access Jira
+        type: string
+        format: password
+        x-descriptors:
+        - urn:alm:descriptor:com.tectonic.ui:password
+        - urn:camel:group:credentials
+      jql:
+        title: JQL
+        description: A query to filter issues
+        type: string
+        example: project=MyProject
+      
+  types:
+    out:
+      mediaType: application/json
+  dependencies:
+  - "camel:jackson"
+  - "camel:jira"
+  - "camel:kamelet"
+  - "mvn:com.fasterxml.jackson.datatype:jackson-datatype-joda:2.12.5"
+  template:
+    from:
+      uri: "jira:newIssues"
+      parameters:
+        jiraUrl: "{{jiraUrl}}"
+        accessToken: "{{accessToken}}"
+        verificationCode: "{{verificationCode}}"
+        privateKey: "{{privateKey}}"
+        consumerKey: "{{consumerKey}}"
+        jql: "{{jql}}"
+      steps:
+      - marshal:
+          json: 
+            library: Jackson
+            module-class-names: com.fasterxml.jackson.datatype.joda.JodaModule
+      - to: "kamelet:sink"

Reply via email to