Skip to content

Commit

Permalink
Switched to nvm instead of outdated nodejs install script, updated to…
Browse files Browse the repository at this point in the history
… nodejs v18

Signed-off-by: Tibor Dancs <tdancs@redhat.com>
  • Loading branch information
ScrewTSW committed Sep 26, 2023
1 parent 2e6c485 commit e06dbb1
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 5 deletions.
13 changes: 10 additions & 3 deletions tests/e2e/build/dockerfiles/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
FROM selenium/standalone-chrome:114.0
FROM selenium/standalone-chrome:117.0

ENV DISPLAY=':20'

USER root

RUN apt-get update && apt-get install && \
apt-get install -y ftp x11vnc ffmpeg libvpx6 && \
curl -fsSL https://deb.nodesource.com/setup_16.x | sudo -E bash - && \
apt-get install -y nodejs && \
curl -fsSLo- https://raw.githubusercontent.com/nvm-sh/nvm/master/install.sh | bash && \
export NVM_DIR="$HOME/.nvm" && \
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" && \
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" && \
nvm install lts/hydrogen && nvm alias default lts/hydrogen && nvm use default && nvm list && \
npm install -g typescript && \
node -v

Expand All @@ -21,6 +24,10 @@ RUN sed -i "s/nodaemon=true/nodaemon=false/" /etc/supervisord.conf
COPY package.json package-lock.json /tmp/e2e/

RUN cd /tmp/e2e && \
export NVM_DIR="$HOME/.nvm" && \
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" && \
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" && \
nvm use default && \
npm i

COPY . /tmp/e2e
Expand Down
6 changes: 5 additions & 1 deletion tests/e2e/build/dockerfiles/entrypoint.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
#!/bin/bash
#!/usr/bin/env bash

EXIT_CODE=0
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion"
nvm use default

kill_ffmpeg(){
echo "Killing ffmpeg with PID=$ffmpeg_pid"
Expand Down
2 changes: 1 addition & 1 deletion tests/e2e/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
"@typescript-eslint/parser": "^6.1.0",
"axios": "^0.25.0",
"chai": "^4.3.4",
"chromedriver": "^114.0.2",
"chromedriver": "^117.0.0",
"clone-deep": "^4.0.1",
"eslint": "^8.45.0",
"eslint-config-prettier": "^8.10.0",
Expand Down

0 comments on commit e06dbb1

Please sign in to comment.