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

Declare COURSIER_OPTS to make it available #496

Merged
merged 1 commit into from
Dec 22, 2020

Conversation

divanorama
Copy link
Contributor

@divanorama divanorama commented Dec 9, 2020

Option was added in #385
Not sure which bazel versions are strict about exposing env vars to repository rules, but
it seems that with bazel 3.3.1 COURSIER_OPTS isn't propagated by default.

One use-case is supporting proxy, for built-in repository rules it's possible for example to add following to .bazelrc

startup --host_jvm_args=-Dhttps.proxyHost=... --host_jvm_args=-Dhttps.proxyPort=... --host_jvm_args=-Djavax.net.ssl.trustStore=... --host_jvm_args=-Djavax.net.ssl.trustStorePassword=...

Alternatively we could add TRUST_STORE and TRUST_STORE_PASSWORD env vars, but since COURSIER_OPTS is already here, let's stick with that one.

Option was added in bazelbuild#385
Not sure which bazel versions are strict about exposing env vars to repository rules, but
it seems that with bazel 3.3.1 COURSIER_OPTS isn't propagated by default.

One use-case is supporting proxy, for built-in repository rules it's possible for example to add following to .bazelrc
> startup --host_jvm_args=-Dhttps.proxyHost=... --host_jvm_args=-Dhttps.proxyPort=... --host_jvm_args=-Djavax.net.ssl.trustStore=... --host_jvm_args=-Djavax.net.ssl.trustStorePassword=...
Alternatively we could add TRUST_STORE and TRUST_STORE_PASSWORD env vars, but since COURSIER_OPTS is already here, let's stick with that one.
Copy link
Collaborator

@shs96c shs96c left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems like a reasonable thing to do. LGTM

@shs96c shs96c merged commit 09cbfcf into bazelbuild:master Dec 22, 2020
@shs96c
Copy link
Collaborator

shs96c commented Dec 22, 2020

Thank you for the PR. Making things easier for people seems like an excellent idea :)

@jin jin mentioned this pull request Jan 6, 2021
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants