diff --git a/pkg/cmd/roachtest/tests/knex.go b/pkg/cmd/roachtest/tests/knex.go index 4dfdeb9c23ef..27587b885314 100644 --- a/pkg/cmd/roachtest/tests/knex.go +++ b/pkg/cmd/roachtest/tests/knex.go @@ -62,13 +62,18 @@ func registerKnex(r registry.Registry) { t, c, node, - "add nodesource repository", - `sudo apt install ca-certificates && curl -fsSL https://deb.nodesource.com/setup_18.x | sudo -E bash -`, + "add nodesource key and deb repository", + ` +sudo apt-get update && \ +sudo apt-get install -y ca-certificates curl gnupg && \ +sudo mkdir -p /etc/apt/keyrings && \ +curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | sudo gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg && \ +echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_18.x nodistro main" | sudo tee /etc/apt/sources.list.d/nodesource.list`, ) require.NoError(t, err) err = repeatRunE( - ctx, t, c, node, "install nodejs and npm", `sudo apt-get -qq install nodejs`, + ctx, t, c, node, "install nodejs and npm", `sudo apt-get update && sudo apt-get -qq install nodejs`, ) require.NoError(t, err) diff --git a/pkg/cmd/roachtest/tests/nodejs_postgres.go b/pkg/cmd/roachtest/tests/nodejs_postgres.go index ce3ccd325086..311da4230960 100644 --- a/pkg/cmd/roachtest/tests/nodejs_postgres.go +++ b/pkg/cmd/roachtest/tests/nodejs_postgres.go @@ -72,13 +72,18 @@ func registerNodeJSPostgres(r registry.Registry) { t, c, node, - "add nodesource repository", - `sudo apt install ca-certificates && curl -sL https://deb.nodesource.com/setup_18.x | sudo -E bash -`, + "add nodesource key and deb repository", + ` +sudo apt-get update && \ +sudo apt-get install -y ca-certificates curl gnupg && \ +sudo mkdir -p /etc/apt/keyrings && \ +curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | sudo gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg && \ +echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_18.x nodistro main" | sudo tee /etc/apt/sources.list.d/nodesource.list`, ) require.NoError(t, err) err = repeatRunE( - ctx, t, c, node, "install nodejs and npm", `sudo apt-get -qq install nodejs`, + ctx, t, c, node, "install nodejs and npm", `sudo apt-get update && sudo apt-get -qq install nodejs`, ) require.NoError(t, err) diff --git a/pkg/cmd/roachtest/tests/sequelize.go b/pkg/cmd/roachtest/tests/sequelize.go index f8a23ad487c2..0c69d9504005 100644 --- a/pkg/cmd/roachtest/tests/sequelize.go +++ b/pkg/cmd/roachtest/tests/sequelize.go @@ -95,14 +95,19 @@ func registerSequelize(r registry.Registry) { t, c, node, - "add nodesource repository", - `sudo apt install ca-certificates && curl -sL https://deb.nodesource.com/setup_18.x | sudo -E bash -`, + "add nodesource key and deb repository", + ` +sudo apt-get update && \ +sudo apt-get install -y ca-certificates curl gnupg && \ +sudo mkdir -p /etc/apt/keyrings && \ +curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | sudo gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg && \ +echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_18.x nodistro main" | sudo tee /etc/apt/sources.list.d/nodesource.list`, ); err != nil { t.Fatal(err) } if err := repeatRunE( - ctx, t, c, node, "install nodejs and npm", `sudo apt-get -qq install nodejs`, + ctx, t, c, node, "install nodejs and npm", `sudo apt-get update && sudo apt-get -qq install nodejs`, ); err != nil { t.Fatal(err) } diff --git a/pkg/cmd/roachtest/tests/typeorm.go b/pkg/cmd/roachtest/tests/typeorm.go index 9827c1cdff55..af6c6052e5be 100644 --- a/pkg/cmd/roachtest/tests/typeorm.go +++ b/pkg/cmd/roachtest/tests/typeorm.go @@ -92,14 +92,19 @@ func registerTypeORM(r registry.Registry) { t, c, node, - "add nodesource repository", - `sudo apt install ca-certificates && curl -fsSL https://deb.nodesource.com/setup_18.x | sudo -E bash -`, + "add nodesource key and deb repository", + ` +sudo apt-get update && \ +sudo apt-get install -y ca-certificates curl gnupg && \ +sudo mkdir -p /etc/apt/keyrings && \ +curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | sudo gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg && \ +echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_18.x nodistro main" | sudo tee /etc/apt/sources.list.d/nodesource.list`, ); err != nil { t.Fatal(err) } if err := repeatRunE( - ctx, t, c, node, "install nodejs and npm", `sudo apt-get install -y nodejs`, + ctx, t, c, node, "install nodejs and npm", `sudo apt-get update && sudo apt-get -qq install nodejs`, ); err != nil { t.Fatal(err) }