Temp fix to clone third party dockers in testsuite docker 68/105168/5
authormrichomme <morgan.richomme@orange.com>
Mon, 6 Apr 2020 16:04:22 +0000 (18:04 +0200)
committermrichomme <morgan.richomme@orange.com>
Thu, 9 Apr 2020 16:52:31 +0000 (18:52 +0200)
Note that this patch shall be ephemeral as a migration
to python3 with new helm structure is in progress

Issue-ID: TEST-229

Signed-off-by: mrichomme <morgan.richomme@orange.com>
Change-Id: I5ecbc22b607379e061b9c3f4ded51635100a180b
Signed-off-by: mrichomme <morgan.richomme@orange.com>
docker/Dockerfile
requirements.txt [new file with mode: 0644]

index 1a73203..d0f32e7 100644 (file)
@@ -1,13 +1,23 @@
-FROM ubuntu
-## Be careful of Windows newlines
+FROM ubuntu:18.04
 
+## Be careful of Windows newlines
 MAINTAINER "ONAP"
-
 LABEL name="Docker image for the ONAP Robot Testing Framework"
 LABEL usage="docker run -e ROBOT_TEST=<testname> -ti onapete"
-
 ENV BUILDTIME=true
 
+ARG TESTSUITE_TAG=master
+ARG HEATBRIDGE_TAG=master
+ARG PYTHON_UTILS_TAG=master
+ARG DEMO_TAG=master
+
+ARG TESTSUITE_REPO=git.onap.org/testsuite
+ARG HEATBRIDGE_REPO=git.onap.org/testsuite/heatbridge.git
+ARG PYTHON_UTILS_REPO=git.onap.org/testsuite/python-testing-utils.git
+ARG DEMO_REPO=git.onap.org/demo
+
+COPY requirements.txt requirements.txt
+
 # Install Python, Pip, Robot framework, chromium, lighttpd web server
 RUN apt-get update \
     && apt-get install \
@@ -23,54 +33,38 @@ RUN apt-get update \
             lighttpd \
             make \
             net-tools \
-            python2.7 \
-            python-dev \
-            python-setuptools \
-            python-wheel \
-            python-pip \
+            python2.7 python-dev python-setuptools python-wheel python-pip \
             netbase \
-            unzip \
-            x11-utils \
-            x11-xserver-utils \
+            unzip zip \
+            x11-utils x11-xserver-utils \
             xvfb \
             xxd  \
-            vim  \
-            zip
-
-# install python 3 after so it isn't default python version
-RUN apt-get install \
-        --no-install-recommends \
-        --assume-yes \
-            python3.7 \
-            python3.7-dev \
-            python3-pip
-
-RUN pip install robotframework==3.1.2 \
-    && python --version
+            wget vim  \
+            python3.7 python3.7-dev python3-pip && \
+    mkdir -p /var/opt/ONAP && \
+    pip install -r requirements.txt && \
+    pip install --no-cache-dir \
+    git+https://$HEATBRIDGE_REPO@$HEATBRIDGE_TAG#egg=heatbridge\&subdirectory=heatbridge \
+    git+https://$PYTHON_UTILS_REPO@$PYTHON_UTILS_TAG#egg=robotframework-onap\&subdirectory=robotframework-onap && \
+    git clone --depth 1 https://$TESTSUITE_REPO -b $TESTSUITE_TAG /var/opt/ONAP && \
+    git clone --depth 1 https://$DEMO_REPO -b $DEMO_TAG /var/opt/ONAP/demo
 
 RUN python3.7 -m pip install setuptools wheel
 RUN python3.7 -m pip install virtualenv
 
 # Copy the robot code
-COPY html/ /var/opt/ONAP/html
-COPY robot/ /var/opt/ONAP/robot
-COPY *.sh /var/opt/ONAP/
-COPY docker/lighttpd.conf /etc/lighttpd/lighttpd.conf
-COPY docker/authorization /etc/lighttpd/authorization
-RUN chmod 777 /var/opt/ONAP/setup.sh \
+RUN mkdir -p /etc/lighttpd && \
+    rm /etc/lighttpd/lighttpd.conf && \
+    ln -s /var/opt/ONAP/docker/lighttpd.conf /etc/lighttpd/lighttpd.conf && \
+    ln -s /var/opt/ONAP/docker/authorization /etc/lighttpd/authorization && \
+    chmod 777 /var/opt/ONAP/setup.sh \
     && chmod 777 /var/opt/ONAP/runTags.sh \
     && chmod 777 /var/opt/ONAP/dnstraffic.sh \
     && chmod 777 /var/opt/ONAP/runSoak.sh \
     && chmod 777 /var/opt/ONAP/runEteTag.sh \
-    && chmod 600 /var/opt/ONAP/robot/assets/keys/* 
-
-RUN cd /var/opt/ONAP \
-    && ./setup.sh \
+    && chmod 600 /var/opt/ONAP/robot/assets/keys/* && \
+    cd /var/opt/ONAP && ./setup.sh \
     && apt-get autoremove --assume-yes \
     && rm -rf /var/lib/apt/lists/*  \
     && apt-get clean
-
 CMD ["lighttpd", "-D", "-f",  "/etc/lighttpd/lighttpd.conf"]
-
-
-
diff --git a/requirements.txt b/requirements.txt
new file mode 100644 (file)
index 0000000..238f461
--- /dev/null
@@ -0,0 +1,17 @@
+robotframework==3.1.2
+selenium
+robotframework-seleniumlibrary
+robotframework-archivelibrary
+robotframework-sshlibrary
+robotframework-httplibrary
+robotframework-ftplibrary
+requests>=2.20.0
+robotframework-selenium2library
+robotframework-databaselibrary
+robotframework-extendedselenium2library
+robotframework-requests
+deepdiff
+dnspython
+pyyaml>=4.2b1
+json5
+pytz