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 \
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
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" ]
case "${1:-start}" in
reconfig)
- exec /usr/bin/buildbot reconfig /master
+ exec /usr/local/bin/buildbot reconfig /master
;;
start)
case "${BUILDMASTER_PHASE:-1}" 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 "$@"
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
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 \
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" ]
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
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