Upgrade nodejs apt source repo from 18.x to 20.x #2955
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Required version is updated from v18.16.x to v20.13.x with GitLab v17.0.0 release.
This PR upgrade nodejs apt source repo from 18.x to 20.x. Currently nodejs 20.15.0 is installed.
Documentation:
https://gitlab.com/gitlab-org/gitlab/-/merge_requests/154523
.tool-versions:
https://gitlab.com/gitlab-org/gitlab/-/merge_requests/149615
GitLab v17.0.0 or later requires (grants) nodejs v20.13.x or later, but nodejs v20.5.1 is installed for focal even later LTS are released.
To avoid this issue, official installer script uses "nodistro" instead of specific distribution. So this PR also change apt source for nodjs from "focal" to "nodistro"
See: https://github.com/nodesource/distributions/blob/83867e0fdde8ebb17f5f83644f00c4bb180a4568/scripts/deb/setup_20.x#L74
If we change the source repo to 20.x, GPG key also must be updated (if not, build fails with GPG error on installting nodejs).
Alternate design : replace nodejs installation to use nodesource script like below:
curl -fsSL https://deb.nodesource.com/setup_20.x | sudo bash -
https://deb.nodesource.com/
Official documentation also do similar thing. See https://docs.gitlab.com/17.0/ee/install/installation.html#5-node