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

Automatically configure NPM_CONFIG_GLOBALCONFIG with location of a binding of type npmrc #396

Closed
ryanmoran opened this issue Jun 11, 2021 · 2 comments
Labels
enhancement A new feature or request
Projects

Comments

@ryanmoran
Copy link
Member

Summary

It is not uncommon to want to include secrets in npm configuration. In some cases these secrets cannot be passed via environment variables as they are not stored securely on the platform that is executing the build. Instead, we tell developers that they can use a binding and then specify NPM_CONFIG_GLOBALCONFIG to point to that binding location.

The buildpack could handle this wiring automatically. If a binding is of type npmrc, then it can assign NPM_CONFIG_GLOBALCONFIG to point to that binding location automatically, thus saving developers from having to hardcode this into their build configurations.

@noamichael
Copy link

This is critical for when npm install needs to reach out to private artifact repositories that require credentials, such as Artifactory. The registry auth tokens are stored in the .npmrc file and should not be committed to the source code repository, so a binding would be required.

@fg-j
Copy link

fg-j commented Jul 22, 2022

Has this issue been completed? It seems like the npm-install and yarn-install buildpacks now set this env var.

NodeJS automation moved this from In Progress to Done Jul 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement A new feature or request
Projects
Development

No branches or pull requests

4 participants