Merge "Define o1 docker jobs verify, merge, release"
authorEric Ball <eball@linuxfoundation.org>
Thu, 13 Feb 2020 12:49:52 +0000 (12:49 +0000)
committerGerrit Code Review <gerrit@o-ran-sc.org>
Thu, 13 Feb 2020 12:49:52 +0000 (12:49 +0000)
docker/bldr-debian-python/Dockerfile [deleted file]
docker/bldr-debian-python/container-tag.yaml [deleted file]
docker/bldr-ubuntu18-c-go/Dockerfile
docker/bldr-ubuntu18-c-go/container-tag.yaml
global-jjb
jjb/ci-management/ci-docker.yaml

diff --git a/docker/bldr-debian-python/Dockerfile b/docker/bldr-debian-python/Dockerfile
deleted file mode 100644 (file)
index 1d9a23b..0000000
+++ /dev/null
@@ -1,48 +0,0 @@
-# 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 RIC components
-# uses Python 3.7 (Debian stretch) base which has
-# C and C++ tools from buildpack-deps:stretch then adds:
-# Ninja 1.9 from binary distro to /usr/local/bin
-# Nanomsg Next Gen libs by cloning and building
-
-FROM python:3.7
-
-RUN apt-get update && apt-get -q -y install \
-  autoconf \
-  autoconf-archive \
-  automake \
-  cmake \
-  libtool \
-  pkg-config
-
-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
-
-# NNG repo is not frequently tagged so it's pinned to a commit hash.
-# This commit provides fix to the proxy-reconnect
-# bug that we identified:  https://github.com/nanomsg/nng/issues/970
-RUN git clone https://github.com/nanomsg/nng.git \
-    && cd nng \
-    && git checkout e618abf8f3db2a94269a79c8901a51148d48fcc2 \
-    && mkdir build \
-    && cd build \
-    && cmake -DBUILD_SHARED_LIBS=1 -G Ninja .. \
-    && ninja \
-    && ninja install
diff --git a/docker/bldr-debian-python/container-tag.yaml b/docker/bldr-debian-python/container-tag.yaml
deleted file mode 100755 (executable)
index 2862542..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-# Not feasible to show all the software versions
-# here so just use a counter plus the base image
----
-tag: 4-py3.7-nng
index 47e77fe..3d21db2 100644 (file)
@@ -1,6 +1,6 @@
 # O-RAN-SC
 #
-# Copyright (C) 2019 AT&T Intellectual Property and Nokia
+# Copyright (C) 2019-2020 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.
@@ -44,25 +44,55 @@ RUN apt-get update && apt-get install -y \
 
 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
+# Install go versions in /opt
+RUN mkdir -p /opt/go
 
-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
-ENV PATH=$PATH:/usr/local/go/bin:/usr/lib/go-1.12/bin
-RUN go get -u github.com/ory/go-acc \
-    && mv ~/go/bin/go-acc /usr/local/go/bin
+ARG g12="1.12.16"
+RUN wget -nv https://dl.google.com/go/go${g12}.linux-amd64.tar.gz \
+    && tar -xf go${g12}.linux-amd64.tar.gz \
+    && mv go /opt/go/1.12 \
+    && rm -f go*.gz
 
-RUN wget -nv https://binaries.sonarsource.com/Distribution/sonar-scanner-cli/sonar-scanner-cli-3.2.0.1227-linux.zip \
-    && unzip sonar-scanner-cli-3.2.0.1227-linux.zip \
-    && mv sonar-scanner-3.2.0.1227-linux /usr/local/
+ARG g13="1.13.7"
+RUN wget -nv https://dl.google.com/go/go${g13}.linux-amd64.tar.gz \
+    && tar -xf go${g13}.linux-amd64.tar.gz \
+    && mv go /opt/go/1.13 \
+    && rm -f go*.gz
 
+ENV GOPATH=/root/go
+# Default path has go version 1.12.x
+# Use /opt/go/1.13/bin for version 1.13.x
+ENV PATH=$PATH:/opt/go/1.12/bin:$GOPATH/bin
+
+# This installs go-acc to GOPATH
+RUN go version \
+    && go get -v github.com/ory/go-acc \
+    && go-acc --help
+
+# install a recent version of cmake, ubuntu repo version is old
+ARG cv="3.14.5"
+RUN wget -nv https://github.com/Kitware/CMake/releases/download/v${cv}/cmake-${cv}-Linux-x86_64.sh \
+    && chmod +x cmake-${cv}-Linux-x86_64.sh \
+    && ./cmake-${cv}-Linux-x86_64.sh --prefix=/usr/local --skip-license \
+    && rm -f cmake*.sh
+
+# install a recent version of ninja-build, ubuntu repo version is old
 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
