From: Petr Štetiar Date: Thu, 14 Jan 2021 16:27:49 +0000 (+0100) Subject: docker: make TLS working X-Git-Tag: v1~45 X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=89787beb4e72d70b2492fdc954dc474cd832eb69;p=buildbot.git 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 --- diff --git a/docker/buildmaster/Dockerfile b/docker/buildmaster/Dockerfile index 23b907b..cc85aab 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 c51b5d2..2da6910 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