blob: a3b4e2678f25bbf9998195d29ebff4d5bd65050e [file] [log] [blame]
Felipe Vicens7334f682020-06-24 15:59:59 +02001# Copyright 2020 ETSI
2#
3# Licensed under the Apache License, Version 2.0 (the "License");
4# you may not use this file except in compliance with the License.
5# You may obtain a copy of the License at
6#
7# http://www.apache.org/licenses/LICENSE-2.0
8#
9# Unless required by applicable law or agreed to in writing, software
10# distributed under the License is distributed on an "AS IS" BASIS,
11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
12# implied.
13# See the License for the specific language governing permissions and
14# limitations under the License.
15
16FROM ubuntu:18.04
17
18RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get -y install git software-properties-common \
19 curl xz-utils gnupg2 apt-transport-https make python3 debhelper python3-setuptools python3-pip apt-utils \
20 ssh iputils-ping libcurl4-openssl-dev libssl-dev python3-openstackclient
21RUN add-apt-repository -y ppa:rmescandon/yq && apt update && apt install yq -y
22RUN python3 -m pip install haikunator requests robotframework robotframework-seleniumlibrary \
23 robotframework-requests robotframework-jsonlibrary robotframework-sshlibrary charm-tools \
beierlm52dd2962020-12-02 06:43:07 -050024 verboselogs pyangbind
Felipe Vicens7334f682020-06-24 15:59:59 +020025
26ARG REPOSITORY_BASE=http://osm-download.etsi.org/repository/osm/debian
beierlma4a37f72020-06-26 12:55:01 -040027ARG RELEASE=ReleaseEIGHT-daily
Felipe Vicens7334f682020-06-24 15:59:59 +020028ARG REPOSITORY_KEY=OSM%20ETSI%20Release%20Key.gpg
29ARG REPOSITORY=testing
30ARG TESTS_VERSION
beierlm0fc2ee12020-12-04 11:32:25 -050031ARG IM_VERSION
32ARG OSMCLIENT_VERSION
Felipe Vicens7334f682020-06-24 15:59:59 +020033
34RUN curl ${REPOSITORY_BASE}/${RELEASE}/${REPOSITORY_KEY} | apt-key add -
beierlm52dd2962020-12-02 06:43:07 -050035RUN add-apt-repository -y "deb ${REPOSITORY_BASE}/${RELEASE} ${REPOSITORY} tests osmclient IM" && apt-get update
Felipe Vicens7334f682020-06-24 15:59:59 +020036
beierlm52dd2962020-12-02 06:43:07 -050037RUN apt-get install -y python3-osm-im${IM_VERSION} python3-osmclient${OSMCLIENT_VERSION}
Felipe Vicens7334f682020-06-24 15:59:59 +020038RUN apt-get install -y osm-tests${TESTS_VERSION} && \
39 rm -rf /var/lib/apt/lists/*
40
41RUN mv /usr/share/osm-tests/robot-systest /robot-systest
42RUN mv /usr/share/osm-tests/charm.sh /usr/sbin/charm
43
44WORKDIR /robot-systest
45
46RUN git clone https://osm.etsi.org/gitlab/vnf-onboarding/osm-packages.git --recurse-submodules /robot-systest/osm-packages
garciadeblas15ff6fd2020-12-02 12:30:54 +000047RUN git -C osm-packages checkout sol006
Felipe Vicens7334f682020-06-24 15:59:59 +020048
49# Folder where Robot tests are stored
50ENV ROBOT_DEVOPS_FOLDER=/robot-systest
51
52# Folder to save alternative DUT environments (optional)
53ENV ENVIRONMENTS_FOLDER=environments
54
55# Folder where all required packages are stored
56ENV PACKAGES_FOLDER=/robot-systest/osm-packages
57
58# Folder where test results should be exported
59ENV ROBOT_REPORT_FOLDER=/robot-systest/results
60
61# Kubeconfig file
62ENV K8S_CREDENTIALS=/root/.kube/config
63
64ENV LC_ALL=C.UTF-8
65ENV LANG=C.UTF-8
66
beierlma4a37f72020-06-26 12:55:01 -040067ENTRYPOINT [ "/robot-systest/run_test.sh"]