Skip to content

chore(feat): support optional .npmrc mount for dynamic plugin installation - #40

Merged
rm3l merged 17 commits into
redhat-developer:mainfrom
Fortune-Ndlovu:load-external-plugins-from-.npmrc
May 12, 2025
Merged

chore(feat): support optional .npmrc mount for dynamic plugin installation#40
rm3l merged 17 commits into
redhat-developer:mainfrom
Fortune-Ndlovu:load-external-plugins-from-.npmrc

Conversation

@Fortune-Ndlovu

@Fortune-Ndlovu Fortune-Ndlovu commented Apr 29, 2025

Copy link
Copy Markdown
Member

Description

This PR introduces support for optionally mounting a local .npmrc file into the install-dynamic-plugins container in RHDH Local, enabling developers to install dynamic plugins from private NPM registries without modifying the compose.yaml file.

  • Updated fixes.sh to detect if configs/extra-files/.npmrc exists and set NPM_CONFIG_USERCONFIG environment variable dynamically
  • Added a .npmrc.example template under configs/extra-files/ to guide users
  • Updated README.md to document the optional .npmrc setup and fallback behavior

If no .npmrc is present, plugin installation continues using the default public registry settings.

This change is fully backward-compatible and does not impact users who do not require private registry access.

Which issue(s) does this PR fix or relate to

PR acceptance criteria

  • Tests
  • Documentation

How to test changes / Special notes to the reviewer

…ll-dynamic-plugins services volumes with the relevant bind.

Signed-off-by: Fortune-Ndlovu <fndlovu@redhat.com>
…npmrc was mounted.

Signed-off-by: Fortune-Ndlovu <fndlovu@redhat.com>
…ut modifying the compone.yaml. For example users can put their privae config at ~/secure/npmrc and just override with .

Signed-off-by: Fortune-Ndlovu <fndlovu@redhat.com>
…Installation

Signed-off-by: Fortune-Ndlovu <fndlovu@redhat.com>
Signed-off-by: Fortune-Ndlovu <fndlovu@redhat.com>
@Fortune-Ndlovu Fortune-Ndlovu changed the title [WIP] chore(feat): support optional .npmrc mount for dynamic plugin installation chore(feat): support optional .npmrc mount for dynamic plugin installation Apr 29, 2025
@Fortune-Ndlovu

Copy link
Copy Markdown
Member Author

cc: @kadel @benwilcock @rm3l for review please

@rm3l

rm3l commented May 6, 2025

Copy link
Copy Markdown
Member

/cc

@openshift-ci
openshift-ci Bot requested a review from rm3l May 6, 2025 19:38
Comment thread README.md Outdated
@Fortune-Ndlovu
Fortune-Ndlovu requested a review from rm3l May 7, 2025 10:57
Signed-off-by: Fortune-Ndlovu <fndlovu@redhat.com>
Signed-off-by: Fortune-Ndlovu <fndlovu@redhat.com>
Signed-off-by: Fortune-Ndlovu <fndlovu@redhat.com>
…file (./configs/extra-files/.npmrc), which doesn't always exist (e.g., in CI or on fresh clones), and Docker does not allow that.

Signed-off-by: Fortune-Ndlovu <fndlovu@redhat.com>
…files

Signed-off-by: Fortune-Ndlovu <fndlovu@redhat.com>
Comment thread compose.yaml Outdated
Comment thread README.md Outdated
Signed-off-by: Fortune-Ndlovu <fndlovu@redhat.com>
…allation behavior

Signed-off-by: Fortune-Ndlovu <fndlovu@redhat.com>
@Fortune-Ndlovu
Fortune-Ndlovu requested a review from rm3l May 12, 2025 11:07
@Fortune-Ndlovu

Copy link
Copy Markdown
Member Author

/lgtm @rm3l wdyt?

Comment thread fixes.sh
Comment thread README.md
Signed-off-by: Fortune-Ndlovu <fndlovu@redhat.com>

@rm3l rm3l left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

/lgtm

@openshift-ci openshift-ci Bot added the lgtm label May 12, 2025
@rm3l
rm3l merged commit 62a9ea9 into redhat-developer:main May 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants