Skip to content

feat: add --oss-host CLI option for custom OSS Index URL#159

Open
brianf wants to merge 2 commits intomainfrom
feature/configurable-ossindex-url
Open

feat: add --oss-host CLI option for custom OSS Index URL#159
brianf wants to merge 2 commits intomainfrom
feature/configurable-ossindex-url

Conversation

@brianf
Copy link

@brianf brianf commented Jan 22, 2026

Summary

This PR adds the --oss-host command-line option to jake ddt, enabling users to specify a custom OSS Index host URL for testing, enterprise deployments, or compliance requirements.

⚠️ Important: Dependency Note

This PR depends on ossindex-lib gaining host parameter support.

Do not merge this PR until the ossindex-lib changes are released.

Changes

Code Changes

  • jake/command/oss.py: Added --oss-host CLI argument
    • Pass host parameter to OssIndex() constructor
    • CLI argument takes precedence over config file
  • jake/command/oss.py: Updated OssIndex instantiation to accept custom host

Test Changes

  • tests/test_jake.py: Added test_jake_ddt_help_includes_oss_host
    • Verifies --oss-host appears in help text

Documentation Changes

  • README.md: Updated usage documentation to include --oss-host
  • docs/usage.rst: Updated usage examples
  • docs/configuration.rst: Added "Custom OSS Index Host" section

Configuration Methods

Users can configure a custom OSS Index host in three ways:

  1. Via command-line argument (highest priority):
jake ddt --oss-host https://custom.ossindex.example.com
  1. Via configuration file ($HOME/.oss-index.config):
username: my-username
password: my-password
host: https://custom.ossindex.example.com
  1. Default: https://ossindex.sonatype.org

Backward Compatibility

All changes are backward compatible. Existing usage continues to work without modification.

Testing

  • ✅ Syntax validation passed
  • ✅ Test added for CLI argument presence
  • ⚠️ Full test suite not run locally (requires environment setup)

Use Cases

  • Testing against staging/development OSS Index environments
  • Enterprise deployments with custom OSS Index mirrors
  • Compliance with network policies requiring specific endpoints
  • Development and debugging workflows

Related

- Add --oss-host command-line argument to 'jake ddt'
- Pass host parameter to OssIndex from ossindex-lib
- CLI argument takes precedence over config file
- Add test for CLI argument presence
- Update documentation with usage examples

This feature enables users to point to custom OSS Index instances
for testing, enterprise deployments, or compliance requirements.

Note: Requires ossindex-lib with host parameter support (pending release)
@paul-botsco-2-0 paul-botsco-2-0 bot added the 😧 commits missing verification Some commits are not signed - this must be resolved label Jan 22, 2026
@paul-botsco-2-0
Copy link

Thanks for the contribution. Unfortunately some of your commits don't meet our standards. All commits must be signed and have author information set.

The commits to review are:

See Signed Commits.

@sonarqubecloud
Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

😧 commits missing verification Some commits are not signed - this must be resolved

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant