Skip to content

Commit fa86cae

Browse files
authored
Propagate Develocity configuration to sample (#56)
* Propagate Develocity configuration to sample Also: - Adds CI environment var
1 parent 3f4e7fc commit fa86cae

4 files changed

Lines changed: 28 additions & 4 deletions

File tree

‎.github/workflows/precommit.yml‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
name: PR Build
22
on:
33
pull_request:
4+
env:
5+
CI: "true"
46
jobs:
57
gradle:
68
runs-on: ubuntu-latest

‎.github/workflows/publish.yml‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ on:
33
workflow_dispatch:
44
release:
55
types: [published]
6+
env:
7+
CI: "true"
68
jobs:
79
gradle:
810
runs-on: ubuntu-latest

‎README.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
# Graph Analytics Plugin
44

5-
[![Revved up by Develocity](https://img.shields.io/badge/Revved%20up%20by-Develocity-06A0CE?logo=Gradle&labelColor=02303A)](https://community.develocity.cloud/scans?search.rootProjectNames=graph-analytics-plugin)
5+
[![Revved up by Develocity](https://img.shields.io/badge/Revved%20up%20by-Develocity-06A0CE?logo=Gradle&labelColor=02303A)](https://community.develocity.cloud/scans?search.rootProjectNames=graph-analytics-plugin%2A)
66

77
## About This Project
88

‎sample/settings.gradle.kts‎

Lines changed: 23 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ pluginManagement {
99

1010
plugins {
1111
id("com.ebay.graph-analytics")
12-
id("com.gradle.develocity") version("4.0.2")
12+
id("com.gradle.develocity") version("4.5.0")
1313
}
1414

1515
dependencyResolutionManagement {
@@ -21,10 +21,30 @@ dependencyResolutionManagement {
2121

2222
rootProject.name = "graph-analytics-sample"
2323

24+
val isCI = System.getenv("CI") != null
25+
2426
develocity {
27+
server = "https://community.develocity.cloud"
28+
projectId = "ebay"
2529
buildScan {
26-
termsOfUseUrl.set("https://gradle.com/help/legal-terms-of-use")
27-
termsOfUseAgree.set("yes")
30+
uploadInBackground = !isCI
31+
publishing.onlyIf { it.isAuthenticated }
32+
obfuscation {
33+
ipAddresses { addresses -> addresses.map { _ -> "0.0.0.0" } }
34+
}
35+
}
36+
}
37+
38+
buildCache {
39+
local {
40+
isEnabled = true
41+
}
42+
43+
remote(develocity.buildCache) {
44+
isEnabled = true
45+
// Check access key presence to avoid build cache errors on PR builds when access key is not present
46+
val accessKey = System.getenv("DEVELOCITY_ACCESS_KEY")
47+
isPush = isCI && accessKey != null
2848
}
2949
}
3050

0 commit comments

Comments
 (0)