Skip to content

Commit

Permalink
Create NORMALIZATION SUB_BUILD
Browse files Browse the repository at this point in the history
  • Loading branch information
ChristopheDuong committed Jul 22, 2021
1 parent 5cdc7f8 commit b8f7041
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 4 deletions.
24 changes: 21 additions & 3 deletions settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,14 @@ gradleEnterprise {

rootProject.name = 'airbyte'

// SUB_BUILD is an enum of <blank>, PLATFORM, CONNECTORS_BASE. Blank is equivalent to all.
// SUB_BUILD is an enum of <blank>, PLATFORM, CONNECTORS_BASE, NORMALIZATION. Blank is equivalent to all.
if(!System.getenv().containsKey("SUB_BUILD")) {
println("Building all of Airbyte.")
} else {
def subBuild = System.getenv().get("SUB_BUILD")
println("Building Airbyte Sub Build: " + subBuild)
if(subBuild != "PLATFORM" && subBuild != "CONNECTORS_BASE") {
throw new IllegalArgumentException(String.format("%s is invalid. Must be unset or PLATFORM or CONNECTORS_BASE", subBuild))
if(subBuild != "PLATFORM" && subBuild != "CONNECTORS_BASE" && subBuild != "NORMALIZATION") {
throw new IllegalArgumentException(String.format("%s is invalid. Must be unset or PLATFORM or CONNECTORS_BASE or NORMALIZATION", subBuild))
}
}

Expand Down Expand Up @@ -71,6 +71,24 @@ if(!System.getenv().containsKey("SUB_BUILD") || System.getenv().get("SUB_BUILD")
include ':tools:code-generator'
}

// normalization
if(!System.getenv().containsKey("SUB_BUILD") || System.getenv().get("SUB_BUILD") == "NORMALIZATION") {
include ':airbyte-integrations:bases:airbyte-protocol'
include ':airbyte-integrations:bases:base'
include ':airbyte-integrations:bases:base-java'
include ':airbyte-integrations:bases:base-normalization'

// Needed by normalization integration tests
include ':airbyte-integrations:connectors:destination-bigquery'
include ':airbyte-integrations:connectors:destination-jdbc'
include ':airbyte-integrations:connectors:destination-mysql'
include ':airbyte-integrations:connectors:destination-postgres'
include ':airbyte-integrations:connectors:destination-redshift'
include ':airbyte-integrations:connectors:destination-snowflake'
include ':airbyte-integrations:bases:standard-destination-test'
include ':tools:code-generator'
}

// connectors base
if(!System.getenv().containsKey("SUB_BUILD") || System.getenv().get("SUB_BUILD") == "CONNECTORS_BASE") {
include ':airbyte-cdk:python'
Expand Down
12 changes: 11 additions & 1 deletion tools/bin/ci_integration_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,17 @@ if [[ "$connector" == "all" ]] ; then
echo "Running: ./gradlew --no-daemon --scan integrationTest"
./gradlew --no-daemon --scan integrationTest
else
if [[ "$connector" == *"connectors"* ]] || [[ "$connector" == *"bases"* ]]; then
if [[ "$connector" == *"base-normalization"* ]]; then
selected_integration_test="base-normalization"
integrationTestCommand="$(_to_gradle_path "airbyte-integrations/bases/base-normalization" integrationTest)"
export SUB_BUILD="NORMALIZATION"
./gradlew --no-daemon --scan airbyteDocker
elif [[ "$connector" == *"bases"* ]]; then
connector_name=$(echo $connector | cut -d / -f 2)
selected_integration_test=$(echo "$all_integration_tests" | grep "^$connector_name$" || echo "")
integrationTestCommand="$(_to_gradle_path "airbyte-integrations/$connector" integrationTest)"
export SUB_BUILD="CONNECTORS_BASE"
elif [[ "$connector" == *"connectors"* ]]; then
connector_name=$(echo $connector | cut -d / -f 2)
selected_integration_test=$(echo "$all_integration_tests" | grep "^$connector_name$" || echo "")
integrationTestCommand="$(_to_gradle_path "airbyte-integrations/$connector" integrationTest)"
Expand Down

0 comments on commit b8f7041

Please sign in to comment.