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
- File `$GRADLE_USER_HOME/.gradle/develocity/keys.properties`, or `~/.gradle/develocity/keys.properties` if `GRADLE_USER_HOME` is not set
51
+
- File `~/.m2/.develocity/keys.properties`
52
+
53
+
Refer to the Develocity [Gradle Plugin User Manual][37] or [Maven Extension User Manual][38] for details on these variables and files, including support for keys of multiple hosts.
54
+
55
+
</details>
37
56
38
57
### Setup snippets
39
58
@@ -177,8 +196,8 @@ your own. For example:
177
196
178
197
```kotlin
179
198
val config =Config(
180
-
apiUrl="https://ge.mycompany.com/api/",
181
-
apiToken= { vault.getGeApiToken() },
199
+
develocityUrl="https://ge.mycompany.com/",
200
+
accessKey= { vault.getDevelocityAccessKey() },
182
201
clientBuilder = existingClient.newBuilder(),
183
202
)
184
203
val api =DevelocityApi.newInstance(config)
@@ -219,8 +238,8 @@ For general discussions or questions, feel free to reach out to maintainers on t
[All API requests require authentication][1]. Provide a valid access key of your Develocity instance
4
-
as the `DEVELOCITY_API_TOKEN` environment variable.
3
+
API requests may require [authentication][1].
5
4
6
-
## How to get an access key
5
+
## Anonymous access
7
6
8
-
1. Sign in to Develocity (with a user that has “Export build data” permission)
9
-
2. Go to "My settings" from the user menu in the top right-hand corner of the page
10
-
3. Go to "Access keys" from the sidebar
11
-
4. Click "Generate" on the right-hand side
12
-
5. Set key as the `DEVELOCITY_API_TOKEN` environment variable when using the library
7
+
If your Develocity server is configured to allow [anonymous access][2] for permission "Access build data via the API", then an access key is not required to use this library.
8
+
This is often the case for a server only accessible from a private network.
Please check if you already have an access key set up in your build environment for the Develocity server you want to query. The first key for a matching host will be used, if found.
22
+
23
+
See the official manuals for instructions on how to set up a new access key in one of these locations:
24
+
25
+
-[Develocity Gradle Plugin User Manual][3]
26
+
-[Develocity Maven Extension User Manual][4]
27
+
-[Develocity sbt Plugin User Manual][5]
28
+
-[Develocity npm Agent User Manual][6]
29
+
-[Develocity Python Agent User Manual][7]
30
+
31
+
### User permissions
32
+
33
+
To call the API, the user from which the access key was generated must have the "Access build data via the API" permission.
Copy file name to clipboardExpand all lines: examples/example-notebooks/MostFrequentBuilds.ipynb
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -9,7 +9,7 @@
9
9
"source": [
10
10
"# Most frequent builds\n",
11
11
"\n",
12
-
"See what builds are most commonly invoked by developers, e.g. `clean assemble`, `test` or `check`. You can [set up the URL and a token for your Develocity instance](https://github.com/gabrielfeo/develocity-api-kotlin/blob/main/README.md#setup) and run this notebook as-is for your own project.\n",
12
+
"See what builds are most commonly invoked by developers, e.g. `clean assemble`, `test` or `check`. You can [set up the URL and an access key for your Develocity instance](https://github.com/gabrielfeo/develocity-api-kotlin/blob/main/README.md#setup) and run this notebook as-is for your own project.\n",
13
13
"\n",
14
14
"This is a simple example of something you can do with the API. It could bring insights, for example:\n",
0 commit comments