-
Notifications
You must be signed in to change notification settings - Fork 4.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Source Appstore Singer #7652 - migrate to the CDK
- Loading branch information
1 parent
cddfeea
commit 7d1140b
Showing
10 changed files
with
52 additions
and
45 deletions.
There are no files selected for viewing
2 changes: 1 addition & 1 deletion
2
airbyte-integrations/connectors/source-appstore-singer/.dockerignore
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
* | ||
!Dockerfile | ||
!Dockerfile.test | ||
!main.py | ||
!source_appstore_singer | ||
!setup.py | ||
!secrets |
41 changes: 31 additions & 10 deletions
41
airbyte-integrations/connectors/source-appstore-singer/Dockerfile
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,38 @@ | ||
FROM airbyte/integration-base-singer:0.1.1 | ||
FROM python:3.7.11-alpine3.14 as base | ||
|
||
# Bash is installed for more convenient debugging. | ||
RUN apt-get update && apt-get install -y bash git && rm -rf /var/lib/apt/lists/* | ||
# build and load all requirements | ||
FROM base as builder | ||
WORKDIR /airbyte/integration_code | ||
|
||
# upgrade pip to the latest version | ||
RUN apk --no-cache upgrade \ | ||
&& pip install --upgrade pip \ | ||
&& apk --no-cache add tzdata build-base | ||
|
||
ENV CODE_PATH="source_appstore_singer" | ||
ENV AIRBYTE_IMPL_MODULE="source_appstore_singer" | ||
ENV AIRBYTE_IMPL_PATH="SourceAppstoreSinger" | ||
ENV AIRBYTE_ENTRYPOINT "/airbyte/base.sh" | ||
|
||
WORKDIR /airbyte/integration_code | ||
COPY $CODE_PATH ./$CODE_PATH | ||
COPY setup.py ./ | ||
RUN pip install . | ||
# install necessary packages to a temporary folder | ||
RUN pip install --prefix=/install . | ||
|
||
# build a clean environment | ||
FROM base | ||
WORKDIR /airbyte/integration_code | ||
|
||
# copy all loaded and built libraries to a pure basic image | ||
COPY --from=builder /install /usr/local | ||
# add default timezone settings | ||
COPY --from=builder /usr/share/zoneinfo/Etc/UTC /etc/localtime | ||
RUN echo "Etc/UTC" > /etc/timezone | ||
|
||
# bash is installed for more convenient debugging. | ||
RUN apk --no-cache add bash | ||
|
||
# copy payload code only | ||
COPY main.py ./ | ||
COPY source_drift ./source_drift | ||
|
||
ENV AIRBYTE_ENTRYPOINT "python /airbyte/integration_code/main.py" | ||
ENTRYPOINT ["python", "/airbyte/integration_code/main.py"] | ||
|
||
LABEL io.airbyte.version=0.2.4 | ||
LABEL io.airbyte.name=airbyte/source-appstore-singer |
1 change: 0 additions & 1 deletion
1
airbyte-integrations/connectors/source-appstore-singer/airbyte_protocol
This file was deleted.
Oops, something went wrong.
1 change: 0 additions & 1 deletion
1
airbyte-integrations/connectors/source-appstore-singer/base_python
This file was deleted.
Oops, something went wrong.
1 change: 0 additions & 1 deletion
1
airbyte-integrations/connectors/source-appstore-singer/base_singer
This file was deleted.
Oops, something went wrong.
15 changes: 1 addition & 14 deletions
15
airbyte-integrations/connectors/source-appstore-singer/build.gradle
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,9 @@ | ||
plugins { | ||
id 'airbyte-python' | ||
id 'airbyte-docker' | ||
// id 'airbyte-standard-source-test-file' | ||
id 'airbyte-source-acceptance-test' | ||
} | ||
|
||
airbytePython { | ||
moduleDirectory 'source_appstore_singer' | ||
} | ||
|
||
// https://github.com/airbytehq/airbyte/issues/1651 | ||
//airbyteStandardSourceTestFile { | ||
// // For more information on standard source tests, see https://docs.airbyte.io/connector-development/testing-connectors | ||
// specPath = "source_appstore_singer/spec.json" | ||
// configPath = "secrets/config.json" | ||
// configuredCatalogPath = "sample_files/configured_catalog.json" | ||
//} | ||
|
||
dependencies { | ||
implementation files(project(':airbyte-integrations:bases:base-standard-source-test-file').airbyteDocker.outputs) | ||
implementation files(project(':airbyte-integrations:bases:base-singer').airbyteDocker.outputs) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 0 additions & 3 deletions
3
airbyte-integrations/connectors/source-appstore-singer/requirements.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,2 @@ | ||
# This file is autogenerated -- only edit if you know what you are doing. Use setup.py for declaring dependencies. | ||
-e ../../bases/airbyte-protocol | ||
-e ../../bases/base-singer | ||
-e ../../bases/base-python | ||
-e . |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,20 +5,23 @@ | |
|
||
from setuptools import find_packages, setup | ||
|
||
MAIN_REQUIREMENTS = ["airbyte-cdk~=0.1", "appstoreconnect==0.9.0", "pyjwt==1.6.4", | ||
"tap-appstore @ https://github.com/airbytehq/tap-appstore/tarball/v0.2.1-airbyte"] | ||
|
||
TEST_REQUIREMENTS = [ | ||
"pytest~=6.1", | ||
"pytest-mock~=3.6.1", | ||
] | ||
|
||
setup( | ||
name="source_appstore_singer", | ||
description="Source implementation for Appstore, built on the Singer tap implementation.", | ||
author="Airbyte", | ||
author_email="[email protected]", | ||
packages=find_packages(), | ||
install_requires=[ | ||
"airbyte-protocol", | ||
"appstoreconnect==0.9.0", | ||
"base-singer", | ||
"base-python", | ||
"pyjwt==1.6.4", # required by appstore connect | ||
"pytest==6.1.2", | ||
"tap-appstore @ https://github.com/airbytehq/tap-appstore/tarball/v0.2.1-airbyte", | ||
], | ||
package_data={"": ["*.json"]}, | ||
install_requires=MAIN_REQUIREMENTS, | ||
package_data={"": ["*.json", "schemas/*.json", "schemas/shared/*.json"]}, | ||
extras_require={ | ||
"tests": TEST_REQUIREMENTS, | ||
}, | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters