Skip to content

Commit

Permalink
Use BuildParams.isCi() instead of checking env var (#5368) (#5375)
Browse files Browse the repository at this point in the history
Signed-off-by: Andrew Ross <[email protected]>

Signed-off-by: Andrew Ross <[email protected]>
Signed-off-by: Andriy Redko <[email protected]>

Signed-off-by: Andrew Ross <[email protected]>
Signed-off-by: Andriy Redko <[email protected]>
Co-authored-by: Andrew Ross <[email protected]>
  • Loading branch information
reta and andrross authored Nov 25, 2022
1 parent f3e2d7f commit 7828029
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ plugins {
id 'opensearch.docker-support'
id 'opensearch.global-build-info'
id "com.diffplug.spotless" version "6.3.0" apply false
id "org.gradle.test-retry" version "1.4.1" apply false
}

apply from: 'gradle/build-complete.gradle'
Expand Down Expand Up @@ -382,6 +383,20 @@ gradle.projectsEvaluated {
}
}

// test retry configuration
subprojects {
apply plugin: "org.gradle.test-retry"
tasks.withType(Test).configureEach {
retry {
if (BuildParams.isCi()) {
maxRetries = 3
maxFailures = 10
}
failOnPassedAfterRetry = false
}
}
}

// eclipse configuration
allprojects {
apply plugin: 'eclipse'
Expand Down

0 comments on commit 7828029

Please sign in to comment.