Skip to content
This repository has been archived by the owner on Feb 23, 2023. It is now read-only.

add google sheets tap #1

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all 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
65 changes: 65 additions & 0 deletions Jenkinsfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
podTemplate(containers: [
containerTemplate(name: 'docker', image: 'docker:19.03.6', command: 'cat', ttyEnabled: true)
],
volumes: [
hostPathVolume(mountPath: '/var/run/docker.sock', hostPath: '/var/run/docker.sock')
]
) {
node(POD_LABEL) {
def appFullName
def appName = "pipelinewise"
def revision
def message
def branch
stage('Checkout') {
def scmVars = checkout([
$class: 'GitSCM',
branches: scm.branches,
extensions: scm.extensions + [
[
$class: 'AuthorInChangelog'
],
[
$class: 'ChangelogToBranch',
options: [
compareRemote: 'origin',
compareTarget: 'master'
]
]
],
userRemoteConfigs: scm.userRemoteConfigs
])
appFullName = "${appName}:${scmVars.GIT_COMMIT}"
revision = "${scmVars.GIT_COMMIT}"
message = sh(returnStdout: true, script: "git log --oneline -1 ${revision}")
branch = "${scmVars.GIT_BRANCH}"
}


stage('Build Docker Image') {
container('docker') {
docker.withRegistry('https://107126629234.dkr.ecr.ap-southeast-1.amazonaws.com', 'ecr:ap-southeast-1:49feb1c9-1719-4520-aa17-67695b347b0e') {
script {
sh """docker build --network=host -f Dockerfile -t 107126629234.dkr.ecr.ap-southeast-1.amazonaws.com/${appFullName} ."""
}
}
}
}

if (branch == 'master') {
stage('Push Docker Image') {
container('docker') {
docker.withRegistry('https://107126629234.dkr.ecr.ap-southeast-1.amazonaws.com', 'ecr:ap-southeast-1:49feb1c9-1719-4520-aa17-67695b347b0e') {
script {
sh """docker push 107126629234.dkr.ecr.ap-southeast-1.amazonaws.com/${appFullName}"""
}
}
}
}
}

stage('Notification') {
discordSend description: "${message}", footer: "${appFullName}", result: currentBuild.currentResult, title: "$JOB_NAME", webhookURL: "$DISCORD_WEBHOOK"
}
}
}
3 changes: 2 additions & 1 deletion install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ make_virtualenv() {
python3 -m pip install --upgrade pip setuptools

if [ -f "requirements.txt" ]; then
python3 -m pip install --upgrade -r requirements.txt
python3 -m pip install --upgrade -r requirements.txt --use-feature=2020-resolver
fi
if [ -f "setup.py" ]; then
PIP_ARGS=
Expand Down Expand Up @@ -187,6 +187,7 @@ EXTRA_CONNECTORS=(
tap-zuora
tap-google-analytics
tap-shopify
tap-google-sheets
)

# Install only the default connectors if --connectors argument not passed
Expand Down
3 changes: 2 additions & 1 deletion pipelinewise/cli/schemas/tap.json
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,8 @@
"tap-github",
"tap-shopify",
"tap-slack",
"tap-mixpanel"
"tap-mixpanel",
"tap-google-sheets"
]
},
"db_conn": {
Expand Down
8 changes: 8 additions & 0 deletions pipelinewise/cli/tap_properties.py
Original file line number Diff line number Diff line change
Expand Up @@ -266,6 +266,14 @@ def get_tap_properties(tap=None, temp_dir=None):
'default_replication_method': 'LOG_BASED',
'default_data_flattening_max_level': 0
},
'tap-google-sheets': {
'tap_config_extras': {},
'tap_stream_id_pattern': '{{table_name}}',
'tap_stream_name_pattern': '{{table_name}}',
'tap_catalog_argument': '--catalog',
'default_replication_method': 'INCREMENTAL',
'default_data_flattening_max_level': 0
},
# Default values to use as a fallback method
'DEFAULT': {
'tap_config_extras': {},
Expand Down
1 change: 1 addition & 0 deletions singer-connectors/tap-google-sheets/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
git+git://github.com/teguhn/tap-google-sheets@master#egg=tap-google-sheets