Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[New Connector] Jira connector - On Cloud and Server #527

Merged
merged 16 commits into from
Mar 24, 2023
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .buildkite/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,3 +47,8 @@ steps:
- ".buildkite/run_nigthly.sh oracle"
artifact_paths:
- "perf8-report-*/**/*"
- label: "🔨 Jira"
command:
- ".buildkite/run_nigthly.sh jira"
artifact_paths:
- "perf8-report-*/**/*"
2 changes: 2 additions & 0 deletions config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ native_service_types:
- postgresql
- oracle
- dir
- jira


# Connector client settings
Expand All @@ -52,3 +53,4 @@ sources:
azure_blob_storage: connectors.sources.azure_blob_storage:AzureBlobStorageDataSource
postgresql: connectors.sources.postgresql:PostgreSQLDataSource
oracle: connectors.sources.oracle:OracleDataSource
jira: connectors.sources.jira:JiraDataSource
17 changes: 17 additions & 0 deletions connectors/source.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
# you may not use this file except in compliance with the Elastic License 2.0.
#
import importlib
import ssl
from datetime import date, datetime
from decimal import Decimal

Expand Down Expand Up @@ -236,6 +237,22 @@ def tweak_bulk_options(self, options):
"""
pass

def _ssl_context(self, certificate):
"""Convert string to pem format and create a SSL context

Args:
certificate (str): certificate in string format

Returns:
ssl_context: SSL context with certificate
"""
certificate = certificate.replace(" ", "\n")
certificate = " ".join(certificate.split("\n", 1))
certificate = " ".join(certificate.rsplit("\n", 1))
ctx = ssl.create_default_context()
ctx.load_verify_locations(cadata=certificate)
return ctx
vidok marked this conversation as resolved.
Show resolved Hide resolved

def serialize(self, doc):
"""Reads each element from the document and serializes it with respect to its datatype.

Expand Down
Loading