From dbc8a388ef1ebd9c1549254490f74b2649268501 Mon Sep 17 00:00:00 2001 From: Craig O'Donnell Date: Mon, 27 Nov 2023 18:08:00 -0500 Subject: [PATCH] update e2e nodejs install (#4173) --- e2e/hack/Dockerfile | 2 +- e2e/hack/deps.sh | 10 ++++++---- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/e2e/hack/Dockerfile b/e2e/hack/Dockerfile index c3c85817ec..cc87648c90 100644 --- a/e2e/hack/Dockerfile +++ b/e2e/hack/Dockerfile @@ -4,7 +4,7 @@ ENV DEBIAN_FRONTEND=noninteractive RUN apt-get update \ && apt-get install -y --no-install-recommends \ - ca-certificates curl git sudo \ + ca-certificates curl gnupg git sudo \ && rm -rf /var/lib/apt/lists/* ENV INSTALL_DIR=/usr/local/bin diff --git a/e2e/hack/deps.sh b/e2e/hack/deps.sh index b916a378a6..42ad26e076 100755 --- a/e2e/hack/deps.sh +++ b/e2e/hack/deps.sh @@ -69,10 +69,12 @@ main() { && tar xzf velero.tar.gz \ && install -m 0755 velero-*/velero $INSTALL_DIR/velero - curl -sL https://deb.nodesource.com/setup_18.x | runAsRoot bash -e \ - && runAsRoot apt-get install -y --no-install-recommends nodejs \ - && runAsRoot rm -rf /var/lib/apt/lists/* \ - && npm install --prefix $INSTALL_DIR @testim/testim-cli + runAsRoot mkdir -p /etc/apt/keyrings + curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | runAsRoot gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg + NODE_MAJOR=18 + echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_$NODE_MAJOR.x nodistro main" | runAsRoot tee /etc/apt/sources.list.d/nodesource.list + runAsRoot apt-get update && runAsRoot apt-get install nodejs -y + npm install --prefix $INSTALL_DIR @testim/testim-cli rm -rf $tmpdir }