Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 16 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,22 @@ RUN dpkg -i google-chrome*.deb
RUN wget https://chromedriver.storage.googleapis.com/2.42/chromedriver_linux64.zip && unzip chromedriver_linux64.zip
RUN cp chromedriver /usr/local/bin && chmod +x /usr/local/bin/chromedriver

# Create build user
RUN useradd -m -s /bin/bash tester && adduser tester sudo && echo "tester:tester" | chpasswd

WORKDIR /home/tester

COPY scripts/run_suite.sh /home/tester

# Create /home/tester/suites as a mount point for sharing files with the host system.
RUN mkdir suites

# Make sure everything in /home/tester is owned by the build user
RUN chown -R tester:tester .

USER tester
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Running chrome as not root is not working well.


# RUN apt-get install -y udev

CMD ["/scripts/run_suite.sh"]
CMD ["/home/tester/run_suite.sh"]

Empty file removed output/.keep
Empty file.
Empty file removed reports/.keep
Empty file.
5 changes: 1 addition & 4 deletions run_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,7 @@
docker run --rm \
-e USERNAME="Ipatios Asmanidis" \
--net=host \
-v "$PWD/output":/output \
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change breaks existing behaviour (existing output, scripts, reports directories are not longer used), you could just map them to /home/tester/output, /home/tester/scripts, /home/tester/reports.

For backwards compatiblity you may also want to add symlinks for the old directories:
/output -> /home/tester/output
/suites -> /home/tester/suites
/scripts -> /home/tester/scripts
/reports -> /home/tester/reports

-v "$PWD/suites":/suites \
-v "$PWD/scripts":/scripts \
-v "$PWD/reports":/reports \
-v "$PWD/suites":/home/tester/suites \
--security-opt seccomp:unconfined \
--shm-size "256M" \
ypasmk/robot-framework
2 changes: 1 addition & 1 deletion scripts/run_suite.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env bash
set -e

CMD="robot --console verbose --outputdir /reports /suites"
CMD="robot --console verbose --outputdir /home/tester/suites/reports /home/tester/suites"

echo ${CMD}

Expand Down