Merge branch 'update-node-repo-location' into 'master'

Update node repo pool to pull from latest location

See merge request https://gitlab.com/gitlab-org/gitlab-build-images/-/merge_requests/722

Merged-by: Balasankar 'Balu' C <balasankar@gitlab.com>
Approved-by: Balasankar 'Balu' C <balasankar@gitlab.com>
Co-authored-by: DJ Mountney <dj@gitlab.com>
This commit is contained in:
Balasankar 'Balu' C 2023-09-04 07:20:49 +00:00
commit 6ee36f684f
No known key found for this signature in database

View file

@ -8,12 +8,7 @@ YARN_INSTALL_VERSION=${2}
# Map MAJOR.MINOR.patch -> MAJOR.x
NODE_MAJOR=$(echo "$NODE_INSTALL_VERSION" | sed -r -e "s/([0-9]+)\.[0-9]+.*/\1\.x/g")
# add official debian repos for node
curl -sS -L "https://deb.nodesource.com/setup_${NODE_MAJOR}" | bash -
apt-get update
NODE_FILE_NAME="nodejs_$NODE_INSTALL_VERSION-deb-1nodesource1_${TARGETARCH:-amd64}.deb"
NODE_FILE_NAME="nodejs_$NODE_INSTALL_VERSION-1nodesource1_${TARGETARCH:-amd64}.deb"
curl -s -O "https://deb.nodesource.com/node_$NODE_MAJOR/pool/main/n/nodejs/$NODE_FILE_NAME"
dpkg -i "$NODE_FILE_NAME"
rm -f "$NODE_FILE_NAME"