| Felipe Vicens | 4cc047e | 2020-06-24 15:55:57 +0200 | [diff] [blame] | 1 | # 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 | |
| garciadeblas | 0a60417 | 2022-05-24 11:22:57 +0200 | [diff] [blame] | 16 | ######################################################################## |
| Felipe Vicens | 4cc047e | 2020-06-24 15:55:57 +0200 | [diff] [blame] | 17 | |
| garciadeblas | 0a60417 | 2022-05-24 11:22:57 +0200 | [diff] [blame] | 18 | FROM ubuntu:20.04 as FINAL |
| Felipe Vicens | 4cc047e | 2020-06-24 15:55:57 +0200 | [diff] [blame] | 19 | |
| garciadeblas | 0a60417 | 2022-05-24 11:22:57 +0200 | [diff] [blame] | 20 | RUN 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 Vicens | 4cc047e | 2020-06-24 15:55:57 +0200 | [diff] [blame] | 28 | |
| garciadeblas | 0a60417 | 2022-05-24 11:22:57 +0200 | [diff] [blame] | 29 | RUN 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 Vicens | 4cc047e | 2020-06-24 15:55:57 +0200 | [diff] [blame] | 37 | |
| garciadeblas | 0a60417 | 2022-05-24 11:22:57 +0200 | [diff] [blame] | 38 | ##### Different from devops/docker/tests/Dockerfile |
| 39 | RUN DEBIAN_FRONTEND=noninteractive apt-get --yes update && \ |
| 40 | DEBIAN_FRONTEND=noninteractive apt-get --yes install \ |
| 41 | software-properties-common apt-transport-https |
| sousaedu | f36b4bc | 2021-03-23 16:25:18 +0100 | [diff] [blame] | 42 | |
| garciadeblas | 0a60417 | 2022-05-24 11:22:57 +0200 | [diff] [blame] | 43 | ARG OSM_REPOSITORY="deb [arch=amd64] https://osm-download.etsi.org/repository/osm/debian/testing-daily testing IM osmclient" |
| 44 | RUN 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 Vicens | 4cc047e | 2020-06-24 15:55:57 +0200 | [diff] [blame] | 49 | |
| garciadeblas | 0a60417 | 2022-05-24 11:22:57 +0200 | [diff] [blame] | 50 | RUN pip3 install \ |
| 51 | -r /usr/lib/python3/dist-packages/osm_im/requirements.txt \ |
| 52 | -r /usr/lib/python3/dist-packages/osmclient/requirements.txt |
| Felipe Vicens | 4cc047e | 2020-06-24 15:55:57 +0200 | [diff] [blame] | 53 | |
| Felipe Vicens | 4cc047e | 2020-06-24 15:55:57 +0200 | [diff] [blame] | 54 | COPY robot-systest /robot-systest |
| 55 | COPY charm.sh /usr/sbin/charm |
| garciadeblas | 0a60417 | 2022-05-24 11:22:57 +0200 | [diff] [blame] | 56 | COPY requirements.txt /robot-systest |
| Felipe Vicens | 4cc047e | 2020-06-24 15:55:57 +0200 | [diff] [blame] | 57 | |
| garciadeblas | 0a60417 | 2022-05-24 11:22:57 +0200 | [diff] [blame] | 58 | RUN pip3 install \ |
| 59 | -r /robot-systest/requirements.txt |
| 60 | ################################################### |
| 61 | |
| 62 | ARG CACHE_DATE=not_a_date |
| 63 | RUN git clone \ |
| 64 | https://osm.etsi.org/gitlab/vnf-onboarding/osm-packages.git \ |
| 65 | --recurse-submodules \ |
| 66 | /robot-systest/osm-packages |
| 67 | |
| 68 | WORKDIR /robot-systest |
| Frank Bryden | e570b10 | 2020-09-07 08:45:54 +0000 | [diff] [blame] | 69 | |
| Felipe Vicens | 4cc047e | 2020-06-24 15:55:57 +0200 | [diff] [blame] | 70 | # Folder where Robot tests are stored |
| 71 | ENV ROBOT_DEVOPS_FOLDER=/robot-systest |
| 72 | |
| 73 | # Folder to save alternative DUT environments (optional) |
| 74 | ENV ENVIRONMENTS_FOLDER=environments |
| 75 | |
| 76 | # Folder where all required packages are stored |
| 77 | ENV PACKAGES_FOLDER=/robot-systest/osm-packages |
| 78 | |
| 79 | # Folder where test results should be exported |
| garciadeblas | 0a60417 | 2022-05-24 11:22:57 +0200 | [diff] [blame] | 80 | ENV ROBOT_REPORT_FOLDER=/robot-systest/results |
| Felipe Vicens | 4cc047e | 2020-06-24 15:55:57 +0200 | [diff] [blame] | 81 | |
| 82 | # Kubeconfig file |
| 83 | ENV K8S_CREDENTIALS=/root/.kube/config |
| 84 | |
| garciadeblas | e80184f | 2021-08-13 17:17:35 +0200 | [diff] [blame] | 85 | # OSM RSA file |
| 86 | ENV OSM_RSA_FILE=/root/osm_id_rsa |
| 87 | |
| Felipe Vicens | 4cc047e | 2020-06-24 15:55:57 +0200 | [diff] [blame] | 88 | ENV LC_ALL=C.UTF-8 |
| 89 | ENV LANG=C.UTF-8 |
| 90 | |
| 91 | ENTRYPOINT [ "/robot-systest/run_test.sh"] |