Define ci image with many common build tools 33/333/3
authorLott, Christopher (cl778h) <cl778h@att.com>
Wed, 12 Jun 2019 19:27:44 +0000 (15:27 -0400)
committerLott, Christopher (cl778h) <cl778h@att.com>
Fri, 14 Jun 2019 13:48:34 +0000 (09:48 -0400)
Create a Docker image for CI that has gcc, g++, go, cmake
and the latest version of nng, inspired by needs of E2.

Signed-off-by: Lott, Christopher (cl778h) <cl778h@att.com>
Change-Id: Ia6cc904b0e8cc4664c330da00cc0c73e2ac5e189

docker/README.md
docker/bldr-ubuntu-c-go-nng/Dockerfile [new file with mode: 0755]
docker/bldr-ubuntu-c-go-nng/container-tag.yaml [new file with mode: 0644]
jjb/ci-management/ci-docker.yaml

index 3d7ce0e..c6f13ce 100644 (file)
@@ -2,6 +2,5 @@
 
 This area contains Dockerfiles to assemble images that are used to
 compile source and create binary artifacts such as Docker images for
-O-RAN-SC software features.  This approach replaces the common
-practice at LF of installing and maintaining specialty software on
-Jenkins build minions.
+O-RAN-SC software features.  This approach replaces the practice at
+LF of installing and maintaining software on Jenkins build minions.
diff --git a/docker/bldr-ubuntu-c-go-nng/Dockerfile b/docker/bldr-ubuntu-c-go-nng/Dockerfile
new file mode 100755 (executable)
index 0000000..11029aa
--- /dev/null
@@ -0,0 +1,56 @@
+# O-RAN-SC
+#
+# Copyright (C) 2019 AT&T Intellectual Property and Nokia
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# Builder image with CI tools for most RIC components
+# Based on Ubuntu 16.04
+# Adds standard packages gcc and g++ 5.4, sctp boost etc.
+# Adds Golang 1.12 from binary distro to /usr/local/go
+# Adds Cmake 3.14.5 from binary distro to /usr/local/bin
+# Adds Ninja 1.9 from binary distro to /usr/local/bin
+# Adds Nanomsg Next Gen libs by cloning and building
+
+FROM ubuntu:16.04
+
+RUN apt-get update && apt-get install -y \
+    build-essential software-properties-common \
+    git zip wget make gcc g++  \
+    libsctp-dev lksctp-tools \
+    zlibc zlib1g zlib1g-dev \
+    python-dev autotools-dev libicu-dev libbz2-dev libboost-all-dev \
+    autoconf autoconf-archive libtool automake pkg-config
+
+WORKDIR /tmp
+
+RUN wget -nv https://github.com/Kitware/CMake/releases/download/v3.14.5/cmake-3.14.5-Linux-x86_64.sh \
+    && chmod +x cmake-3.14.5-Linux-x86_64.sh \
+    && ./cmake-3.14.5-Linux-x86_64.sh --prefix=/usr/local --skip-license
+
+RUN wget -nv https://dl.google.com/go/go1.12.linux-amd64.tar.gz \
+    && tar -xf go1.12.linux-amd64.tar.gz \
+    && mv go /usr/local
+
+RUN wget -nv https://github.com/ninja-build/ninja/releases/download/v1.9.0/ninja-linux.zip \
+    && unzip ninja-linux.zip \
+    && chmod +x ninja \
+    && mv ninja /usr/local/bin
+
+RUN git clone https://github.com/nanomsg/nng.git \
+    && cd nng \
+    && mkdir build \
+    && cd build \
+    && cmake -DBUILD_SHARED_LIBS=1 -G Ninja .. \
+    && ninja \
+    && ninja install
diff --git a/docker/bldr-ubuntu-c-go-nng/container-tag.yaml b/docker/bldr-ubuntu-c-go-nng/container-tag.yaml
new file mode 100644 (file)
index 0000000..1008f4d
--- /dev/null
@@ -0,0 +1,4 @@
+# Not feasible to show all the software versions
+# here so just use a counter plus the base image
+---
+tag: 1-u16.04
index 67ab66c..fe32a41 100644 (file)
         pattern: 'docker/{name}/.*'
     jobs:
       - '{project-name}-gerrit-docker-jobs'
+
+- project:
+    <<: *ci_docker_common
+    name: bldr-ubuntu-c-go-nng
+    project-name: '{project}-{name}'
+    docker-name: '{name}'
+    docker-root: 'docker/{name}'
+    gerrit_trigger_file_paths:
+      - compare-type: REG_EXP
+        pattern: 'docker/{name}/.*'
+    jobs:
+      - '{project-name}-gerrit-docker-jobs'