+    && mv ninja /usr/local/bin \
+    && rm -f ninja*.zip
+
+# sonar-scanner is not available in ubuntu repo
+ARG sv="4.2.0.1873"
+RUN wget -nv https://binaries.sonarsource.com/Distribution/sonar-scanner-cli/sonar-scanner-cli-${sv}-linux.zip \
+    && unzip sonar-scanner-cli-${sv}-linux.zip \
+    && mv sonar-scanner-${sv}-linux /usr/local/sonar-scanner \
+    && rm -f sonar*.zip
+
+# golangci-lint is not available in ubuntu repo
+RUN wget -O- -nv https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $GOPATH/bin v1.23.6 \
+    && rm -f install.sh
 
 # NNG repo is not frequently tagged so it's pinned to a commit hash.
 # This commit provides fix to the proxy-reconnect
@@ -74,13 +104,17 @@ RUN git clone https://github.com/nanomsg/nng.git \
     && cd build \
     && cmake -DBUILD_SHARED_LIBS=1 -G Ninja .. \
     && ninja \
-    && ninja install
+    && ninja install \
+    && cd ../.. \
+    && rm -rf nng
 
-RUN wget -nv https://dl.bintray.com/boostorg/release/1.69.0/source/boost_1_69_0.zip \
-    && unzip -q boost_1_69_0.zip \
-    && cd boost_1_69_0 \
+# install a recent version of boost, ubuntu repo version is old
+ARG bv="1_69_0"
+RUN wget -nv https://dl.bintray.com/boostorg/release/1.69.0/source/boost_${bv}.zip \
+    && unzip -q boost_${bv}.zip \
+    && cd boost_${bv} \
     && ./bootstrap.sh --prefix=/usr/ \
     && ./b2 \
     && ./b2 install \
     && cd ../ \
-    && rm -rf boost_1_69_0.zip boost_1_69_0
+    && rm -rf boost*.zip boost_${bv}
index a6a7a9e..4706dbf 100644 (file)
@@ -1,4 +1,4 @@
 # Not feasible to show all the software versions
 # here so just use a counter plus the base image
 ---
-tag: 3-u18.04-nng
+tag: 4-u18.04-nng
index 1fb55e8..2bd69d4 160000 (submodule)
@@ -1 +1 @@
-Subproject commit 1fb55e807d49e36b27d94d0c411c6907d2216068
+Subproject commit 2bd69d4b9fb016a8377ef4da0730323271745d06
index d2ce6e9..1c2274d 100644 (file)
@@ -1,6 +1,8 @@
 ---
+# Job configurations for base docker build images
+
+# This macro factors out common configuration
 - ci_docker_common: &ci_docker_common
-    # Defines common ci-docker configuration
     name: ci-docker-common
     # git repo
     project: ci-management
     cron: 'H H * * 6'
     # use host network to clone from our gerrit
     docker-build-args: '--network=host'
-    # default to YAML
+    # get tag from YAML
     container-tag-method: yaml-file
-    jobs:
-      - '{project-name}-gerrit-docker-jobs'
-    stream:
-      - master:
-          branch: master
-
-- project:
-    <<: *ci_docker_common
-    name: bldr-alpine3
+    # name key is overridden by project template
+    # Jenkins job prefix
     project-name: '{project}-{name}'
+    # Docker image name
     docker-name: '{name}'
+    # Directory with Dockerfile
     docker-root: 'docker/{name}'
+    # Limit build trigger to appropriate files
     gerrit_trigger_file_paths:
       - compare-type: REG_EXP
         pattern: 'docker/{name}/.*'
+    # Includes verify and merge jobs
     jobs:
       - '{project-name}-gerrit-docker-jobs'
+    # Only build master branch
+    stream:
+      - master:
+          branch: master
+
+# Each project name is a subdirectory in ci-management/docker
+# with a Dockerfile and a container-tag.yaml file
 
 - project:
+    name: bldr-alpine3
     <<: *ci_docker_common
-    name: bldr-ubuntu16-c-go
-    project-name: '{project}-{name}'
-    docker-name: '{name}'
-    docker-root: 'docker/{name}'
-    gerrit_trigger_file_paths:
-      - compare-type: REG_EXP
-        pattern: 'docker/{name}/.*'
 
 - project:
+    name: bldr-alpine3-go
     <<: *ci_docker_common
-    name: bldr-ubuntu18-c-go
-    project-name: '{project}-{name}'
-    docker-name: '{name}'
-    docker-root: 'docker/{name}'
-    gerrit_trigger_file_paths:
-      - compare-type: REG_EXP
-        pattern: 'docker/{name}/.*'
 
 - project:
+    name: bldr-ubuntu16-c-go
+    <<: *ci_docker_common
+
+- project:
+    name: bldr-ubuntu18-c-go
     <<: *ci_docker_common
-    name: bldr-alpine3-go
-    project-name: '{project}-{name}'
-    docker-name: '{name}'
-    docker-root: 'docker/{name}'
-    gerrit_trigger_file_paths:
-      - compare-type: REG_EXP
-        pattern: 'docker/{name}/.*'