You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+20-38
Original file line number
Diff line number
Diff line change
@@ -7,39 +7,18 @@ Conventions for Gradle projects that use the Gradle Enterprise instance hosted a
7
7
When applied, the conventions will configure the build cache to:
8
8
9
9
- Enable local caching.
10
-
- Use https://ge.spring.io/cache/ as the remote cache.
10
+
- Use https://ge.spring.io as the remote cache server.
11
11
- Enable pulling from the remote cache.
12
-
- Enable pushing to the remote cache if the required credentials are available.
12
+
- Enable pushing to the remote cache when a CI environment is detected and the required access token is available.
13
13
14
14
### Remote cache
15
15
16
16
#### URL
17
17
18
-
By default, https://ge.spring.io/cache/ will be used as the remote cache.
19
-
The URL can be configured using the `GRADLE_ENTERPRISE_CACHE_URL` environment variable.
20
-
21
-
#### Credentials
22
-
23
-
:rotating_light:**Credentials must not be configured in environments where pull requests are built.**:rotating_light:
24
-
25
-
Pushing to the remote cache requires authentication.
26
-
The necessary credentials can be provided using the `GRADLE_ENTERPRISE_CACHE_USERNAME` and `GRADLE_ENTERPRISE_CACHE_PASSWORD` environment variables.
27
-
28
-
#### Bamboo
29
-
30
-
The username and password environment variables should be set using `${bamboo.gradle_enterprise_cache_user}` and `${bamboo.gradle_enterprise_cache_password}` respectively.
31
-
32
-
#### Concourse
33
-
34
-
The username and password environment variables should be set using `((gradle_enterprise_cache_user.username))` and `((gradle_enterprise_cache_user.password))` from Vault respectively.
35
-
36
-
#### GitHub Actions
37
-
38
-
The username and password environment variables should be set using the `GRADLE_ENTERPRISE_CACHE_USER` and `GRADLE_ENTERPRISE_CACHE_PASSWORD` organization secrets respectively.
39
-
40
-
#### Jenkins
41
-
42
-
The username and password environment variables should be set using the `gradle_enterprise_cache_user` username with password credential.
18
+
By default, https://ge.spring.io will be used as the remote cache server.
19
+
The server can be configured using the `GRADLE_ENTERPRISE_CACHE_SERVER` environment variable.
20
+
For backwards compatibility, `GRADLE_ENTERPRISE_CACHE_URL` is also supported for a limited time.
21
+
`/cache/` is removed from the end of the URL and the remainder is used to configure the remote cache server.
43
22
44
23
## Build scan conventions
45
24
@@ -62,15 +41,24 @@ The build scans will be customized to:
62
41
- Enable capturing of file fingerprints
63
42
- Upload build scans in the foreground when running on CI
64
43
65
-
### Build scan publishing credentials
44
+
### Git branch names
66
45
67
-
:rotating_light:**Credentials must not be configured in environments where pull requests are built.**:rotating_light:
46
+
`git rev-parse --abbrev-ref HEAD` is used to determine the name of the current branch.
47
+
This does not work on Concourse as its git resource places the repository in a detached head state.
48
+
To work around this, an environment variable named `BRANCH` can be set on the task to provide the name of the branch.
68
49
69
-
Publishing to [ge.spring.io](https://ge.spring.io) requires authentication via an access key.
70
-
When running on CI, the access key should be made available via the `GRADLE_ENTERPRISE_ACCESS_KEY` environment variable.
50
+
### Anonymous publication
71
51
72
52
When using Gradle, build scans can be published anonymously to scans.gradle.com by running the build with `--scan`.
73
53
54
+
## Authentication
55
+
56
+
:rotating_light:**Credentials must not be configured in environments where pull requests are built.**:rotating_light:
57
+
58
+
Publishing build scans and pushing to the remote cache requires authentication via an access key.
59
+
Additionally, pushing to the remote cache also requires that a CI environment be detected.
60
+
When running on CI, the access key should be made available via the `GRADLE_ENTERPRISE_ACCESS_KEY` environment variable.
61
+
74
62
#### Bamboo
75
63
76
64
The environment variable should be set to `${bamboo.gradle_enterprise_secret_access_key}`.
@@ -91,13 +79,7 @@ The environment variable should be set using the `gradle_enterprise_secret_acces
91
79
92
80
An access key can be provisioned by running `./gradlew provisionGradleEnterpriseAccessKey` once the project has been configured to use this plugin.
93
81
94
-
### Git branch names
95
-
96
-
`git rev-parse --abbrev-ref HEAD` is used to determine the name of the current branch.
97
-
This does not work on Concourse as its git resource places the repository in a detached head state.
98
-
To work around this, an environment variable named `BRANCH` can be set on the task to provide the name of the branch.
99
-
100
-
### Detecting CI
82
+
## Detecting CI
101
83
102
84
Bamboo is detected by looking for an environment variable named `bamboo_resultsUrl`.
0 commit comments