-
Notifications
You must be signed in to change notification settings - Fork 71
Add Sonatype Nexus repository integration module #262
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 Sonatype Nexus repository integration module #262
Conversation
- Add nexus module with support for Maven, npm, PyPI, and Docker registries - Includes comprehensive test suite with 11 passing tests - Supports configurable repositories per package manager - Automatic configuration of package manager settings - Secure credential handling with API token support - Flexible username configuration (username or email) - Complete documentation with usage examples Resolves coder#202
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
- Fix Terraform formatting with terraform fmt - Fix README formatting with prettier - All linting checks now pass
How does the user authenticate their account? |
@bpmct through url and password |
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.
Left a few suggestions.
Does it work with https://help.sonatype.com/en/user-tokens.html? |
Also, @michaelbrewer, do you use https://help.sonatype.com/en/user-tokens.html based authentication? |
yeah |
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.
I think we should rename eModule to be valued Nexus repository as Nexus has multiple other products. Please also update all other references.
Co-authored-by: Atif Ali <[email protected]>
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.
Pull Request Overview
This PR adds a comprehensive Sonatype Nexus Repository integration module for Coder that automatically configures Maven, npm, PyPI, and Docker registries for development workspaces with secure credential handling.
- Implements a complete Nexus integration module with support for multiple package managers
- Provides secure credential handling using API tokens and password authentication
- Includes comprehensive test coverage with 11 tests covering all functionality
Reviewed Changes
Copilot reviewed 5 out of 6 changed files in this pull request and generated 3 comments.
Show a summary per file
File | Description |
---|---|
registry/mavrickrishi/modules/nexus/main.tf | Main Terraform module with variable definitions, validation rules, and script configuration |
registry/mavrickrishi/modules/nexus/run.sh | Shell script that configures package managers (Maven, npm, PyPI, Docker) with Nexus repositories |
registry/mavrickrishi/modules/nexus/main.test.ts | Comprehensive test suite with 11 tests covering all module functionality |
registry/mavrickrishi/modules/nexus/README.md | Complete documentation with usage examples for all supported package managers |
registry/mavrickrishi/README.md | Registry metadata and module listing for the mavrickrishi namespace |
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
One last thing |
@DevelopmentCats any updates? |
Ill check on this now. I hadn't gotten an email from them |
@MAVRICK-1 can you run |
on it |
@DevelopmentCats done |
@MAVRICK-1 Would this work with nexus repositories that allow anonymous connections? Im testing it out now, and I notice that nexus_password is a required variable. |
@DevelopmentCats yeah |
I guess I might be misunderstanding, because when I setup nexus repository, it asked if I wanted to allow anonymous access. It definitely works when I use authentication, but the anonymous access option seemed like it would allow usage of the nexus repo without needing authentication at all. I realize that this might not be the usual usage, but we might want to leave it as a possibility since its probably not unheard of in air gapped environments. |
@DevelopmentCats are you using the pro version? Pro version have Authentication |
Im not, but it seems like this would be available for basic or pro versions? https://help.sonatype.com/en/anonymous-access.html |
@DevelopmentCats sorry , i didn't understood your question properly? |
@MAVRICK-1 I tested everything out and it seems to work well for setting up the connection to the nexus repository in all of my tests. The only thing that I think you need to do before we can merge this is find a better logo to use for nexus. Take a look at the other icons that are used for other modules to get an idea of what we would need. We would basically just want this logo: ![]() Once you have changed that, you will need to add the icon to https://github.com/coder/coder/tree/main/site/static/icon In order for it to show up properly for the coder-script when run in the workspace. You can look at my PR below for reference. |
@DevelopmentCats done 🥇 |
@MAVRICK-1 Did you make the pr to add it to the |
@MAVRICK-1 Perfect! Once that is merged, I will go ahead and release this. Thanks for the contribution!!! |
@DevelopmentCats @matifali thanx a lot for all the reviews, I have learned a lot from here . Is there any way I can become a member of coder ( as a volunteer) ? |
@DevelopmentCats pr is merged |
I would keep an eye out for announcements in discord, as the coder team will post information along those lines there. 😄 |
Add Sonatype Nexus Repository Integration Module
Summary
Implements a Coder module for Sonatype Nexus Repository Manager integration that automatically configures Maven, npm, PyPI, and Docker registries for development workspaces.
Demo Video & Screenshots
Screencast.from.2025-07-29.23-34-36.mp4
Features
settings.xml
configuration.npmrc
configuration with scoped packagespip.conf
configurationNexus Repository Manager Requirements
Version Requirements
Yes, this module requires Nexus Repository Manager Pro version for full functionality, though basic features work with the Community Edition (OSS).
Supported Authentication Methods
This module supports 4 authentication methods:
User Token Authentication (Recommended - Pro only)
nx-usertoken-current
privilegeAPI Token Authentication (Pro only)
Basic Authentication (OSS & Pro)
Base64 Encoded Credentials (OSS & Pro)
username:password
formatTesting Instructions
Prerequisites
Setup Test Environment
Create Test Repositories in your Nexus instance:
maven-public
,maven-releases
npm-public
,@company:npm-private
pypi-public
,pypi-private
docker-public
,docker-private
Configure Authentication:
Test the Module:
Verify Configuration:
EC2 Deployment Testing
Tested by deploying on EC2 instance with:
Usage Example
Testing
Files Added
registry/mavrickrishi/modules/nexus/main.tf
- Main module configurationregistry/mavrickrishi/modules/nexus/README.md
- Complete documentationregistry/mavrickrishi/modules/nexus/main.test.ts
- Test suiteChecklist
Closes #202
/claim #202