[buildbot] docker: make TLS working

LEDE Commits lede-commits at lists.infradead.org
Thu Jan 14 16:09:30 EST 2021


ynezz pushed a commit to buildbot.git, branch staging/ynezz/buildbot-2.10.0:
https://git.openwrt.org/2f389bf0f190019e95537f4ca958e7ef4cb2d35f

commit 2f389bf0f190019e95537f4ca958e7ef4cb2d35f
Author: Petr Štetiar <ynezz at true.cz>
AuthorDate: Thu Jan 14 17:27:49 2021 +0100

    docker: make TLS working
    
    Fixes following errors during setup:
    
     buildslave-phase2_1   | Failed to load application: name 'optionsForClientTLS' is not defined
    
     [-] while starting BuildMaster
     ...
     builtins.ModuleNotFoundError: No module named 'OpenSSL'
    
    Signed-off-by: Petr Štetiar <ynezz at true.cz>
---
 docker/buildmaster/Dockerfile    | 4 +++-
 docker/buildslave/Dockerfile     | 5 ++++-
 docker/buildslave/files/start.sh | 4 +++-
 3 files changed, 10 insertions(+), 3 deletions(-)

diff --git a/docker/buildmaster/Dockerfile b/docker/buildmaster/Dockerfile
index a50296a..988b273 100644
--- a/docker/buildmaster/Dockerfile
+++ b/docker/buildmaster/Dockerfile
@@ -31,7 +31,9 @@ RUN \
 		"buildbot-www==$BUILDBOT_VERSION" \
 		"buildbot-waterfall-view==$BUILDBOT_VERSION" \
 		"buildbot-console-view==$BUILDBOT_VERSION" \
-		"buildbot-grid-view==$BUILDBOT_VERSION"
+		"buildbot-grid-view==$BUILDBOT_VERSION" \
+		pyOpenSSL \
+		service_identity
 
 ENV LANG=en_US.utf8
 
diff --git a/docker/buildslave/Dockerfile b/docker/buildslave/Dockerfile
index 6b09b37..4c52c5c 100644
--- a/docker/buildslave/Dockerfile
+++ b/docker/buildslave/Dockerfile
@@ -34,7 +34,10 @@ RUN \
 	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"
+RUN pip3 install \
+		"buildbot-worker==$BUILDBOT_VERSION" \
+		pyOpenSSL \
+		service_identity
 
 ENV LANG=en_US.utf8
 
diff --git a/docker/buildslave/files/start.sh b/docker/buildslave/files/start.sh
index 004701c..20ac53a 100644
--- a/docker/buildslave/files/start.sh
+++ b/docker/buildslave/files/start.sh
@@ -12,7 +12,9 @@
 
 rm -f /builder/buildbot.tac
 
-/usr/local/bin/buildbot-worker create-worker --force --umask="0o22" /builder \
+use_tls=""
+[ "$BUILDSLAVE_TLS" = 1 ] && use_tls="--use-tls"
+/usr/local/bin/buildbot-worker create-worker --force --umask="0o22" $use_tls /builder \
     "$BUILDSLAVE_MASTER" "$BUILDSLAVE_NAME" "$BUILDSLAVE_PASSWORD"
 
 if [ "$BUILDSLAVE_TLS" = 1 ]; then



More information about the lede-commits mailing list