blob: b9c359d13970902e7c63752434bc383fecaaa781 [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 \
João Fonseca4a64a902021-02-16 18:18:49 +000019 curl xz-utils gnupg2 apt-transport-https make python3 debhelper python3-pip apt-utils \
20 ssh iputils-ping libcurl4-openssl-dev libssl-dev
21RUN add-apt-repository -y ppa:rmescandon/yq && apt-get update && apt-get install yq -y
22
23RUN python3 -m pip install --upgrade pip setuptools
24
25RUN DEBIAN_FRONTEND=noninteractive apt-get install -y cargo rustc
26
27RUN python3 -m pip install --ignore-installed pyyaml
28
29RUN python3 -m pip install --upgrade setuptools-rust haikunator requests robotframework robotframework-seleniumlibrary \
Felipe Vicens7334f682020-06-24 15:59:59 +020030 robotframework-requests robotframework-jsonlibrary robotframework-sshlibrary charm-tools \
João Fonseca4a64a902021-02-16 18:18:49 +000031 python-openstackclient
32
33RUN python3 -m pip install git+https://osm.etsi.org/gerrit/osm/IM.git@v8.0 git+https://osm.etsi.org/gerrit/osm/osmclient.git@v8.0
Felipe Vicens7334f682020-06-24 15:59:59 +020034
35ARG REPOSITORY_BASE=http://osm-download.etsi.org/repository/osm/debian
garciadeblas8af7f0d2020-07-05 07:31:12 +000036ARG RELEASE=ReleaseEIGHT-daily
Felipe Vicens7334f682020-06-24 15:59:59 +020037ARG REPOSITORY_KEY=OSM%20ETSI%20Release%20Key.gpg
38ARG REPOSITORY=testing
39ARG TESTS_VERSION
40
41RUN curl ${REPOSITORY_BASE}/${RELEASE}/${REPOSITORY_KEY} | apt-key add -
42RUN add-apt-repository -y "deb ${REPOSITORY_BASE}/${RELEASE} ${REPOSITORY} tests" && apt-get update
43
44RUN apt-get install -y osm-tests${TESTS_VERSION} && \
45 rm -rf /var/lib/apt/lists/*
46
47RUN mv /usr/share/osm-tests/robot-systest /robot-systest
48RUN mv /usr/share/osm-tests/charm.sh /usr/sbin/charm
49
50WORKDIR /robot-systest
51
garciadeblas74ff1892021-01-28 09:52:33 +000052RUN git clone https://osm.etsi.org/gitlab/vnf-onboarding/osm-packages.git --recurse-submodules /robot-systest/osm-packages && git -C osm-packages checkout OSM-IM
Felipe Vicens7334f682020-06-24 15:59:59 +020053
54# Folder where Robot tests are stored
55ENV ROBOT_DEVOPS_FOLDER=/robot-systest
56
57# Folder to save alternative DUT environments (optional)
58ENV ENVIRONMENTS_FOLDER=environments
59
60# Folder where all required packages are stored
61ENV PACKAGES_FOLDER=/robot-systest/osm-packages
62
63# Folder where test results should be exported
64ENV ROBOT_REPORT_FOLDER=/robot-systest/results
65
66# Kubeconfig file
67ENV K8S_CREDENTIALS=/root/.kube/config
68
69ENV LC_ALL=C.UTF-8
70ENV LANG=C.UTF-8
71
garciadeblas8af7f0d2020-07-05 07:31:12 +000072ENTRYPOINT [ "/robot-systest/run_test.sh"]