gradle-enterprise-build-validation-scripts
gradle-enterprise-build-validation-scripts copied to clipboard
Unable to generate API summary when access key is provisioned by Develocity plugin/extension
The API summary currently only looks for API keys in enterprise/keys.properties
. As of Develocity Gradle Plugin 3.17, keys are generated and stored in develocity/keys.properties
: https://docs.gradle.com/enterprise/gradle-plugin/current/#automated_access_key_provisioning
This means that users who provision a key with Develocity Gradle Plugin 3.17+ will not be able to properly generate the summary at the end of the experiments.
I assume the same is true for Maven as well.
I am experiencing something related if you do not define the API token at all. In my case, the build scans can be published but the summary cannot be produced due to permission issues. I'd suggest adding an initial verification call to the Develocity server that sends the token to check if it is valid. Only then proceed with generating the first build scan.
For now we recommend you to use the older versions of the Gradle Enterprise Gradle plugin 3.16.2 and Gradle Enterprise Maven extension 1.20.1 to run the Build Validation Scripts.
You can use the latest versions of the Develocity Gradle plugin and Develocity Maven extension for all other use cases.
Note that if Publish build scans
is not granted anonymously, then an access key granting the permission is required in at least one of the following places when using these older plugin/extension versions:
For Gradle:
-
enterprise/keys.properties
in the Gradle user home directory -
GRADLE_ENTERPRISE_ACCESS_KEY
environment variable
For Maven:
-
.gradle-enterprise/keys.properties
in the Maven user home directory -
GRADLE_ENTERPRISE_ACCESS_KEY
environment variable
If Access build data via the API
is not granted anonymously and the Performance Characteristics
section of the summary is desired, or in automation scenarios, then an access key granting the permission is required in at least one of any of the above mentioned locations.
In order to verify connectivity and that everything works as expected, you can run the following command:
For Gradle:
./01-validate-incremental-building.sh -t assemble -r https://github.com/gradle/gradle-build-scan-quickstart -e -s https://develocity.example.io
For Maven:
./01-validate-local-build-caching-same-location.sh -g compile -r https://github.com/gradle/maven-build-scan-quickstart -e -s https://develocity.example.io