mirror of
https://github.com/gocsaf/csaf.git
synced 2025-12-22 11:55:40 +01:00
Upgrade jsonschema library to 5.2.0 (#349)
* make jsonschema loading work with current versions of the jsonschema library
again and simplify the code while at it.
* Improve itest workflow for validation service, to make them more robust.
* Use a github action to setup nodejs and use a version that is
required by https://github.com/secvisogram/csaf-validator-service/.
* Add nodejs16 installation to prepareUbuntuInstanceForITests.sh.
(so it can be done once in manual settings)
* Add refreshing of apt cache before apt install because sometimes
the cached ubuntu image does not have the apt cache current.
---------
Co-authored-by: Bernhard Reiter <bernhard@intevation.de>
This commit is contained in:
parent
47d9eccc37
commit
aa574406cf
7 changed files with 78 additions and 57 deletions
|
|
@ -5,11 +5,28 @@ set -e
|
|||
# for the csaf_distribution integration tests
|
||||
# by installing the required packages.
|
||||
|
||||
|
||||
apt install -y make bash sed tar git nginx fcgiwrap gnutls-bin
|
||||
apt update
|
||||
apt install -y make bash curl gnupg sed tar git nginx fcgiwrap gnutls-bin
|
||||
|
||||
# Install Go from binary distribution
|
||||
latest_go="$(curl https://go.dev/VERSION\?m=text).linux-amd64.tar.gz"
|
||||
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
|
||||
# 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"
|
||||
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
|
||||
|
||||
apt-get update
|
||||
apt-get install -y nodejs
|
||||
|
|
|
|||
|
|
@ -21,10 +21,6 @@ echo '
|
|||
remote_validator= { "url" = "http://localhost:8082", "presets" = ["mandatory"], "cache" = "/var/lib/csaf/validations.db" }
|
||||
' | sudo tee --append /etc/csaf/config.toml
|
||||
|
||||
# Install nodejs
|
||||
curl -fsSL https://deb.nodesource.com/setup_14.x | sudo -E bash -
|
||||
sudo apt-get install -y nodejs
|
||||
|
||||
npm install pm2 -g
|
||||
|
||||
pushd ~
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue