-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Use Google's maven central mirror on github runners #15550
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
Conversation
|
From https://docs.github.com/en/actions/reference/workflows-and-actions/variables I see the |
| project.getRepositories().mavenCentral(); | ||
| // use google's maven central mirror first on github runners. | ||
| // https://github.com/apache/lucene/issues/15541 | ||
| if (project.getProviders().environmentVariable("GITHUB_ACTIONS").isPresent()) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
NIT: can we update the logic similar to apply from: file("declare-repositories.gradle") ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the way it should be done but we can't do the same in declare-repositories.gradle because it's used from contexts where there are no access to providers. So we use what we have access to in declare-repositories.gradle but do it "properly" here.
|
It says: "The name of the action currently running, or the id of a step." Should be sufficient to detect github workflows (not any CI - just github). |
|
Overall LGTM. We can observe the nightly runs with this change. |
Those intermittent resolution errors on github runners are hard to work around. Let's see if we can use
google's mirrors instead (on github only) since we're running jenkins jobs separately (using maven central).