forked from opensearch-project/OpenSearch
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild-scan.gradle
33 lines (27 loc) · 971 Bytes
/
build-scan.gradle
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
/*
* SPDX-License-Identifier: Apache-2.0
*
* The OpenSearch Contributors require contributions made to
* this file be licensed under the Apache-2.0 license or a
* compatible open source license.
*
* Modifications Copyright OpenSearch Contributors. See
* GitHub history for details.
*/
import org.opensearch.gradle.OS
import org.opensearch.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'
}
}