Allow wrapper to use distribution credential from environment #29127
Labels
a:feature
A new functionality
in:wrapper
to-triage
👋 team-triage
Issues that need to be triaged by a specific team
Expected Behavior
Option 1:
Expose set ENV variable keys such as -
Option 2:
Provide an option of configurable env. keys via
gradle-wrapper.properties
which is located within projects.This allows per project configurability, avoiding security issues that can occur due to multiple projects, for example in a developer machine.
Option 3:
Make distribution URL configurable based on env, so that we can provide
https://username:password@somehost
format.Current Behavior (optional)
Wrapper expects credentials to be specified in
.gradle/gradle.properties
or viadistributionUrl=https://username:password@somehost
format.This is not convinient in build environments where often ephimeral nodes are used for running gradle.
Context
Due to the current limitations in how the wrapper credentials can be provided, we have not been able to use a custom distribution URL (which is authenticated).
Why current approach has limitations -
.gradle/gradle.properties
is not possible.distributionUrl=https://username:password@somehost
is not suitable as this would require us to hard code the credentials in project'sgradle-wrapper.properties
.Also see:
All of these requests could help you decide on the final approach taken. Mostly I would also like to highlight that these customization are much sought after and cannot be called an obscure ask. Using env. to influence builds is a very common pattern in Jenkins and similar build setups.
The text was updated successfully, but these errors were encountered: