blob: b8220a32bb5792fbb329d28eff2a391899ae1e2e [file] [log] [blame]
Felipe Vicens4cc047e2020-06-24 15:55:57 +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
garciadeblas0a604172022-05-24 11:22:57 +020016########################################################################
Felipe Vicens4cc047e2020-06-24 15:55:57 +020017
garciadeblas0a604172022-05-24 11:22:57 +020018FROM ubuntu:20.04 as FINAL
Felipe Vicens4cc047e2020-06-24 15:55:57 +020019
garciadeblas0a604172022-05-24 11:22:57 +020020RUN DEBIAN_FRONTEND=noninteractive apt-get --yes update && \
21 DEBIAN_FRONTEND=noninteractive apt-get --yes install \
22 gcc=4:9.3.* \
23 python3=3.8.* \
24 python3-dev=3.8.* \
25 python3-pip=20.0.2* \
26 python3-setuptools=45.2.* \
27 curl=7.68.*
Felipe Vicens4cc047e2020-06-24 15:55:57 +020028
garciadeblas0a604172022-05-24 11:22:57 +020029RUN DEBIAN_FRONTEND=noninteractive apt-get --yes update && \
30 DEBIAN_FRONTEND=noninteractive apt-get --yes install \
31 gettext-base=0.19.* \
32 git=1:2.25.* \
33 iputils-ping=3:* \
34 jq=1.6* \
35 libcurl4-openssl-dev=7.68.* \
36 libssl-dev=1.1.*
Felipe Vicens4cc047e2020-06-24 15:55:57 +020037
garciadeblas0a604172022-05-24 11:22:57 +020038##### Different from devops/docker/tests/Dockerfile
39RUN DEBIAN_FRONTEND=noninteractive apt-get --yes update && \
40 DEBIAN_FRONTEND=noninteractive apt-get --yes install \
41 software-properties-common apt-transport-https
sousaeduf36b4bc2021-03-23 16:25:18 +010042
garciadeblas0a604172022-05-24 11:22:57 +020043ARG OSM_REPOSITORY="deb [arch=amd64] https://osm-download.etsi.org/repository/osm/debian/testing-daily testing IM osmclient"
44RUN curl -q -o OSM-ETSI-Release-key.gpg "https://osm-download.etsi.org/repository/osm/debian/testing-daily/OSM%20ETSI%20Release%20Key.gpg" && \
45 APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key add OSM-ETSI-Release-key.gpg && \
46 DEBIAN_FRONTEND=noninteractive add-apt-repository -y "$OSM_REPOSITORY" && \
47 DEBIAN_FRONTEND=noninteractive apt-get -y update && \
48 apt-get install python3-osm-im python3-osmclient
Felipe Vicens4cc047e2020-06-24 15:55:57 +020049
garciadeblas0a604172022-05-24 11:22:57 +020050RUN pip3 install \
51 -r /usr/lib/python3/dist-packages/osm_im/requirements.txt \
52 -r /usr/lib/python3/dist-packages/osmclient/requirements.txt
Felipe Vicens4cc047e2020-06-24 15:55:57 +020053
Felipe Vicens4cc047e2020-06-24 15:55:57 +020054COPY robot-systest /robot-systest
55COPY charm.sh /usr/sbin/charm
garciadeblas0a604172022-05-24 11:22:57 +020056COPY requirements.txt /robot-systest
Felipe Vicens4cc047e2020-06-24 15:55:57 +020057
garciadeblas0a604172022-05-24 11:22:57 +020058RUN pip3 install \
59 -r /robot-systest/requirements.txt
60###################################################
61
62ARG CACHE_DATE=not_a_date
63RUN git clone \
64 https://osm.etsi.org/gitlab/vnf-onboarding/osm-packages.git \
65 --recurse-submodules \
66 /robot-systest/osm-packages
67
68WORKDIR /robot-systest
Frank Brydene570b102020-09-07 08:45:54 +000069
Felipe Vicens4cc047e2020-06-24 15:55:57 +020070# Folder where Robot tests are stored
71ENV ROBOT_DEVOPS_FOLDER=/robot-systest
72
73# Folder to save alternative DUT environments (optional)
74ENV ENVIRONMENTS_FOLDER=environments
75
76# Folder where all required packages are stored
77ENV PACKAGES_FOLDER=/robot-systest/osm-packages
78
79# Folder where test results should be exported
garciadeblas0a604172022-05-24 11:22:57 +020080ENV ROBOT_REPORT_FOLDER=/robot-systest/results
Felipe Vicens4cc047e2020-06-24 15:55:57 +020081
82# Kubeconfig file
83ENV K8S_CREDENTIALS=/root/.kube/config
84
garciadeblase80184f2021-08-13 17:17:35 +020085# OSM RSA file
86ENV OSM_RSA_FILE=/root/osm_id_rsa
87
Felipe Vicens4cc047e2020-06-24 15:55:57 +020088ENV LC_ALL=C.UTF-8
89ENV LANG=C.UTF-8
90
91ENTRYPOINT [ "/robot-systest/run_test.sh"]