mirror of
https://github.com/ceph/ceph
synced 2025-02-22 10:37:15 +00:00
Merge pull request #44578 from rhcs-dashboard/fix-53843-master
qa/dashboard: ensure node 16 is installed Reviewed-by: Alfonso Martínez <almartin@redhat.com> Reviewed-by: David Galloway <dgallowa@redhat.com> Reviewed-by: Laura Flores <lflores@redhat.com> Reviewed-by: Nizamudeen A <nia@redhat.com> Reviewed-by: Pere Diaz Bou <pdiazbou@redhat.com> Reviewed-by: sebastian-philipp <NOT@FOUND> Reviewed-by: Yuri Weinstein <yweins@redhat.com>
This commit is contained in:
commit
86590ea131
@ -6,10 +6,21 @@ DASHBOARD_FRONTEND_DIR=${SCRIPT_DIR}/../../../src/pybind/mgr/dashboard/frontend
|
||||
[ -z "$SUDO" ] && SUDO=sudo
|
||||
|
||||
install_common () {
|
||||
NODEJS_VERSION="16"
|
||||
if grep -q debian /etc/*-release; then
|
||||
$SUDO apt-get update
|
||||
$SUDO apt-get install -y jq npm
|
||||
# https://github.com/nodesource/distributions#manual-installation
|
||||
$SUDO apt-get install curl gpg
|
||||
KEYRING=/usr/share/keyrings/nodesource.gpg
|
||||
curl -fsSL https://deb.nodesource.com/gpgkey/nodesource.gpg.key | gpg --dearmor | $SUDO tee "$KEYRING" >/dev/null
|
||||
DISTRO="$(source /etc/lsb-release; echo $DISTRIB_CODENAME)"
|
||||
VERSION="node_$NODEJS_VERSION.x"
|
||||
echo "deb [signed-by=$KEYRING] https://deb.nodesource.com/$VERSION $DISTRO main" | $SUDO tee /etc/apt/sources.list.d/nodesource.list
|
||||
echo "deb-src [signed-by=$KEYRING] https://deb.nodesource.com/$VERSION $DISTRO main" | $SUDO tee -a /etc/apt/sources.list.d/nodesource.list
|
||||
$SUDO apt-get update
|
||||
$SUDO apt-get install nodejs
|
||||
elif grep -q rhel /etc/*-release; then
|
||||
$SUDO yum module -y enable nodejs:$NODEJS_VERSION
|
||||
$SUDO yum install -y jq npm
|
||||
else
|
||||
echo "Unsupported distribution."
|
||||
|
Loading…
Reference in New Issue
Block a user