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

feat(manager/sbt): support proxy registries #27276

Merged
merged 24 commits into from Feb 27, 2024

Conversation

lpriyasivakumar
Copy link
Contributor

Changes

Sbt builds allow for proxy/mirror registries to be defined in a repositories file. This PR is to add this feature to renovate

Context

Currently, the default maven repository is always used to pull dependencies in a sbt project.
Registry overrides are not supported.

Sbt looks for a launcher configuration file with the following entries:

  • -Dsbt.override.build.repos=true
  • -Dsbt.repository.config=

Based on the provided location, the repositories file is parsed to get the repositories for plugins and build dependencies.

Default scala repositories: Link

[repositories]
  local
  typesafe-ivy-releases: https://repo.typesafe.com/typesafe/ivy-releases/, [organization]/[module]/[revision]/[type]s/[artifact](-[classifier]).[ext], bootOnly
  maven-central
  sonatype-snapshots: https://oss.sonatype.org/content/repositories/snapshots

Example scala repositories file: Link

[repositories] 
  local 
  my-ivy-proxy-releases: http://repo.company.com/ivy-releases/, [organization]/[module]/(scala_[scalaVersion]/) (sbt_[sbtVersion]/)[revision]/[type]s/[artifact](-[classifier]).[ext]
  my-maven-proxy-releases: http://repo.company.com/maven-releases/ 

Test repository: https://github.com/lpriyasivakumar/lila-fishnet/tree/test-branch

Documentation (please check one with an [x])

  • I have updated the documentation, or
  • No documentation update is required

How I've tested my work (please select one)

I have verified these changes via:

  • Code inspection only, or
  • Newly added/modified unit tests, or
  • No unit tests but ran on a real repository, or
  • Both unit tests + ran on a real repository

Copy link
Collaborator

@secustor secustor left a comment

Choose a reason for hiding this comment

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

First pass 🙂

lib/modules/manager/sbt/extract.ts Show resolved Hide resolved
lib/modules/manager/sbt/extract.ts Outdated Show resolved Hide resolved
lib/modules/manager/sbt/extract.ts Outdated Show resolved Hide resolved
lib/modules/manager/sbt/extract.spec.ts Show resolved Hide resolved
lib/modules/manager/sbt/extract.ts Outdated Show resolved Hide resolved
Copy link
Member

@viceice viceice left a comment

Choose a reason for hiding this comment

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

we know registry urls is defined

lib/modules/manager/sbt/extract.ts Outdated Show resolved Hide resolved
lib/modules/manager/sbt/extract.ts Outdated Show resolved Hide resolved
lib/modules/manager/sbt/extract.ts Outdated Show resolved Hide resolved
lib/modules/manager/sbt/extract.ts Outdated Show resolved Hide resolved
lib/modules/manager/sbt/extract.ts Outdated Show resolved Hide resolved
@secustor secustor added this pull request to the merge queue Feb 27, 2024
Merged via the queue into renovatebot:main with commit 5de12e7 Feb 27, 2024
35 checks passed
@renovate-release
Copy link
Collaborator

🎉 This PR is included in version 37.217.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 31, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants