Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow wrapper to use distribution credential from environment #29127

Open
avi-sanwal opened this issue May 14, 2024 · 2 comments
Open

Allow wrapper to use distribution credential from environment #29127

avi-sanwal opened this issue May 14, 2024 · 2 comments
Labels
a:feature A new functionality in:wrapper to-triage 👋 team-triage Issues that need to be triaged by a specific team

Comments

@avi-sanwal
Copy link

Expected Behavior

Option 1:

Expose set ENV variable keys such as -

  • GRADLE_WRAPPER_USERNAME
  • GRADLE_WRAPPER_PASSWORD

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 via distributionUrl=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 -

  1. Our team does not own the build nodes. Furthermore these nodes are shared by different teams. So using .gradle/gradle.properties is not possible.
  2. distributionUrl=https://username:password@somehost is not suitable as this would require us to hard code the credentials in project's gradle-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.

@avi-sanwal avi-sanwal added a:feature A new functionality to-triage labels May 14, 2024
@ljacomet ljacomet added in:wrapper 👋 team-triage Issues that need to be triaged by a specific team and removed to-triage labels May 16, 2024
@ljacomet
Copy link
Member

This issue needs a decision from the team responsible for that area. They have been informed. Response time may vary.

@avi-sanwal
Copy link
Author

Thank you @ljacomet.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
a:feature A new functionality in:wrapper to-triage 👋 team-triage Issues that need to be triaged by a specific team
Projects
None yet
Development

No branches or pull requests

2 participants