| Felipe Vicens | 7334f68 | 2020-06-24 15:59:59 +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 | |
| 16 | FROM ubuntu:18.04 |
| 17 | |
| 18 | RUN 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 \ |
| João Fonseca | b3daa3a | 2021-02-15 15:57:51 +0000 | [diff] [blame] | 20 | ssh iputils-ping libcurl4-openssl-dev libssl-dev python3-yaml \ |
| 21 | build-essential libssl-dev libffi-dev python3-dev |
| Felipe Vicens | 7334f68 | 2020-06-24 15:59:59 +0200 | [diff] [blame] | 22 | RUN add-apt-repository -y ppa:rmescandon/yq && apt update && apt install yq -y |
| João Fonseca | b3daa3a | 2021-02-15 15:57:51 +0000 | [diff] [blame] | 23 | |
| 24 | RUN python3 -m pip install --upgrade pip |
| 25 | |
| 26 | RUN DEBIAN_FRONTEND=noninteractive apt-get install -y cargo rustc |
| 27 | |
| 28 | RUN python3 --version && python3 -m pip --version |
| 29 | RUN rustc --version && cargo --version |
| 30 | |
| 31 | RUN python3 -m pip install --upgrade setuptools setuptools-rust |
| 32 | |
| 33 | RUN python3 -m pip install --ignore-installed pyyaml |
| 34 | |
| 35 | RUN python3 -m pip install --upgrade haikunator requests robotframework robotframework-seleniumlibrary \ |
| Felipe Vicens | 7334f68 | 2020-06-24 15:59:59 +0200 | [diff] [blame] | 36 | robotframework-requests robotframework-jsonlibrary robotframework-sshlibrary charm-tools \ |
| João Fonseca | b3daa3a | 2021-02-15 15:57:51 +0000 | [diff] [blame] | 37 | verboselogs pyangbind python-openstackclient |
| Felipe Vicens | 7334f68 | 2020-06-24 15:59:59 +0200 | [diff] [blame] | 38 | |
| 39 | ARG REPOSITORY_BASE=http://osm-download.etsi.org/repository/osm/debian |
| garciadeblas | fa81f28 | 2020-12-15 00:32:13 +0000 | [diff] [blame] | 40 | ARG RELEASE=ReleaseNINE-daily |
| Felipe Vicens | 7334f68 | 2020-06-24 15:59:59 +0200 | [diff] [blame] | 41 | ARG REPOSITORY_KEY=OSM%20ETSI%20Release%20Key.gpg |
| 42 | ARG REPOSITORY=testing |
| 43 | ARG TESTS_VERSION |
| beierlm | 0fc2ee1 | 2020-12-04 11:32:25 -0500 | [diff] [blame] | 44 | ARG IM_VERSION |
| 45 | ARG OSMCLIENT_VERSION |
| Felipe Vicens | 7334f68 | 2020-06-24 15:59:59 +0200 | [diff] [blame] | 46 | |
| 47 | RUN curl ${REPOSITORY_BASE}/${RELEASE}/${REPOSITORY_KEY} | apt-key add - |
| beierlm | 52dd296 | 2020-12-02 06:43:07 -0500 | [diff] [blame] | 48 | RUN add-apt-repository -y "deb ${REPOSITORY_BASE}/${RELEASE} ${REPOSITORY} tests osmclient IM" && apt-get update |
| Felipe Vicens | 7334f68 | 2020-06-24 15:59:59 +0200 | [diff] [blame] | 49 | |
| beierlm | 52dd296 | 2020-12-02 06:43:07 -0500 | [diff] [blame] | 50 | RUN apt-get install -y python3-osm-im${IM_VERSION} python3-osmclient${OSMCLIENT_VERSION} |
| Felipe Vicens | 7334f68 | 2020-06-24 15:59:59 +0200 | [diff] [blame] | 51 | RUN apt-get install -y osm-tests${TESTS_VERSION} && \ |
| 52 | rm -rf /var/lib/apt/lists/* |
| 53 | |
| 54 | RUN mv /usr/share/osm-tests/robot-systest /robot-systest |
| 55 | RUN mv /usr/share/osm-tests/charm.sh /usr/sbin/charm |
| 56 | |
| 57 | WORKDIR /robot-systest |
| 58 | |
| 59 | RUN git clone https://osm.etsi.org/gitlab/vnf-onboarding/osm-packages.git --recurse-submodules /robot-systest/osm-packages |
| 60 | |
| 61 | # Folder where Robot tests are stored |
| 62 | ENV ROBOT_DEVOPS_FOLDER=/robot-systest |
| 63 | |
| 64 | # Folder to save alternative DUT environments (optional) |
| 65 | ENV ENVIRONMENTS_FOLDER=environments |
| 66 | |
| 67 | # Folder where all required packages are stored |
| 68 | ENV PACKAGES_FOLDER=/robot-systest/osm-packages |
| 69 | |
| 70 | # Folder where test results should be exported |
| 71 | ENV ROBOT_REPORT_FOLDER=/robot-systest/results |
| 72 | |
| 73 | # Kubeconfig file |
| 74 | ENV K8S_CREDENTIALS=/root/.kube/config |
| 75 | |
| 76 | ENV LC_ALL=C.UTF-8 |
| 77 | ENV LANG=C.UTF-8 |
| 78 | |
| beierlm | a4a37f7 | 2020-06-26 12:55:01 -0400 | [diff] [blame] | 79 | ENTRYPOINT [ "/robot-systest/run_test.sh"] |