-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile.exec
35 lines (26 loc) · 1.16 KB
/
Dockerfile.exec
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
# Dockerfile for cucumber test execution
#
# VERSION 0.1
# AUTHOR Ruifeng Ma ([email protected])
# This file creates a container that inherits from the cucumber
# image built through Dockerfile.setup to execute the cucumber scripts
# found within, in headless mode with a virtual display provided by Xvfb that can be viewed
# through a VNC session.
FROM docker_cucumber:latest
MAINTAINER Ruifeng Ma "[email protected]"
# Empty the cucumber project folder in the container
RUN rm -rf /home/cobalt/cucumber/*
# Pass application build name as a docker build argument
ARG APP_BUILD
ARG TEST_PHASE
# Check if the build argument has been set
RUN if [ -z "$APP_BUILD" ]; then echo "APP_BUILD not set - ERROR"; exit 1; else : ; fi
RUN if [ -z "$TEST_PHASE" ]; then echo "TEST_PHASE not set - ERROR"; exit 1; else : ; fi
# Transfer args as env vars
ENV APP_BUILD ${APP_BUILD}
ENV TEST_PHASE ${TEST_PHASE}
# Copy all files into the container
COPY . /home/cobalt/cucumber
# Start Xvfb, x11vnc, ssh services and run cucumber
# CMD ["/bin/bash", "/home/cobalt/cucumber/startup.sh", "$APP_BUILD", "$TEST_PHASE"]
CMD /bin/bash /home/cobalt/cucumber/startup.sh $APP_BUILD $TEST_PHASE