Skip to content

Commit

Permalink
deps: move nodejs installation to e2e script
Browse files Browse the repository at this point in the history
to fix the issue happening in these runs https://jenkins.ceph.com/job/ceph-dashboard-cephadm-e2e-nightly-quincy/201/console

```
+ sudo apt-get update
Ign:1 https://chacra.ceph.com/r/vagrant/latest/HEAD/ubuntu/jammy/flavors/default jammy InRelease
Hit:2 https://chacra.ceph.com/r/vagrant/latest/HEAD/ubuntu/jammy/flavors/default jammy Release
Ign:3 https://chacra.ceph.com/r/vagrant/latest/HEAD/ubuntu/jammy/flavors/default jammy Release.gpg
Hit:4 https://dl.google.com/linux/chrome/deb stable InRelease
Ign:5 https://4.chacra.ceph.com/r/cortx-motr/master/39f89fa1c6945040433a913f2687c4b4e6cbeb3f/ubuntu/jammy/flavors/default jammy InRelease
Hit:6 https://4.chacra.ceph.com/r/cortx-motr/master/39f89fa1c6945040433a913f2687c4b4e6cbeb3f/ubuntu/jammy/flavors/default jammy Release
Hit:7 http://archive.ubuntu.com/ubuntu jammy InRelease
Get:8 http://security.ubuntu.com/ubuntu jammy-security InRelease [110 kB]
Ign:9 https://4.chacra.ceph.com/r/cortx-motr/master/39f89fa1c6945040433a913f2687c4b4e6cbeb3f/ubuntu/jammy/flavors/default jammy Release.gpg
Get:10 http://archive.ubuntu.com/ubuntu jammy-updates InRelease [114 kB]
Get:11 http://archive.ubuntu.com/ubuntu jammy-backports InRelease [99.8 kB]
Get:12 http://archive.ubuntu.com/ubuntu jammy-updates/main amd64 Packages [502 kB]
Ign:13 https://deb.nodesource.com/node_12.x jammy InRelease
Get:14 http://archive.ubuntu.com/ubuntu jammy-updates/main i386 Packages [269 kB]
Get:15 http://archive.ubuntu.com/ubuntu jammy-updates/main Translation-en [119 kB]
Get:16 http://archive.ubuntu.com/ubuntu jammy-updates/universe amd64 Packages [210 kB]
Get:17 http://archive.ubuntu.com/ubuntu jammy-updates/universe i386 Packages [113 kB]
Get:18 http://archive.ubuntu.com/ubuntu jammy-updates/universe Translation-en [69.8 kB]
Err:19 https://deb.nodesource.com/node_12.x jammy Release
  404  Not Found [IP: 23.34.63.88 443]
Reading package lists...
E: The repository 'https://deb.nodesource.com/node_12.x jammy Release' does not have a Release file.
```

Signed-off-by: Nizamudeen A <[email protected]>
  • Loading branch information
nizamial09 committed Aug 22, 2022
1 parent c390355 commit 86cb653
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 19 deletions.
19 changes: 0 additions & 19 deletions scripts/dashboard/install-cephadm-e2e-deps.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,25 +20,6 @@ sudo apt update -y
sudo apt install -y apt-transport-https ca-certificates curl gnupg lsb-release \
openssh-server software-properties-common

NODEJS_MAJOR_VERSION=14
DISTRO="$(lsb_release -cs)"
if [[ ! $(command -v node) || $(node --version | grep -oE "v([0-9])+" | cut -c 2-) < ${NODEJS_MAJOR_VERSION} ]]; then
sudo add-apt-repository -y -r ppa:chris-lea/node.js
sudo rm -f /etc/apt/sources.list.d/chris-lea-node_js-*.list
sudo rm -f /etc/apt/sources.list.d/chris-lea-node_js-*.list.save

NODEJS_KEYRING=/usr/share/keyrings/nodesource.gpg
curl -fsSL https://deb.nodesource.com/gpgkey/nodesource.gpg.key | gpg --dearmor | sudo tee "${NODEJS_KEYRING}" >/dev/null
gpg --no-default-keyring --keyring "${NODEJS_KEYRING}" --list-keys

NODEJS_VERSION="node_${NODEJS_MAJOR_VERSION}.x"
echo "deb [signed-by=${NODEJS_KEYRING}] https://deb.nodesource.com/${NODEJS_VERSION} ${DISTRO} main" | sudo tee /etc/apt/sources.list.d/nodesource.list
echo "deb-src [signed-by=${NODEJS_KEYRING}] https://deb.nodesource.com/${NODEJS_VERSION} ${DISTRO} main" | sudo tee -a /etc/apt/sources.list.d/nodesource.list

sudo apt update -y
sudo apt install -y nodejs
sudo rm -f /etc/apt/sources.list.d/nodesource.list
fi
sudo apt install -y libvirt-daemon-system libvirt-daemon-driver-qemu qemu-kvm libvirt-clients runc

sudo usermod -aG libvirt $(id -un)
Expand Down
17 changes: 17 additions & 0 deletions scripts/dashboard/install-e2e-test-deps.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,23 @@ if [[ ! $(arch) =~ (i386|x86_64|amd64) ]]; then
fi

if grep -q debian /etc/*-release; then
NODEJS_MAJOR_VERSION=14
DISTRO="$(lsb_release -cs)"
if [[ ! $(command -v node) || $(node --version | grep -oE "v([0-9])+" | cut -c 2-) < ${NODEJS_MAJOR_VERSION} ]]; then
sudo apt-get purge nodejs -y

NODEJS_KEYRING=/usr/share/keyrings/nodesource.gpg
curl -fsSL https://deb.nodesource.com/gpgkey/nodesource.gpg.key | gpg --dearmor | sudo tee "${NODEJS_KEYRING}" >/dev/null
gpg --no-default-keyring --keyring "${NODEJS_KEYRING}" --list-keys

NODEJS_VERSION="node_${NODEJS_MAJOR_VERSION}.x"
echo "deb [signed-by=${NODEJS_KEYRING}] https://deb.nodesource.com/${NODEJS_VERSION} ${DISTRO} main" | sudo tee /etc/apt/sources.list.d/nodesource.list
echo "deb-src [signed-by=${NODEJS_KEYRING}] https://deb.nodesource.com/${NODEJS_VERSION} ${DISTRO} main" | sudo tee -a /etc/apt/sources.list.d/nodesource.list

sudo apt update -y
sudo apt install -y nodejs
sudo rm -f /etc/apt/sources.list.d/nodesource.list
fi
sudo bash -c 'echo "deb [arch=amd64] https://dl.google.com/linux/chrome/deb/ stable main" > /etc/apt/sources.list.d/google-chrome.list'
curl -fsSL https://dl.google.com/linux/linux_signing_key.pub | sudo apt-key add -
sudo apt-get update
Expand Down

0 comments on commit 86cb653

Please sign in to comment.