From a961a93da770bd1a1a5619f6653044ad0bd22a28 Mon Sep 17 00:00:00 2001 From: Pavel Punegov Date: Tue, 26 Jul 2022 13:50:17 +0300 Subject: [PATCH] [K/N][perf] Use properties file to get TeamCity URL --- kotlin-native/performance/build.gradle | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/kotlin-native/performance/build.gradle b/kotlin-native/performance/build.gradle index f8fad9c2223..3ac92502921 100644 --- a/kotlin-native/performance/build.gradle +++ b/kotlin-native/performance/build.gradle @@ -312,10 +312,17 @@ subprojects.each { } task teamCityStat(type:Exec) { + def teamcityUrl = "" + def teamcityConfig = System.getenv("TEAMCITY_BUILD_PROPERTIES_FILE") + if (teamcityConfig) { + def buildProperties = new Properties() + buildProperties.load(new FileInputStream(teamcityConfig)) + teamcityUrl = buildProperties.getProperty("teamcity.serverUrl") + } def analyzer = findAnalyzerBinary() commandLine analyzer, "-r", "teamcity", "--artifactory-url", "https://repo.labs.intellij.net/kotlin-native-benchmarks", - "--teamcity-url", "http://buildserver.labs.intellij.net", + "--teamcity-url", teamcityUrl, "--server-url", findProperty("kotlin.native.performance.server.url")?.toString() ?: "http://localhost:3000", "${buildDir.absolutePath}/${nativeJson}" }