diff options
author | Sébastien Lesaint <sebastien.lesaint@sonarsource.com> | 2019-05-20 16:39:42 +0200 |
---|---|---|
committer | SonarTech <sonartech@sonarsource.com> | 2019-05-23 20:21:09 +0200 |
commit | 1f3ee626c1faa8f32aa15ce8dcc0ed333e6e57aa (patch) | |
tree | 7f8832a9e91b4be6d726fb5bbfc5df6f491a1abb /server/sonar-db-core | |
parent | 49451f5a6eb77a234072584192eaa576c78e3390 (diff) | |
download | sonarqube-1f3ee626c1faa8f32aa15ce8dcc0ed333e6e57aa.tar.gz sonarqube-1f3ee626c1faa8f32aa15ce8dcc0ed333e6e57aa.zip |
SONAR-11264 enforce ES boostrap checks on all editions
Diffstat (limited to 'server/sonar-db-core')
-rw-r--r-- | server/sonar-db-core/src/test/java/org/sonar/db/CreateDb.java | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/server/sonar-db-core/src/test/java/org/sonar/db/CreateDb.java b/server/sonar-db-core/src/test/java/org/sonar/db/CreateDb.java index 0106b571634..b81ea66aa01 100644 --- a/server/sonar-db-core/src/test/java/org/sonar/db/CreateDb.java +++ b/server/sonar-db-core/src/test/java/org/sonar/db/CreateDb.java @@ -26,6 +26,7 @@ import com.sonar.orchestrator.locator.Location; import org.apache.commons.lang.StringUtils; import java.io.File; +import org.sonar.api.utils.log.Loggers; import static com.sonar.orchestrator.container.Edition.COMMUNITY; @@ -42,6 +43,7 @@ public class CreateDb { builder.setSonarVersion(version); } builder.setOrchestratorProperty("orchestrator.workspaceDir", "build/it"); + builder.setServerProperty("sonar.es.bootstrap.checks.disable", areEsBootStrapChecksDisabled() ? "true" : "false"); Orchestrator orchestrator = builder.build(); try { @@ -50,4 +52,12 @@ public class CreateDb { orchestrator.stop(); } } + + private static boolean areEsBootStrapChecksDisabled() { + boolean flag = "true".equalsIgnoreCase(System.getenv("CIRRUS_CI")); + if (flag) { + Loggers.get(CreateDb.class).info("Running on Cirrus: ES Bootstrap checks are disabled"); + } + return flag; + } } |