-
Notifications
You must be signed in to change notification settings - Fork 272
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
[OSD][Build] nvm use #1905
[OSD][Build] nvm use #1905
Conversation
Within OSD we have a .nvmrc file that is used when `nvm use` is executing. So we can use the right node version for the build. Issue: n/a Signed-off-by: Kawika Avilla <[email protected]>
Codecov Report
@@ Coverage Diff @@
## main #1905 +/- ##
=========================================
Coverage 94.60% 94.60%
Complexity 20 20
=========================================
Files 178 178
Lines 3633 3633
Branches 27 27
=========================================
Hits 3437 3437
Misses 192 192
Partials 4 4 Continue to review full report at Codecov.
|
Jenkins is doing stuff that is preventing us from passing the environment variable and running the command that was added https://issues.jenkins.io/browse/JENKINS-51307. Therefore the current node version is being used and having some failures while building This also doesn't work because |
This does work if you can source the nvm.sh before running nvm.
|
I understand the NVM docs call out to define $NVM_DIR when setting it up but I'm not seeing the preference to source a script from an environment variable that may not exist rather than adding it to the PATH for the docker image. Would seem like an anti pattern for the repo as well. |
If I source $NVM_DIR will make sure to update https://github.com/opensearch-project/opensearch-build/blob/main/DEVELOPER_GUIDE.md#nvm-and-node to ensure users define it in the environment. |
Signed-off-by: Kawika Avilla <[email protected]>
Signed-off-by: Kawika Avilla <[email protected]>
The builds for 2.0.0 have been broken for a couple days now so to unblock this I have created a follow up issue: #1922 since I still believe adding to |
Signed-off-by: Kawika Avilla <[email protected]>
Signed-off-by: Kawika Avilla <[email protected]>
echo "Setting node version" | ||
source $NVM_DIR/nvm.sh | ||
nvm use |
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.
Add a check if $NVM_DIR isn't defined then send them to the setup guide - this would be a good fast follow
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.
Oh yes that would actually be a really good solution that will make me feel better about this code being in here. I've created an issue #1922 but trying my best not to be online so I might not be able to get this as a fast follow.
Origin: opensearch-project#1905 Incorrectly copied the path while fixing the build to use NVM. Issue: n/a Signed-off-by: Kawika Avilla <[email protected]>
Origin: #1905 Incorrectly copied the path while fixing the build to use NVM. Issue: n/a Signed-off-by: Kawika Avilla <[email protected]>
Description
Within OSD we have a .nvmrc file that is used when
nvm use
is executing. So we can use the right node version for the
build.
Issue:
n/a
Signed-off-by: Kawika Avilla [email protected]
Issues Resolved
n/a
Check List
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.