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

Add skip-path Feature for Dependency Mirrors #366

Merged
merged 3 commits into from
Oct 10, 2024

Conversation

bitgully
Copy link
Contributor

Summary

Adds skip-path feature for dependency mirrors.
This provides the option of skipping path segments of the original location as discussed here in regards to the /maven2 issue.

Usage: Can be used by a comma separated argument as in https://mirror.example.org,skip-path=/path-to-skip

Use Cases

  1. Download all dependencies from https://mirror.example.org but skip /maven2 in the mirror's path if this is part of any original location.
    BP_DEPENDENCY_MIRROR=https://mirror.example.org,skip-path=/maven2

  2. Download all dependencies from https://mirror.example.org using the original path but skip /maven2 on the mirror if the original path at https://repo1.maven.org includes this segment.
    BP_DEPENDENCY_MIRROR=https://mirror.example.org
    BP_DEPENDENCY_MIRROR_REPO1_MAVEN_ORG=https://mirror.example.org,skip-path=/maven2

This feature can also be used in dependency-mirror bindings.

Checklist

  • I have viewed, signed, and submitted the Contributor License Agreement.
  • I have linked issue(s) that this PR should close using keywords or the Github UI (See docs)
  • I have added an integration test, if necessary.
  • I have reviewed the styleguide for guidance on my code quality.
  • I'm happy with the commit history on this PR (I have rebased/squashed as needed).

@bitgully bitgully requested a review from a team as a code owner September 23, 2024 18:42
@dmikusa dmikusa added type:enhancement A general enhancement semver:minor A change requiring a minor version bump labels Oct 8, 2024
dependency_cache.go Outdated Show resolved Hide resolved
Copy link
Contributor

@dmikusa dmikusa left a comment

Choose a reason for hiding this comment

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

Thanks so much for this PR & sorry for the delay. It's looking good, just two minor things for your consideration.

@dmikusa dmikusa merged commit ed91867 into paketo-buildpacks:main Oct 10, 2024
4 checks passed
dmikusa added a commit that referenced this pull request Nov 12, 2024
Signed-off-by: Daniel Mikusa <dan@mikusa.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
semver:minor A change requiring a minor version bump type:enhancement A general enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants