docker: update to 2.10.1
authorPetr Štetiar <ynezz@true.cz>
Fri, 8 Jan 2021 16:47:12 +0000 (17:47 +0100)
committerPetr Štetiar <ynezz@true.cz>
Tue, 2 Mar 2021 11:47:11 +0000 (12:47 +0100)
Removing the mixing with the testing as it seems, that it's not needed
anymore. We can easily just use buildbot from pip.

Signed-off-by: Petr Štetiar <ynezz@true.cz>
docker/buildmaster/Dockerfile
docker/buildmaster/files/start.sh
docker/buildslave/Dockerfile
docker/buildslave/files/start.sh

index a5add6631be4a3d2ca685d292e0de6851d8cdfbe..fb7a7581b029e08c5f65264a31885648bcd79747 100644 (file)
@@ -2,16 +2,16 @@ FROM        debian:10
 MAINTAINER  OpenWrt Maintainers
 
 ARG         DEBIAN_FRONTEND=noninteractive
+ARG         BUILDBOT_VERSION=2.10.1
 
 ENV         BUILDMASTER_CONFIG config.ini
 ENV         BUILDMASTER_PHASE  1
 
 USER root
 
-RUN echo 'deb http://deb.debian.org/debian testing main' \
-               > /etc/apt/sources.list.d/testing.list && \
+RUN \
        apt-get update && \
-       apt-get install -t buster -y \
+       apt-get install -y \
                pwgen \
                locales \
                build-essential \
@@ -23,15 +23,15 @@ RUN echo 'deb http://deb.debian.org/debian testing main' \
                signify-openbsd \
                python3-pip \
                wget && \
-       apt-get install -t testing -y \
-               buildbot && \
        apt-get clean && \
-       localedef -i en_US -c -f UTF-8 -A /usr/share/locale/locale.alias en_US.UTF-8 && \
+       localedef -i en_US -c -f UTF-8 -A /usr/share/locale/locale.alias en_US.UTF-8
+
+RUN \
        pip3 install \
-               "buildbot-www==2.4.1" \
-               "buildbot-waterfall-view==2.4.1" \
-               "buildbot-console-view==2.4.1" \
-               "buildbot-grid-view==2.4.1"
+               "buildbot-www==$BUILDBOT_VERSION" \
+               "buildbot-waterfall-view==$BUILDBOT_VERSION" \
+               "buildbot-console-view==$BUILDBOT_VERSION" \
+               "buildbot-grid-view==$BUILDBOT_VERSION"
 
 ENV LANG=en_US.utf8
 
@@ -41,9 +41,13 @@ COPY phase1 /phase1
 COPY phase2 /phase2
 COPY scripts /scripts
 
-RUN mkdir /master && \
+RUN \
+    groupadd buildbot && \
+    useradd \
+       --create-home --home-dir /master \
+       --comment "OpenWrt buildbot" \
+       --gid buildbot --shell /bin/bash buildbot && \
     chown buildbot:buildbot /master && \
-    usermod --home /master buildbot && \
     chmod 0755 /entry.sh /start.sh
 
 VOLUME [ "/master" ]
index 7dc11928ad71cf09d810b29fe6b507c3d1278e29..1058e51ca42d9fc8350c02a4bf19e9ada9c70daa 100644 (file)
@@ -2,7 +2,7 @@
 
 case "${1:-start}" in
        reconfig)
-               exec /usr/bin/buildbot reconfig /master
+               exec /usr/local/bin/buildbot reconfig /master
        ;;
        start)
                case "${BUILDMASTER_PHASE:-1}" in
@@ -15,12 +15,12 @@ case "${1:-start}" in
                        ;;
                esac
 
-               /usr/bin/buildbot create-master --config=/phase${BUILDMASTER_PHASE:-1}/master.cfg /master
+               /usr/local/bin/buildbot create-master --config=/phase${BUILDMASTER_PHASE:-1}/master.cfg /master
 
                unset BUILDMASTER_PHASE
 
                rm -f /master/twistd.pid
-               exec /usr/bin/buildbot start --nodaemon /master
+               exec /usr/local/bin/buildbot start --nodaemon /master
        ;;
        /*)
                exec "$@"
index 9ee3ae40fc29707b3c2853fb37ea3e3064929909..0c60006f16078e63f2c30881ceb432d6ded3a6a2 100644 (file)
@@ -2,6 +2,7 @@ FROM        debian:10
 MAINTAINER  OpenWrt Maintainers
 
 ARG         DEBIAN_FRONTEND=noninteractive
+ARG         BUILDBOT_VERSION=2.10.1
 
 ENV         BUILDSLAVE_MASTER builds.openwrt.org:9990
 ENV         BUILDSLAVE_ADMIN contact@openwrt.org
@@ -9,10 +10,9 @@ ENV         BUILDSLAVE_DESCRIPTION Buildslave Docker Instance
 
 USER root
 
-RUN echo 'deb http://deb.debian.org/debian testing main' \
-               > /etc/apt/sources.list.d/testing.list && \
+RUN \
        apt-get update && \
-       apt-get install -t buster -y \
+       apt-get install -y \
                pwgen \
                locales \
                build-essential \
@@ -25,23 +25,28 @@ RUN echo 'deb http://deb.debian.org/debian testing main' \
                gosu \
                signify-openbsd \
                python3 \
+               python3-pip \
                wget \
                curl \
                ccache \
                rsync && \
-       apt-get install -t testing -y \
-               buildbot-worker && \
        apt-get clean && \
        localedef -i en_US -c -f UTF-8 -A /usr/share/locale/locale.alias en_US.UTF-8
 
+RUN pip3 install "buildbot-worker==$BUILDBOT_VERSION"
+
 ENV LANG=en_US.utf8
 
 COPY docker/buildslave/files/entry.sh /entry.sh
 COPY docker/buildslave/files/start.sh /start.sh
 
-RUN mkdir /builder && \
+RUN \
+    groupadd buildbot && \
+    useradd \
+       --create-home --home-dir /builder \
+       --comment "OpenWrt buildbot" \
+       --gid buildbot --shell /bin/bash buildbot && \
     chown buildbot:buildbot /builder && \
-    usermod --home /builder buildbot && \
     chmod 0755 /entry.sh /start.sh
 
 VOLUME [ "/builder" ]
index 56f878d6b80bc4c4cc6bed74e324b639ac4ede71..004701cc0d51e3c7e7c8f89b3ed4eabb505fdb13 100644 (file)
@@ -12,7 +12,7 @@
 
 rm -f /builder/buildbot.tac
 
-/usr/bin/buildbot-worker create-worker --force --umask="0o22" /builder \
+/usr/local/bin/buildbot-worker create-worker --force --umask="0o22" /builder \
     "$BUILDSLAVE_MASTER" "$BUILDSLAVE_NAME" "$BUILDSLAVE_PASSWORD"
 
 if [ "$BUILDSLAVE_TLS" = 1 ]; then
@@ -28,4 +28,4 @@ echo "$BUILDSLAVE_DESCRIPTION" > /builder/info/host
 unset BUILDSLAVE_ADMIN BUILDSLAVE_DESCRIPTION BUILDSLAVE_MASTER BUILDSLAVE_NAME BUILDSLAVE_PASSWORD
 
 rm -f /builder/twistd.pid
-exec /usr/bin/buildbot-worker start --nodaemon /builder
+exec /usr/local/bin/buildbot-worker start --nodaemon /builder