1 # Copyright (c) 2019 AT&T Intellectual Property.
2 # Copyright (c) 2019 Nokia.
4 # Licensed under the Apache License, Version 2.0 (the "License");
5 # you may not use this file except in compliance with the License.
6 # You may obtain a copy of the License at
8 # http://www.apache.org/licenses/LICENSE-2.0
10 # Unless required by applicable law or agreed to in writing, software
11 # distributed under the License is distributed on an "AS IS" BASIS,
12 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 # See the License for the specific language governing permissions and
14 # limitations under the License.
19 LABEL name="Docker image for the RIC Robot Testing Framework"
21 ENV ROBOT_HOME="/robot"
22 ENV ROBOT_OPTIONS="-T -d /robot/log --console verbose -C off -P /robot/lib/python"
23 ENV KUBECONFIG="/robot/etc/kubernetes-admin-conf"
24 ENV PYTHONPATH="/robot/lib/python"
25 ENV RICPLT_NAMESPACE=ricplt
26 ENV RICPLT_RELEASE_NAME=ric-full
27 ENV RICPLT_COMPONENTS="a1mediator appmgr dbaas e2mgr e2term rtmgr"
29 RUN mkdir -p /robot/lib/python
32 # we only need a few things from this so we won't install
34 # we could do this in a builder image but that seems execssive.
35 RUN apk update && apk add git
37 RUN git clone -b 3.0.1-ONAP https://gerrit.onap.org/r/testsuite/python-testing-utils.git
38 RUN cp /tmp/python-testing-utils/eteutils/StringTemplater.py /robot/lib/python
39 RUN cp /tmp/python-testing-utils/eteutils/UUID.py /robot/lib/python
40 RUN rm -rf /tmp/python-testing-utils
41 RUN apk del --purge git
43 COPY ric-python-utils/ricutils/*.py /robot/lib/python/
46 # for the nanobot container, we only need a subset of the various support
47 # files/libraries, so we pick and choose what to copy..
48 RUN mkdir /robot/resources
49 COPY robot/resources/json_templater.robot /robot/resources
50 COPY robot/resources/appmgr /robot/resources/appmgr
51 COPY robot/resources/dashboard /robot/resources/dashboard
52 COPY robot/resources/e2mgr /robot/resources/e2mgr
53 COPY robot/resources/e2sim /robot/resources/e2sim
54 COPY robot/resources/e2term /robot/resources/e2term
55 COPY robot/resources/ric /robot/resources/ric
56 COPY robot/resources/rnib /robot/resources/rnib
57 COPY robot/resources/rtmgr /robot/resources/rtmgr
58 COPY robot/resources/xapps /robot/resources/xapps
59 # this will actually be overlaid by the helm chart, but
60 # it's good to have the placeholder.
61 COPY robot/resources/global_properties.robot /robot/resources
63 RUN mkdir -p /robot/assets/templates
64 COPY robot/assets/templates/e2mgr_setup_nodeb.template /robot/assets/templates
67 RUN pip install kubernetes
69 RUN pip install robotframework
70 RUN pip install robotframework-requests
72 RUN python -m compileall /robot/lib/python
76 CMD ["sleep", "9125d"]