Skip to content

Commit

Permalink
gradle: create a separate sub build for all connectors (airbytehq#11833)
Browse files Browse the repository at this point in the history
  • Loading branch information
alafanechere authored Apr 8, 2022
1 parent d84df02 commit 582baf3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
10 changes: 5 additions & 5 deletions settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,14 @@ sourceControl {

rootProject.name = 'airbyte'

// SUB_BUILD is an enum of <blank>, PLATFORM, CONNECTORS_BASE, OCTAVIA_CLI. Blank is equivalent to all.
// SUB_BUILD is an enum of <blank>, PLATFORM, CONNECTORS_BASE, ALL_CONNECTORS and OCTAVIA_CLI. 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" && subBuild != "OCTAVIA_CLI") {
throw new IllegalArgumentException(String.format("%s is invalid. Must be unset or PLATFORM or CONNECTORS_BASE or OCTAVIA_CLI", subBuild))
if (subBuild != "PLATFORM" && subBuild != "CONNECTORS_BASE" && subBuild != "ALL_CONNECTORS" && subBuild != "OCTAVIA_CLI") {
throw new IllegalArgumentException(String.format("%s is invalid. Must be unset or PLATFORM or CONNECTORS_BASE, ALL_CONNECTORS or OCTAVIA_CLI", subBuild))
}
}

Expand Down Expand Up @@ -76,7 +76,7 @@ if (!System.getenv().containsKey("SUB_BUILD") || System.getenv().get("SUB_BUILD"
}

// connectors base
if (!System.getenv().containsKey("SUB_BUILD") || System.getenv().get("SUB_BUILD") == "CONNECTORS_BASE") {
if (!System.getenv().containsKey("SUB_BUILD") || System.getenv().get("SUB_BUILD") == "CONNECTORS_BASE" || System.getenv().get("SUB_BUILD") == "ALL_CONNECTORS") {
include ':airbyte-cdk:python'
include ':airbyte-integrations:bases:airbyte-protocol'
include ':airbyte-integrations:bases:base'
Expand Down Expand Up @@ -115,7 +115,7 @@ if (!System.getenv().containsKey("SUB_BUILD") || System.getenv().get("SUB_BUILD"
}

// connectors
if (!System.getenv().containsKey("SUB_BUILD")) {
if (!System.getenv().containsKey("SUB_BUILD") || System.getenv().get("SUB_BUILD") == "ALL_CONNECTORS") {
// include all connector projects
def integrationsPath = rootDir.toPath().resolve('airbyte-integrations/connectors')
println integrationsPath
Expand Down
2 changes: 1 addition & 1 deletion tools/bin/ci_integration_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ all_integration_tests=$(./gradlew integrationTest --dry-run | grep 'integrationT
run() {
if [[ "$connector" == "all" ]] ; then
echo "Running: ./gradlew --no-daemon --scan integrationTest"
./gradlew --no-daemon --scan integrationTest
SUB_BUILD=ALL_CONNECTORS ./gradlew --no-daemon --scan integrationTest
else
if [[ "$connector" == *"base-normalization"* ]]; then
selected_integration_test="base-normalization"
Expand Down

0 comments on commit 582baf3

Please sign in to comment.