[MERGED] osmo-ci[master]: jenkins: Copy Dockerfile and script from buildhost

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

Harald Welte gerrit-no-reply at lists.osmocom.org
Sat Aug 26 05:55:03 UTC 2017


Harald Welte has submitted this change and it was merged.

Change subject: jenkins: Copy Dockerfile and script from buildhost
......................................................................


jenkins: Copy Dockerfile and script from buildhost

We are not using the Docker registry due difficult GPL compliance
but build the image on the build node itself. After prototyping
if containers can be used for building these files remained forked
on the node. These days it seems to be easier to complain than to
say thank you that this new approach has its merits. Copy the files
from the build slave to the directory they should have been in.

Change-Id: Icb0406f96b0c18e77be51ad8317c2668fb23a45e
---
A docker/Dockerfile_osmocom_jenkins.amd64
A docker/rebuild_osmocom_jenkins_image.sh
2 files changed, 71 insertions(+), 0 deletions(-)

Approvals:
  Harald Welte: Looks good to me, approved; Verified



diff --git a/docker/Dockerfile_osmocom_jenkins.amd64 b/docker/Dockerfile_osmocom_jenkins.amd64
new file mode 100644
index 0000000..8f33233
--- /dev/null
+++ b/docker/Dockerfile_osmocom_jenkins.amd64
@@ -0,0 +1,69 @@
+FROM debian:jessie
+
+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 wget make
+
+RUN DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends gcc g++ make git
+RUN DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends sudo
+RUN DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends unzip bzip2  python
+
+# 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
+
+# still generic
+RUN DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends doxygen git asciidoc rsync coccinelle
+
+# for GNU smalltalk
+RUN DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends flex bison libsigsegv-dev libffi-dev texinfo
+
+# libosmo-sccp/abis/etc
+RUN DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends libortp-dev libpcsclite-dev libsctp-dev libfftw3-dev libsnmp-dev  libusb-1.0-0-dev libtalloc-dev libgnutls28-dev
+
+# OsmocomBB
+RUN DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends gcc-arm-none-eabi
+
+# building
+RUN DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends libtool pkg-config automake autoconf
+
+# Linux kernel
+RUN DEBIAN_FRONTEND=noninteractive apt-get install -y bc
+
+# and all
+RUN DEBIAN_FRONTEND=noninteractive apt-get install -y doxygen g++ libtalloc-dev libpcsclite-dev make gcc pkgconf libtool autoconf autoconf-archive automake libortp-dev asciidoc mscgen git libsctp-dev libpcap-dev osc libc-ares-dev libgps-dev  libsofia-sip-ua-glib-dev  libssl-dev libsqlite3-dev libusb-dev libffi-dev libfftw3-dev flex bison libdbi-dev  libsnmp-dev libncurses5-dev libgsm1-dev python-minimal python3 libdbd-sqlite3 cppcheck htop  libgmp-dev gawk texinfo flex bison bc  libsigsegv-dev libffi-dev libusb-1.0-0-dev  libreadline-dev debhelper devscripts gcc-arm-none-eabi git-buildpackage dh-systemd dh-autoreconf bc openssh-client 
+
+RUN git clone git://git.osmocom.org/python/osmo-python-tests && cd osmo-python-tests && python2 ./setup.py install # 2017-03-06
+
+
+RUN echo "#!/bin/sh \n\
+ \n\
+if ! test -d \$1; \n\
+then \n\
+  git clone git://git.osmocom.org/\$1 \$1 \n\
+fi \n\
+\n\
+cd \$1 \n\
+git fetch origin \n\
+git reset --hard origin/master" > /usr/local/bin/osmo-deps.sh
+RUN chmod +x /usr/local/bin/osmo-deps.sh
+
+
+RUN git clone http://git.savannah.gnu.org/r/smalltalk.git
+RUN DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends flex libsigsegv-dev bison libgmp-dev texinfo zip libltdl-dev 
+RUN cd smalltalk && autoreconf --install --force && ./configure && make install
+RUN rm -rf smalltalk
+RUN git clone https://github.com/zecke/petitparser.git && cd petitparser && gst-package package.xml
+RUN git clone https://github.com/zecke/petitparser-tests.git && cd petitparser-tests && gst-package package.xml
+RUN git clone git://git.osmocom.org/smalltalk/osmo-st-logging && cd osmo-st-logging && gst-package package.xml
+RUN git clone git://git.osmocom.org/smalltalk/osmo-st-core && cd osmo-st-core && gst-package package.xml
+RUN git clone git://git.osmocom.org/smalltalk/osmo-st-network && cd osmo-st-network && gst-package package.xml
+RUN git clone git://git.osmocom.org/smalltalk/osmo-st-gsm && cd osmo-st-gsm && gst-package --test package.xml
+RUN git clone git://git.osmocom.org/smalltalk/osmo-st-openbsc-test && cd osmo-st-openbsc-test/fakebts && gst-package --test package.xml
+RUN rm -rf petitparser petitparser-tests osmo-st-logging ost-st-core osmo-st-network osmo-st-gsm osmo-st-openbsc-test
+RUN DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends python-pip
+RUN pip install timeout_decorator
diff --git a/docker/rebuild_osmocom_jenkins_image.sh b/docker/rebuild_osmocom_jenkins_image.sh
new file mode 100755
index 0000000..4b2d359
--- /dev/null
+++ b/docker/rebuild_osmocom_jenkins_image.sh
@@ -0,0 +1,2 @@
+#!/bin/sh
+docker build -t osmocom:amd64 - < Dockerfile_osmocom_jenkins.amd64

-- 
To view, visit https://gerrit.osmocom.org/3675
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Icb0406f96b0c18e77be51ad8317c2668fb23a45e
Gerrit-PatchSet: 1
Gerrit-Project: osmo-ci
Gerrit-Branch: master
Gerrit-Owner: Holger Freyther <holger at freyther.de>
Gerrit-Reviewer: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: neels <nhofmeyr at sysmocom.de>



More information about the gerrit-log mailing list