1
0
Fork 0
mirror of https://github.com/gocsaf/csaf.git synced 2025-12-22 18:15:42 +01:00

update prepareUbuntuInstanceForITests.sh

* to handle a newer nodejs
 * mention that Ubuntu 24.04 TLS was tested as well.
This commit is contained in:
Bernhard Reiter 2024-04-24 17:24:10 +02:00
parent 85b67f64ef
commit b553940769
No known key found for this signature in database
GPG key ID: 2B7BA3BF9BC3A554
2 changed files with 8 additions and 9 deletions

View file

@ -1,7 +1,7 @@
#!/usr/bin/env bash
set -e
# This script prepares a naked Ubuntu 20.04 LTS amd64
# This script prepares a naked Ubuntu LTS amd64
# for the csaf_distribution integration tests
# by installing the required packages.
@ -14,19 +14,17 @@ curl -O https://dl.google.com/go/$latest_go
rm -rf /usr/local/go # be sure that we do not have an old installation
tar -C /usr/local -xzf $latest_go
# Install newer Node.js version from nodesource
# Install a current Node.js version from nodesource
# as needed for https://github.com/secvisogram/csaf-validator-service
# Instructions from
# https://github.com/nodesource/distributions/blob/master/README.md#debmanual
KEYRING=/usr/share/keyrings/nodesource.gpg
curl -fsSL https://deb.nodesource.com/gpgkey/nodesource.gpg.key | gpg --dearmor > "$KEYRING"
curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor > "$KEYRING"
gpg --no-default-keyring --keyring "$KEYRING" --list-keys
chmod a+r /usr/share/keyrings/nodesource.gpg
VERSION=node_16.x
DISTRO="$(lsb_release -s -c)"
echo "deb [signed-by=$KEYRING] https://deb.nodesource.com/$VERSION $DISTRO main" | tee /etc/apt/sources.list.d/nodesource.list
echo "deb-src [signed-by=$KEYRING] https://deb.nodesource.com/$VERSION $DISTRO main" | tee -a /etc/apt/sources.list.d/nodesource.list
NODE_MAJOR=20
echo "deb [signed-by=/usr/share/keyrings/nodesource.gpg] https://deb.nodesource.com/node_$NODE_MAJOR.x nodistro main" | tee /etc/apt/sources.list.d/nodesource.list
apt-get update
apt-get install -y nodejs