Static code analysis for ric-plt-utils
[ci-management.git] / jjb / ric-plt-utils / Dockerfile.build
diff --git a/jjb/ric-plt-utils/Dockerfile.build b/jjb/ric-plt-utils/Dockerfile.build
new file mode 100644 (file)
index 0000000..387bef3
--- /dev/null
@@ -0,0 +1,83 @@
+# vi: ts=4 sw=4 noet:\r
+\r
+#==================================================================================\r
+#    Copyright (c) 2020 AT&T Intellectual Property.\r
+#    Copyright (c) 2020 Nokia\r
+#\r
+#   Licensed under the Apache License, Version 2.0 (the "License");\r
+#   you may not use this file except in compliance with the License.\r
+#   You may obtain a copy of the License at\r
+#\r
+#       http://www.apache.org/licenses/LICENSE-2.0\r
+#\r
+#   Unless required by applicable law or agreed to in writing, software\r
+#   distributed under the License is distributed on an "AS IS" BASIS,\r
+#   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+#   See the License for the specific language governing permissions and\r
+#   limitations under the License.\r
+#==================================================================================\r
+\r
+# Build the munchkin container assuming that the current working directory is the\r
+# top of the munchkin portion of the shared repo.\r
+\r
+# ---- these are global and must be set before the first from directive\r
+#\r
+# package versions and locations for easier maintenance\r
+ARG RMR_VER=4.1.4\r
+ARG LOG_VER=0.0.4\r
+ARG FRAME_VER=2.2.0\r
+\r
+ARG PROD_URL_BASE=https://packagecloud.io/o-ran-sc/release/packages/debian/stretch/\r
+ARG BETA_URL_BASE=https://packagecloud.io/o-ran-sc/staging/packages/debian/stretch/\r
+\r
+ARG LOG_BASE=${PROD_URL_BASE}\r
+ARG RMR_BASE=${BETA_URL_BASE}\r
+ARG FRAME_BASE=${BETA_URL_BASE}\r
+\r
+\r
+# -----------------------------------------------------------------------------------------------------\r
+FROM ubuntu:18.04\r
+\r
+RUN    apt-get update \\r
+        && apt-get install -y git cmake make g++ wget curl libcurl4-gnutls-dev libcurlpp-dev libcurlpp0\r
+\r
+\r
+# sadly they need to be 'touched' to pull them into each stage\r
+ARG RMR_VER\r
+ARG LOG_VER\r
+ARG FRAME_VER\r
+ARG FRAME_BASE\r
+ARG RMR_BASE\r
+ARG LOG_BASE\r
+\r
+WORKDIR /playpen/down\r
+\r
+RUN    wget --content-disposition ${LOG_BASE}/mdclog_${LOG_VER}-1_amd64.deb/download.deb \\r
+        && wget --content-disposition ${LOG_BASE}/mdclog-dev_${LOG_VER}-1_amd64.deb/download.deb  \\r
+        && wget --content-disposition ${RMR_BASE}/rmr-dev_${RMR_VER}_amd64.deb/download.deb  \\r
+        && wget --content-disposition ${RMR_BASE}/rmr_${RMR_VER}_amd64.deb/download.deb  \\r
+        && wget --content-disposition ${FRAME_BASE}/ricxfcpp_${FRAME_VER}_amd64.deb/download.deb  \\r
+        && wget --content-disposition ${FRAME_BASE}/ricxfcpp-dev_${FRAME_VER}_amd64.deb/download.deb  \\r
+        && dpkg -i *deb\r
+\r
+\r
+\r
+WORKDIR /playpen/build\r
+COPY ./ ./\r
+\r
+# build the utility; installs into /usr/local/bin\r
+#\r
+RUN    rm -fr .build \\r
+        && mkdir .build \\r
+        && cd .build \\r
+        && cmake .. \\r
+        && make install \\r
+        && make test ARGS="-V"\r
+\r
+\r
+\r
+#RUN mkdir /var/mgxapp\r
+#COPY xapp_config.json /var/mgxapp/config.json\r
+\r
+#WORKDIR /playpen\r
+#CMD [ "munchkin", "-c", "/var/mgxapp/config.json" ]
\ No newline at end of file