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

🎉 Source Zuora: Add OAuth support for Airbyte Cloud, Migrated to new CI Sandbox #6575

Merged
merged 10 commits into from
Oct 6, 2021
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
"sourceDefinitionId": "3dc3037c-5ce8-4661-adc2-f7a9e3c5ece5",
"name": "Zuora",
"dockerRepository": "airbyte/source-zuora",
"dockerImageTag": "0.1.0",
"dockerImageTag": "0.1.1",
"documentationUrl": "https://docs.airbyte.io/integrations/sources/zuora"
}
Original file line number Diff line number Diff line change
Expand Up @@ -495,7 +495,7 @@
- sourceDefinitionId: 3dc3037c-5ce8-4661-adc2-f7a9e3c5ece5
name: Zuora
dockerRepository: airbyte/source-zuora
dockerImageTag: 0.1.0
dockerImageTag: 0.1.1
documentationUrl: https://docs.airbyte.io/integrations/sources/zuora
sourceType: api
- sourceDefinitionId: 47f25999-dd5e-4636-8c39-e7cea2453331
Expand Down
37 changes: 29 additions & 8 deletions airbyte-integrations/connectors/source-zuora/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,16 +1,37 @@
FROM python:3.7-slim
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 && 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

COPY setup.py ./
# install necessary packages to a temporary folder
RUN pip install --prefix=/install .

# build a clean environment
FROM base
WORKDIR /airbyte/integration_code
COPY source_zuora ./source_zuora

# 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 setup.py ./
RUN pip install .
COPY source_zuora ./source_zuora

ENV AIRBYTE_ENTRYPOINT "python /airbyte/integration_code/main.py"
ENTRYPOINT ["python", "/airbyte/integration_code/main.py"]

LABEL io.airbyte.version=0.1.0
LABEL io.airbyte.name=airbyte/source-zuora
LABEL io.airbyte.version=0.1.1
LABEL io.airbyte.name=airbyte/source-zuora
5 changes: 3 additions & 2 deletions airbyte-integrations/connectors/source-zuora/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,8 @@ Customize `acceptance-test-config.yml` file to configure tests. See [Source Acce
If your connector requires to create or destroy resources for use during acceptance tests create fixtures for it and place them inside integration_tests/acceptance.py.
To run your integration tests with acceptance tests, from the connector root, run
```
python -m pytest integration_tests -p integration_tests.acceptance
docker build . --no-cache -t airbyte/source-zuora:dev \
&& python -m pytest -p source_acceptance_test.plugin
```

To run your integration tests with docker
Expand All @@ -120,7 +121,7 @@ To run unit tests:

To run acceptance and custom integration tests:
```
./gradlew :airbyte-integrations:connectors:source-zuora:integrationTest
./gradlew clean :airbyte-integrations:connectors:source-zuora:integrationTest
```

### Run the actual test using with DBT Normalisation in action
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@ tests:
- config_path: "secrets/config.json"
configured_catalog_path: "integration_tests/configured_catalog.json"
timeout_seconds: 3600
expect_records:
path: "integration_tests/some_expected_records.txt"
full_refresh:
- config_path: "secrets/config.json"
configured_catalog_path: "integration_tests/configured_catalog.json"
Expand Down
Loading