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

feat(superchain): $NVM_USE_VERSION selects Node.js version #2726

Merged
merged 1 commit into from
Mar 19, 2021

Conversation

rix0rrr
Copy link
Contributor

@rix0rrr rix0rrr commented Mar 19, 2021

We added multiple Node versions into the Superchain image, and made it
possible to switch between them using NVM.

Doing so would require putting nvm use 14 at the top of every script
that wanted to run against a newer Node version, and so would require
modification to scripts in our branches.

Another, more effective, way to configure the Node version is to be able
to do it without modifying the scripts themselves, but by specifying it
via the runtime environment. In this case, via environment variable that
can be set on the Docker environment.

The $NVM_USE_VERSION environment variable will lead to an implicit
execution of nvm use $NVM_USE_VERSION at container startup time, if
present.


By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

We added multiple Node versions into the Superchain image, and made it
possible to switch between them using NVM.

Doing so would require putting `nvm use 14` at the top of every script
that wanted to run against a newer Node version, and so would require
modification to scripts in our branches.

Another, more effective, way to configure the Node version is to be able
to do it without modifying the scripts themselves, but by specifying it
via the runtime environment. In this case, via environment variable that
can be set on the Docker environment.

The `$NVM_USE_VERSION` environment variable will lead to an implicit
execution of `nvm use $NVM_USE_VERSION` at container startup time, if
present.
@rix0rrr rix0rrr requested a review from a team March 19, 2021 09:50
@rix0rrr rix0rrr self-assigned this Mar 19, 2021
@mergify mergify bot added the contribution/core This is a PR that came from AWS. label Mar 19, 2021
Copy link
Contributor

@nija-at nija-at left a comment

Choose a reason for hiding this comment

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

Noice!

@mergify
Copy link
Contributor

mergify bot commented Mar 19, 2021

Thank you for contributing! ❤️ I will now look into making sure the PR is up-to-date, then proceed to try and merge it!

@mergify mergify bot added the pr/ready-to-merge This PR is ready to be merged. label Mar 19, 2021
@mergify mergify bot merged commit fb9abf9 into main Mar 19, 2021
@mergify mergify bot deleted the huijbers/multiple-nodes-envvar branch March 19, 2021 10:35
@mergify
Copy link
Contributor

mergify bot commented Mar 19, 2021

Merging (with squash)...

@mergify mergify bot removed the pr/ready-to-merge This PR is ready to be merged. label Mar 19, 2021
RomainMuller added a commit that referenced this pull request Mar 23, 2021
Includes the following:
- Revert "fix(superchain): use entrypoint to set up nvm (#2736)"
  - This reverts commit 0e247b6.
- Revert "feat(superchain): `$NVM_USE_VERSION` selects Node.js version (#2726)"
  - This reverts commit fb9abf9.
- Revert "feat(superchain): install both Node 10 and Node 14 (#2718)"
  - This reverts commit 3ca97d9.
RomainMuller added a commit that referenced this pull request Mar 23, 2021
…2737)

Includes the following:
- Revert "fix(superchain): use entrypoint to set up nvm (#2736)"
  - This reverts commit 0e247b6.
- Revert "feat(superchain): `$NVM_USE_VERSION` selects Node.js version (#2726)"
  - This reverts commit fb9abf9.
- Revert "feat(superchain): install both Node 10 and Node 14 (#2718)"
  - This reverts commit 3ca97d9.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
contribution/core This is a PR that came from AWS.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants