diff --git a/.ci/init.gradle b/.ci/init.gradle index 215982b15935a..438154bde7f55 100644 --- a/.ci/init.gradle +++ b/.ci/init.gradle @@ -78,15 +78,6 @@ if (USE_ARTIFACTORY) { } } -projectsLoaded { - rootProject { - project.pluginManager.withPlugin('com.gradle.build-scan') { - buildScan.server = 'https://gradle-enterprise.elastic.co' - } - } -} - - final String buildCacheUrl = System.getProperty('org.elasticsearch.build.cache.url') final boolean buildCachePush = Boolean.valueOf(System.getProperty('org.elasticsearch.build.cache.push', 'false')) diff --git a/.ci/jobs.t/defaults.yml b/.ci/jobs.t/defaults.yml index 662a2798bb98a..f83ffb34735a1 100644 --- a/.ci/jobs.t/defaults.yml +++ b/.ci/jobs.t/defaults.yml @@ -35,7 +35,6 @@ fail: true - ansicolor - timestamps - - gradle-build-scan properties: - github: url: https://github.com/elastic/elasticsearch/ diff --git a/build.gradle b/build.gradle index 5f0a6734538ec..aad5111096dbd 100644 --- a/build.gradle +++ b/build.gradle @@ -39,7 +39,6 @@ plugins { id "com.diffplug.spotless" version "5.6.1" apply false } -apply from: 'gradle/build-scan.gradle' apply from: 'gradle/build-complete.gradle' apply from: 'gradle/runtime-jdk-provision.gradle' apply from: 'gradle/ide.gradle' diff --git a/gradle/build-scan.gradle b/gradle/build-scan.gradle index 530725ce6dfb0..3feb9eae61b48 100644 --- a/gradle/build-scan.gradle +++ b/gradle/build-scan.gradle @@ -19,76 +19,4 @@ buildScan { if (BuildParams.inFipsJvm) { tag 'FIPS' } - - // Automatically publish scans from Elasticsearch CI - if (jenkinsUrl?.host?.endsWith('elastic.co')) { - publishAlways() - buildScan.server = 'https://gradle-enterprise.elastic.co' - } - - // Link to Jenkins worker logs and system metrics - if (nodeName) { - link 'System logs', "https://infra-stats.elastic.co/app/infra#/logs?" + - "&logFilter=(expression:'host.name:${nodeName}',kind:kuery)" - buildFinished { - link 'System metrics', "https://infra-stats.elastic.co/app/infra#/metrics/host/" + - "${nodeName}?_g=()&metricTime=(autoReload:!f,refreshInterval:5000," + - "time:(from:${startTime - TimeUnit.MILLISECONDS.convert(5, TimeUnit.MINUTES)},interval:%3E%3D1m," + - "to:${System.currentTimeMillis() + TimeUnit.MILLISECONDS.convert(5, TimeUnit.MINUTES)}))" - } - } - - // Jenkins-specific build scan metadata - if (jenkinsUrl) { - // Disable async upload in CI to ensure scan upload completes before CI agent is terminated - uploadInBackground = false - - // Parse job name in the case of matrix builds - // Matrix job names come in the form of "base-job-name/matrix_param1=value1,matrix_param2=value2" - def splitJobName = jobName.split('/') - if (splitJobName.length > 1 && splitJobName.last() ==~ /^([a-zA-Z0-9_\-]+=[a-zA-Z0-9_\-&\.]+,?)+$/) { - def baseJobName = splitJobName.dropRight(1).join('/') - tag baseJobName - tag splitJobName.last() - value 'Job Name', baseJobName - def matrixParams = splitJobName.last().split(',') - matrixParams.collect { it.split('=') }.each { param -> - value "MATRIX_${param[0].toUpperCase()}", param[1] - } - } else { - tag jobName - value 'Job Name', jobName - } - - tag 'CI' - link 'Jenkins Build', buildUrl - link 'GCP Upload', "https://console.cloud.google.com/storage/elasticsearch-ci-artifacts/jobs/${jobName}/build/${buildNumber}.tar.bz2" - value 'Job Number', buildNumber - - System.getenv().getOrDefault('NODE_LABELS', '').split(' ').each { - value 'Jenkins Worker Label', it - } - - // Add SCM information - def isPrBuild = System.getenv('ROOT_BUILD_CAUSE_GHPRBCAUSE') != null - if (isPrBuild) { - value 'Git Commit ID', System.getenv('ghprbActualCommit') - value 'Git Branch', System.getenv('ghprbTargetBranch') - tag System.getenv('ghprbTargetBranch') - tag "pr/${System.getenv('ghprbPullId')}" - tag 'pull-request' - link 'Source', "https://github.com/elastic/elasticsearch/tree/${System.getenv('ghprbActualCommit')}" - link 'Pull Request', System.getenv('ghprbPullLink') - } else { - if (System.getenv('GIT_BRANCH')) { - def branch = System.getenv('GIT_BRANCH').split('/').last() - value 'Git Branch', branch - tag branch - } - value 'Git Commit ID', BuildParams.gitRevision - link 'Source', "https://github.com/elastic/elasticsearch/tree/${BuildParams.gitRevision}" - } - } else { - tag 'LOCAL' - } }