]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-21207 make nightly build depend on external trigger instead of internal state...
authorSteve Marion <steve.marion@sonarsource.com>
Fri, 21 Jun 2024 15:00:33 +0000 (17:00 +0200)
committersonartech <sonartech@sonarsource.com>
Wed, 26 Jun 2024 20:03:32 +0000 (20:03 +0000)
build.gradle
buildSrc/src/main/groovy/org.sonar.build/BlackBoxTest.groovy

index 193d11f160a6c76d2cce2b92910d3bcf5865c072..a316bb733750fd27eed280221c0ad95f2eaac99a 100644 (file)
@@ -30,8 +30,8 @@ if (!JavaVersion.current().isCompatibleWith(VERSION_17)) {
 def bomTasks = "cyclonedxBom"
 def ghBranch = System.getenv()["GITHUB_BRANCH"]
 def isMainBranch = ghBranch in ['master'] || ghBranch ==~ 'branch-[\\d.]+'
-def isNightlyBuild = ghBranch == "branch-nightly-build"
-boolean enableBom = System.getenv('CI') == "true" && (isMainBranch || isNightlyBuild) ||
+
+boolean enableBom = System.getenv('CI') == "true" && (isMainBranch) ||
         System.getProperty("bom") != null ||
         gradle.startParameter.taskNames.findAll({ it.matches(".*:($bomTasks)") })
 
@@ -65,6 +65,7 @@ allprojects {
     release = project.hasProperty('release') && project.getProperty('release')
     official = project.hasProperty('official') && project.getProperty('official')
     testMonitoringEnabled = project.hasProperty('withTestMonitoring')
+    utMonitoringEnabled = project.hasProperty('withUtMonitoring')
   }
 
   ext.enableBom = enableBom
@@ -756,7 +757,7 @@ subprojects {
     }
   }
 
-  if (isNightlyBuild) {
+  if (ext.utMonitoringEnabled) {
     tasks.withType(Test) {
       doFirst {
         ext {
index 46bc9ff0d03fa2f30b37f6fde419092b8a27bd5a..bb5fa3b4485e2374112a4b92b2172dc561c78dd6 100644 (file)
@@ -4,11 +4,6 @@ import org.gradle.api.tasks.testing.Test
 
 class BlackBoxTest extends Test {
   BlackBoxTest() {
-    def branch = System.getenv('GITHUB_BRANCH')
-    if (branch != null && Set.of("branch-nightly-build", "master").contains(branch)) {
-      jvmArgs("-javaagent:" + System.getenv('ASPECTJ_WEAVER_PATH'))
-    }
-
     systemProperty 'java.awt.headless', 'true'
     systemProperty 'orchestrator.configUrl', System.getProperty('orchestrator.configUrl')
     systemProperty 'webdriver.chrome.driver', System.getProperty('webdriver.chrome.driver')