[INTEGRATION] Add build arg for smoke-usecases-pythonsdk 80/124680/4
authorMichal Jagiello <michal.jagiello@t-mobile.pl>
Tue, 5 Oct 2021 10:47:41 +0000 (10:47 +0000)
committerMichal Jagiello <michal.jagiello@t-mobile.pl>
Wed, 20 Oct 2021 07:58:33 +0000 (07:58 +0000)
Add a flag to the Dockerfile to determine whether to
install the development version of the SDK

Issue-ID: INT-1983
Signed-off-by: Michal Jagiello <michal.jagiello@t-mobile.pl>
Change-Id: I6d4c1415c90c75dda1a3a37d3fd696efb2b49b93

smoke-usecases-pythonsdk/docker/Dockerfile

index 696862a..3a44520 100644 (file)
@@ -1,4 +1,6 @@
-FROM opnfv/xtesting:wallaby
+ARG PYTHONSDK_VERSION=pythonsdk-release
+
+FROM opnfv/xtesting:wallaby as pythonsdk-release
 
 MAINTAINER Morgan Richomme <morgan.richomme@orange.com>
 
@@ -17,5 +19,9 @@ RUN apk add --no-cache python3 git && \
     wget -O $ONAPSDK_PYTHON_PATH/clamp/schema_details.json https://gitlab.com/Orange-OpenSource/lfn/onap/python-onapsdk/-/raw/develop/src/onapsdk/clamp/schema_details.json && \
     apk del .build-deps
 
+FROM pythonsdk-release as pythonsdk-develop
+RUN pip3 install --no-cache-dir git+https://gitlab.com/Orange-OpenSource/lfn/onap/python-onapsdk@develop#onapsdk
+
+FROM ${PYTHONSDK_VERSION} as final
 COPY docker/testcases.yaml /usr/lib/python3.8/site-packages/xtesting/ci/testcases.yaml
 CMD ["run_tests", "-t", "all"]