diff --git a/build-tools-internal/src/main/groovy/elasticsearch.build-scan.gradle b/build-tools-internal/src/main/groovy/elasticsearch.build-scan.gradle index ebb33dbe06884..c6496d89dc642 100644 --- a/build-tools-internal/src/main/groovy/elasticsearch.build-scan.gradle +++ b/build-tools-internal/src/main/groovy/elasticsearch.build-scan.gradle @@ -7,15 +7,13 @@ * License v3.0 only", or the "Server Side Public License, v 1". */ -import java.lang.management.ManagementFactory; -import java.time.LocalDateTime; -import org.elasticsearch.gradle.Architecture import org.elasticsearch.gradle.OS -import static org.elasticsearch.gradle.internal.util.CiUtils.safeName - import java.lang.management.ManagementFactory import java.time.LocalDateTime +import org.elasticsearch.gradle.Architecture + +import static org.elasticsearch.gradle.internal.util.CiUtils.safeName // Resolving this early to avoid issues with the build scan plugin in combination with the configuration cache usage def taskNames = gradle.startParameter.taskNames.join(' ') @@ -32,10 +30,10 @@ develocity { // Automatically publish scans from Elasticsearch CI if (onCI) { publishing.onlyIf { true } - if(server.isPresent() == false) { + if (server.isPresent() == false) { server = 'https://gradle-enterprise.elastic.co' } - } else if( server.isPresent() == false) { + } else if (server.isPresent() == false) { publishing.onlyIf { false } } @@ -99,6 +97,15 @@ develocity { tag 'pull-request' link 'Source', "${prBaseUrl}/tree/${System.getenv('BUILDKITE_COMMIT')}" link 'Pull Request', "https://github.com/${repository}/pull/${prId}" + } else if (System.getenv('ELASTICSEARCH_PR_NUMBER')) { + // For tracking es-pr-check failures in the serverless repo caused by elasticsearch PRs + def esPr = System.getenv('ELASTICSEARCH_PR_NUMBER') + def esCommit = System.getenv('ELASTICSEARCH_SUBMODULE_COMMIT') + value 'Git Commit ID', esCommit + tag "pr/${esPr}" + tag 'pull-request' + link 'Source', "https://github.com/elastic/elasticsearch/pull/${esPr}/commits/${esCommit}" + link 'Pull Request', "https://github.com/elastic/elasticsearch/pull/${esPr}" } else { value 'Git Commit ID', gitRevision.get() link 'Source', "https://github.com/${repository}/tree/${gitRevision.get()}"