| 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 \ |
| 20 | ssh iputils-ping libcurl4-openssl-dev libssl-dev python3-openstackclient |
| 21 | RUN add-apt-repository -y ppa:rmescandon/yq && apt update && apt install yq -y |
| 22 | RUN python3 -m pip install haikunator requests robotframework robotframework-seleniumlibrary \ |
| 23 | robotframework-requests robotframework-jsonlibrary robotframework-sshlibrary charm-tools \ |
| 24 | git+https://osm.etsi.org/gerrit/osm/IM.git git+https://osm.etsi.org/gerrit/osm/osmclient.git |
| 25 | |
| 26 | ARG REPOSITORY_BASE=http://osm-download.etsi.org/repository/osm/debian |
| 27 | ARG RELEASE=ReleaseSEVEN-daily |
| 28 | ARG REPOSITORY_KEY=OSM%20ETSI%20Release%20Key.gpg |
| 29 | ARG REPOSITORY=testing |
| 30 | ARG TESTS_VERSION |
| 31 | |
| 32 | RUN curl ${REPOSITORY_BASE}/${RELEASE}/${REPOSITORY_KEY} | apt-key add - |
| 33 | RUN add-apt-repository -y "deb ${REPOSITORY_BASE}/${RELEASE} ${REPOSITORY} tests" && apt-get update |
| 34 | |
| 35 | RUN apt-get install -y osm-tests${TESTS_VERSION} && \ |
| 36 | rm -rf /var/lib/apt/lists/* |
| 37 | |
| 38 | RUN mv /usr/share/osm-tests/robot-systest /robot-systest |
| 39 | RUN mv /usr/share/osm-tests/charm.sh /usr/sbin/charm |
| 40 | |
| 41 | WORKDIR /robot-systest |
| 42 | |
| 43 | RUN git clone https://osm.etsi.org/gitlab/vnf-onboarding/osm-packages.git --recurse-submodules /robot-systest/osm-packages |
| 44 | |
| 45 | # Folder where Robot tests are stored |
| 46 | ENV ROBOT_DEVOPS_FOLDER=/robot-systest |
| 47 | |
| 48 | # Folder to save alternative DUT environments (optional) |
| 49 | ENV ENVIRONMENTS_FOLDER=environments |
| 50 | |
| 51 | # Folder where all required packages are stored |
| 52 | ENV PACKAGES_FOLDER=/robot-systest/osm-packages |
| 53 | |
| 54 | # Folder where test results should be exported |
| 55 | ENV ROBOT_REPORT_FOLDER=/robot-systest/results |
| 56 | |
| 57 | # Kubeconfig file |
| 58 | ENV K8S_CREDENTIALS=/root/.kube/config |
| 59 | |
| 60 | ENV LC_ALL=C.UTF-8 |
| 61 | ENV LANG=C.UTF-8 |
| 62 | |
| 63 | ENTRYPOINT [ "/robot-systest/run_test.sh"] |