OpenSearch/gradle/build-scan.gradle

23 lines
682 B
Groovy

import org.elasticsearch.gradle.OS
import org.elasticsearch.gradle.info.BuildParams
import org.gradle.initialization.BuildRequestMetaData
import java.util.concurrent.TimeUnit
long startTime = project.gradle.services.get(BuildRequestMetaData).getStartTime()
buildScan {
URL jenkinsUrl = System.getenv('JENKINS_URL') ? new URL(System.getenv('JENKINS_URL')) : null
String buildNumber = System.getenv('BUILD_NUMBER')
String buildUrl = System.getenv('BUILD_URL')
String jobName = System.getenv('JOB_NAME')
String nodeName = System.getenv('NODE_NAME')
tag OS.current().name()
// Tag if this build is run in FIPS mode
if (BuildParams.inFipsJvm) {
tag 'FIPS'
}
}