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

Local file:// source for prebuilds? #136

Closed
jchook opened this issue Dec 21, 2020 · 3 comments
Closed

Local file:// source for prebuilds? #136

jchook opened this issue Dec 21, 2020 · 3 comments

Comments

@jchook
Copy link
Contributor

jchook commented Dec 21, 2020

Similar to this idea: mapbox/node-pre-gyp#101

When building lightweight docker images, musl prebuilds are commonly unavailable, which triggers a node-gyp rebuild.

To speed up CI/CD flow, I would like to prebuild locally, store that in docker layer cache, then have prebuild-install to use that local prebuild as the "download" source for a subsequent npm ci.

Right now it seems that leveldown_binary_host (for example) does not support the file:// protocol (which might be a neat way to support this feature), and I'm left with either tricking prebuild-install into believing it already downloaded an unpublished prebuild, or serving the prebuild over HTTP.

Happy to contribute a PR.

@vweevers
Copy link
Member

Related: #114

@jchook
Copy link
Contributor Author

jchook commented Dec 23, 2020

Seems we could reinstate most of the code removed in 0593bf5 verbatim to solve the issue.

May want an env var to control the local prebuilds path, though perhaps not necessary?

@jchook jchook mentioned this issue Dec 23, 2020
@jchook
Copy link
Contributor Author

jchook commented Apr 6, 2021

Released in 6.1.0 🎉

@jchook jchook closed this as completed Apr 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants