Skip to content

Commit

Permalink
chore: implement rclone [skip tests] [skip app]
Browse files Browse the repository at this point in the history
  • Loading branch information
tristan-greffe committed Apr 1, 2024
1 parent c34eaec commit 0a38836
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 4 deletions.
18 changes: 16 additions & 2 deletions e2e-tests.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ ENV SLACK_WEBHOOK_APPS=$SLACK_WEBHOOK_APPS
# https://github.com/puppeteer/puppeteer/blob/main/docs/troubleshooting.md#running-puppeteer-in-docker
RUN export DEBIAN_FRONTEND=noninteractive \
&& apt-get update \
&& apt-get install -y wget gnupg curl \
&& apt-get install -y wget gnupg curl unzip \
&& wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add - \
&& sh -c 'echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google.list' \
&& apt-get update \
Expand All @@ -69,6 +69,17 @@ RUN export DEBIAN_FRONTEND=noninteractive \
libxext-dev \
--no-install-recommends \
&& rm -rf /var/lib/apt/lists/*

# Install Rclone
RUN curl -O https://downloads.rclone.org/rclone-current-linux-amd64.zip \
&& unzip rclone-current-linux-amd64.zip \
&& cd rclone-*-linux-amd64 \
&& cp rclone /usr/bin/ \
&& chown root:root /usr/bin/rclone \
&& chmod 755 /usr/bin/rclone \
&& mkdir -p /usr/local/share/man/man1 \
&& cp rclone.1 /usr/local/share/man/man1/ \
&& mandb

# Copy Puppeteer cache from builder
COPY --from=Builder --chown=node:node /root/.cache/puppeteer /home/node/.cache/puppeteer
Expand All @@ -79,7 +90,10 @@ COPY --from=Builder --chown=node:node /opt/kalisio /opt/kalisio
# From now on, run stuff as 'node'
USER node

# Run tests
# Grant execute permissions
WORKDIR /opt/kalisio/$APP/scripts
RUN chmod +x run_e2e_test.sh

# Run tests
WORKDIR /opt/kalisio/$APP
CMD ["bash", "-c", "/opt/kalisio/$APP/scripts/run_e2e_test.sh $APP $SLACK_WEBHOOK_APPS"]
10 changes: 8 additions & 2 deletions scripts/run_e2e_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ SLACK_WEBHOOK=$2

THIS_FILE=$(readlink -f "${BASH_SOURCE[0]}")
THIS_DIR=$(dirname "$THIS_FILE")
ROOT_DIR=$(dirname "$THIS_DIR")

. "$THIS_DIR/kash/kash.sh"

Expand All @@ -15,7 +16,12 @@ THIS_DIR=$(dirname "$THIS_FILE")

trap 'slack_e2e_report "$APP" "$?" "$SLACK_WEBHOOK"' EXIT

## Run tests
## Run tests & redirect output to a log file
##

cd .. && yarn test:client
yarn test:client > "$ROOT_DIR/test/run/e2e_test_log.txt" 2>&1

## Upload logs & screenshots to S3 bucket
##

#rclone copy "$ROOT_DIR/test/run" ovh:/dev/e2e_test

0 comments on commit 0a38836

Please sign in to comment.