gradle-enterprise-build-validation-scripts
gradle-enterprise-build-validation-scripts copied to clipboard
Build Validation Scripts do not retain GE-specific remote cache config
The Build Validation Scripts do not appear to retain configuration specific to the GE remote cache connector or the GE plugin.
Here are the two specific instances of this issue I've come across:
allowInsecureProtocolwas set totrue, but the local build for Experiment 5 failed withUsing insecure protocols with remote build cache, without explicit opt-in, is unsupported. The workaround for this was to addallowInsecureProtocol=trueto the validation scripts' remote cache init script.accessKeywas configured through the GE plugin extension, but the local build for Experiment 5 was failing to authenticate with the remote cache. This was resolved by configuring the access key inkeys.properties
Ideally all GE configuration applied to the project would be carried over to the script executions.
(Note that resolving the allowInsecureProtocol issue would require updating the GE API to include the value of allowInsecureProtocol.)
In general, this can happen if authentication is required to access the remote build cache (i.e. anonymous remote build cache reads are not allowed).
As a workaround for this issue, you can comment out this section in lib/gradle-init-scripts/configure-remote-build-caching.gradle:
https://github.com/gradle/gradle-enterprise-build-validation-scripts/blob/76e34444a85234f8add65973e039dcb6310e50ba/components/scripts/gradle/gradle-init-scripts/configure-remote-build-caching.gradle#L17-L23
This assumes the build is already configured with correct remote build cache settings, which is generally the case at this point in the process.