aboutsummaryrefslogtreecommitdiffstats
path: root/smoke-usecases-pythonsdk/docker/Dockerfile
blob: 8de2a1f4f67a868f4d825a146e55ad11910621fb (plain)
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
ARG PYTHONSDK_VERSION=pythonsdk-release

FROM python:3.11-alpine as pythonsdk-release

MAINTAINER Morgan Richomme <morgan.richomme@orange.com>

ARG ONAP_TESTS_TAG=master
ARG ONAPSDK_PYTHON_PATH=/src/onapsdk

ENV CRYPTOGRAPHY_DONT_BUILD_RUST=1

RUN apk add --no-cache git && \
    apk add --no-cache --virtual .build-deps gcc openssl-dev linux-headers musl-dev && \
    pip3 install --upgrade pip && \
    pip3 install --ignore-installed --no-cache-dir \
        git+https://gerrit.onap.org/r/testsuite/pythonsdk-tests@$ONAP_TESTS_TAG && \
    mkdir -p $ONAPSDK_PYTHON_PATH/clamp && \
    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 && \
    pip3 install markupsafe==2.0.1 && \
    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/local/lib/python3.11/site-packages/xtesting/ci/testcases.yaml
CMD ["run_tests", "-t", "all"]