| 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 | |
| 16 | # Author: Felipe Vicens (felipe.vicens@atos.net) ATOS |
| 17 | |
| 18 | FROM ubuntu:18.04 |
| 19 | |
| 20 | # Installing robot dependencies |
| 21 | RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get -y install git software-properties-common \ |
| sousaedu | f36b4bc | 2021-03-23 16:25:18 +0100 | [diff] [blame] | 22 | make python3 debhelper python3-pip apt-utils ssh iputils-ping libcurl4-openssl-dev libssl-dev cargo rustc |
| Felipe Vicens | 4cc047e | 2020-06-24 15:55:57 +0200 | [diff] [blame] | 23 | |
| aktas | f47542b | 2021-05-26 10:32:32 +0300 | [diff] [blame] | 24 | # Installing Juju |
| 25 | ARG JUJU_VERSION_M=2.8 |
| 26 | ARG JUJU_VERSION_R=11 |
| 27 | ARG JUJU_VERSION=$JUJU_VERSION_M.$JUJU_VERSION_R |
| 28 | |
| 29 | RUN curl --output /tmp/juju-$JUJU_VERSION-linux-amd64.tar.xz -LO \ |
| 30 | https://launchpad.net/juju/$JUJU_VERSION_M/$JUJU_VERSION/+download/juju-$JUJU_VERSION-linux-amd64.tar.xz && \ |
| 31 | tar -xf /tmp/juju-$JUJU_VERSION-linux-amd64.tar.xz -C /tmp && \ |
| 32 | install /tmp/juju /usr/local/bin/juju && \ |
| 33 | rm /tmp/juju /tmp/juju-$JUJU_VERSION-linux-amd64.tar.xz |
| 34 | |
| Felipe Vicens | 4cc047e | 2020-06-24 15:55:57 +0200 | [diff] [blame] | 35 | RUN add-apt-repository -y ppa:rmescandon/yq && apt update && apt install yq -y |
| 36 | |
| sousaedu | f36b4bc | 2021-03-23 16:25:18 +0100 | [diff] [blame] | 37 | RUN python3 -m pip install -U pip |
| 38 | |
| 39 | RUN python3 -m pip install charm-tools haikunator python-openstackclient requests robotframework \ |
| 40 | robotframework-seleniumlibrary robotframework-requests robotframework-jsonlibrary robotframework-sshlibrary \ |
| 41 | setuptools setuptools-rust git+https://osm.etsi.org/gerrit/osm/IM.git \ |
| 42 | git+https://osm.etsi.org/gerrit/osm/osmclient.git |
| Felipe Vicens | 4cc047e | 2020-06-24 15:55:57 +0200 | [diff] [blame] | 43 | |
| 44 | # Preparing working environment |
| 45 | WORKDIR /robot-systest |
| garciaale | d2532d3 | 2020-11-19 21:05:13 +0000 | [diff] [blame] | 46 | RUN git clone --branch sol006 https://osm.etsi.org/gitlab/vnf-onboarding/osm-packages.git --recurse-submodules /robot-systest/osm-packages |
| Felipe Vicens | 4cc047e | 2020-06-24 15:55:57 +0200 | [diff] [blame] | 47 | |
| 48 | # Copy robot folder and charm.sh |
| 49 | COPY robot-systest /robot-systest |
| 50 | COPY charm.sh /usr/sbin/charm |
| 51 | |
| Frank Bryden | e570b10 | 2020-09-07 08:45:54 +0000 | [diff] [blame] | 52 | # Copy conformance tests data |
| 53 | COPY conformance-tests /robot-systest/conformance-tests |
| 54 | |
| Felipe Vicens | 4cc047e | 2020-06-24 15:55:57 +0200 | [diff] [blame] | 55 | # Folder where Robot tests are stored |
| 56 | ENV ROBOT_DEVOPS_FOLDER=/robot-systest |
| 57 | |
| 58 | # Folder to save alternative DUT environments (optional) |
| 59 | ENV ENVIRONMENTS_FOLDER=environments |
| 60 | |
| 61 | # Folder where all required packages are stored |
| 62 | ENV PACKAGES_FOLDER=/robot-systest/osm-packages |
| 63 | |
| 64 | # Folder where test results should be exported |
| Felipe Vicens | 6366c68 | 2020-06-25 20:12:16 +0200 | [diff] [blame] | 65 | ENV ROBOT_REPORT_FOLDER=/robot-systest/reports |
| Felipe Vicens | 4cc047e | 2020-06-24 15:55:57 +0200 | [diff] [blame] | 66 | |
| 67 | # Kubeconfig file |
| 68 | ENV K8S_CREDENTIALS=/root/.kube/config |
| 69 | |
| aktas | f47542b | 2021-05-26 10:32:32 +0300 | [diff] [blame] | 70 | # Juju data folder |
| 71 | ENV JUJU_DATA=/root/.local/share/juju |
| 72 | |
| garciadeblas | e80184f | 2021-08-13 17:17:35 +0200 | [diff] [blame^] | 73 | # OSM RSA file |
| 74 | ENV OSM_RSA_FILE=/root/osm_id_rsa |
| 75 | |
| Felipe Vicens | 4cc047e | 2020-06-24 15:55:57 +0200 | [diff] [blame] | 76 | ENV LC_ALL=C.UTF-8 |
| 77 | ENV LANG=C.UTF-8 |
| 78 | |
| 79 | ENTRYPOINT [ "/robot-systest/run_test.sh"] |