From 4604951d905df4a8a868007fae50f428b3edcf11 Mon Sep 17 00:00:00 2001 From: Cristina Pauna Date: Tue, 2 Jul 2019 14:27:07 +0300 Subject: [PATCH] [docker] Standardize the location of the code Use the same location to clone the repository inside the docker images. /opt/akraino/validation/ Use /opt/akraino/results to store the results of the tests Signed-off-by: Cristina Pauna Change-Id: I6ec594d66d84539608d5c3cef8a0277b7b2b54d7 --- docker/README.rst | 2 +- docker/k8s/Dockerfile | 9 +++------ 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/docker/README.rst b/docker/README.rst index 34e7641..97d1e39 100644 --- a/docker/README.rst +++ b/docker/README.rst @@ -70,7 +70,7 @@ stored on the local server. .. code-block:: console docker run -ti -v /home/jenkins/k8s_access:/root/.kube/ \ - -v /home/jenkins/k8s_results:/opt/akraino/validation/results/ \ + -v /home/jenkins/k8s_results:/opt/akraino/results/ \ akraino/validation:k8s-latest By default, the container will run the k8s conformance test. If you want to diff --git a/docker/k8s/Dockerfile b/docker/k8s/Dockerfile index 48ebee9..5b60ed0 100644 --- a/docker/k8s/Dockerfile +++ b/docker/k8s/Dockerfile @@ -49,8 +49,8 @@ RUN if [ $(uname -m) == 'aarch64' ]; then HOST_ARCH=arm64; else HOST_ARCH=amd64; make kubectl ginkgo && \ make WHAT=test/e2e/e2e.test ARCH=$HOST_ARCH RUN go get -u -v github.com/heptio/sonobuoy -RUN git clone https://gerrit.akraino.org/r/validation /opt/akraino/validation/repo -RUN cat /opt/akraino/validation/repo/bluval/requirements.txt >> \ +RUN git clone https://gerrit.akraino.org/r/validation /opt/akraino/validation +RUN cat /opt/akraino/validation/bluval/requirements.txt >> \ /wheels/requirements/pip-requirements.txt WORKDIR /wheels @@ -62,12 +62,9 @@ FROM python:3.6-alpine3.9 COPY --from=build /src/k8s.io/kubernetes/_output/bin /usr/local/bin COPY --from=build /go/bin/sonobuoy /bin/sonobuoy COPY --from=build /wheels /wheels -COPY --from=build /opt/akraino/validation/repo /opt/akraino/validation/repo +COPY --from=build /opt/akraino/validation/ /opt/akraino/validation/ RUN pip3 install -r /wheels/requirements/pip-requirements.txt \ -f /wheels && \ rm -rf /wheels && \ rm -rf /root/.cache/pip/* - -# Set the default command for running the tests -CMD python3 /opt/akraino/validation/repo/bluval/bluval.py base -l k8s -- 2.16.6