From c1f302c2e7b184325943c7ddc78cbb4274793cb2 Mon Sep 17 00:00:00 2001 From: Pau Espin Pedrol Date: Tue, 16 Mar 2021 17:43:49 +0100 Subject: Add debian-buster-jenkins docker setup It will be used by osmo-gsm-tester docker image right now, and at some point in the future jenkins nodes will also migrate to it. Change-Id: Ibfdec6007357a90212dea7d39300f04ce8ffdf65 --- debian-buster-jenkins/Dockerfile | 186 +++++++++++++++++++++++++++++++++++++++ debian-buster-jenkins/Makefile | 1 + 2 files changed, 187 insertions(+) create mode 100644 debian-buster-jenkins/Dockerfile create mode 100644 debian-buster-jenkins/Makefile diff --git a/debian-buster-jenkins/Dockerfile b/debian-buster-jenkins/Dockerfile new file mode 100644 index 0000000..baa076a --- /dev/null +++ b/debian-buster-jenkins/Dockerfile @@ -0,0 +1,186 @@ +# Image used to run contrib/jenkins.sh scripts of most Osmocom projects. +# See master-builds.yml, gerrit-verifications.yml in osmo-ci.git. + +ARG DEBIAN_VERSION=buster +ARG REGISTRY=docker.io +FROM ${REGISTRY}/debian:${DEBIAN_VERSION} +# Arguments used after FROM must be specified again +ARG OSMOCOM_REPO_MIRROR="http://download.opensuse.org" + +# Make "$DEBIAN_VERSION" available after FROM +# https://docs.docker.com/engine/reference/builder/#understand-how-arg-and-from-interact +ARG DEBIAN_VERSION + +# Install apt dependencies (keep in alphabetic order) +RUN \ + dpkg --add-architecture i386 && \ + DEBIAN_FRONTEND=noninteractive apt-get update && \ + DEBIAN_FRONTEND=noninteractive apt-get upgrade -y && \ + DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ + asciidoc \ + asciidoc-dblatex \ + autoconf \ + autoconf-archive \ + automake \ + bc \ + bison \ + bzip2 \ + cmake \ + coccinelle \ + cppcheck \ + dahdi-source \ + dblatex \ + dbus \ + debhelper \ + devscripts \ + dh-autoreconf \ + dh-systemd \ + docbook5-xml \ + doxygen \ + flex \ + g++ \ + gawk \ + gcc \ + gcc-arm-none-eabi \ + git \ + git-buildpackage \ + graphviz \ + htop \ + inkscape \ + lcov \ + libaio-dev \ + libasound2-dev \ + libboost-all-dev \ + libc-ares-dev \ + libcsv-dev \ + libdbd-sqlite3 \ + libdbi-dev \ + libffi-dev \ + libfftw3-dev \ + libgmp-dev \ + libgnutls28-dev \ + libgps-dev \ + libgsm1-dev \ + libjansson-dev \ + liblua5.3-dev \ + libmnl-dev \ + libncurses5-dev \ + libnewlib-arm-none-eabi \ + libnl-3-dev \ + libnl-route-3-dev \ + liboping-dev \ + libortp-dev \ + libpcap-dev \ + libpcsclite-dev \ + libreadline-dev \ + libsctp-dev \ + libsigsegv-dev \ + libsnmp-dev \ + libsofia-sip-ua-glib-dev \ + libsqlite3-dev \ + libssl-dev \ + libtalloc-dev \ + libtool \ + libusb-1.0-0-dev \ + libusb-dev \ + libxml2-utils \ + libzmq3-dev \ + locales \ + lua-socket \ + make \ + mscgen \ + ofono \ + openssh-client \ + osc \ + patchelf \ + pkg-config \ + python3 \ + python3-gi \ + python3-mako \ + python3-nwdiag \ + python3-pip \ + python3-pyflakes \ + python3-setuptools \ + python3-usb \ + python3-yaml \ + python2.7 \ + python-pip \ + python-setuptools \ + python-yaml \ + rsync \ + sdcc \ + sqlite3 \ + source-highlight \ + stow \ + sudo \ + systemd \ + tcpdump \ + texinfo \ + unzip \ + wget \ + xsltproc + +# Install pip dependencies (keep in alphabetic order) +RUN pip3 install \ + git+https://github.com/podshumok/python-smpplib.git \ + git+https://github.com/eriwen/lcov-to-cobertura-xml.git \ + pydbus \ + pysispm + +# match the outside user +RUN useradd --uid=1000 build +#RUN echo "build ALL=(ALL) NOPASSWD:ALL" > /etc/sudoers.d/build + +RUN mkdir /build +RUN chown build:build /build + +# Install osmo-python-tests for python2 (when building old tags again new releases) +ARG OSMO_PYTHON2_TESTS_COMMIT=fb4b813d4df62b7b2445bdced961eb1847267eed +ADD http://git.osmocom.org/python/osmo-python-tests/patch/?id=$OSMO_PYTHON2_TESTS_COMMIT /tmp/osmo-python-tests2-commit +RUN git clone https://git.osmocom.org/python/osmo-python-tests osmo-python-tests2 && \ + cd osmo-python-tests2 && \ + git checkout $OSMO_PYTHON2_TESTS_COMMIT && \ + python2 setup.py clean build install + +# Install osmo-python-tests for python3 +ADD http://git.osmocom.org/python/osmo-python-tests/patch /tmp/osmo-python-tests3-commit +RUN git clone https://git.osmocom.org/python/osmo-python-tests osmo-python-tests3 && \ + cd osmo-python-tests3 && \ + python3 setup.py clean build install + +# Install osmo-ci.git/scripts to /usr/local/bin +ADD http://git.osmocom.org/osmo-ci/patch /tmp/osmo-ci-commit +RUN git clone https://git.osmocom.org/osmo-ci osmo-ci && \ + cp -v $(find osmo-ci/scripts \ + -maxdepth 1 \ + -type f ) \ + /usr/local/bin + +# Install osmo-gsm-manuals to /opt/osmo-gsm-manuals +ADD http://git.osmocom.org/osmo-gsm-manuals/patch /tmp/osmo-gsm-manuals-commit +RUN git -C /opt clone https://git.osmocom.org/osmo-gsm-manuals + +# Set a UTF-8 locale +RUN sed -i -e 's/# en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/' /etc/locale.gen && \ + dpkg-reconfigure --frontend=noninteractive locales && \ + update-locale LANG=en_US.UTF-8 +ENV LANG en_US.UTF-8 + +# Install packages from Osmocom OBS repositories: +# * osmo-remsim: libulfius +# * osmo-trx: liblimesuite-dev, libuhd-dev +ARG OSMOCOM_REPO="$OSMOCOM_REPO_MIRROR/repositories/network:/osmocom:/nightly/Debian_10/" +COPY .common/Release.key /tmp/Release.key +RUN apt-key add /tmp/Release.key && \ + rm /tmp/Release.key && \ + echo "deb " $OSMOCOM_REPO " ./" > /etc/apt/sources.list.d/osmocom-nightly.list +ADD $OSMOCOM_REPO/Release /tmp/Release +RUN apt-get update && \ + apt-get install -y --no-install-recommends \ + liblimesuite-dev \ + libuhd-dev \ + libulfius-dev && \ + apt-get clean + +# osmo-python-tests' contrib/jenkins.sh writes to /usr/local as user +RUN chown -R build:build /usr/local diff --git a/debian-buster-jenkins/Makefile b/debian-buster-jenkins/Makefile new file mode 100644 index 0000000..8d0e10b --- /dev/null +++ b/debian-buster-jenkins/Makefile @@ -0,0 +1 @@ +include ../make/Makefile -- cgit v1.2.3