Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

buildworker: start: fix worker startup failure after update #50

Merged
merged 2 commits into from
Sep 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions .github/workflows/build-push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,8 @@ jobs:
matrix:
include:
- container_flavor: master
container_verify_string: "buildmaster configured in /master"
- container_flavor: worker
container_test_command: "--env BUILDWORKER_NAME=X --env BUILDWORKER_PASSWORD=Y"
container_verify_string: "worker configured in /builder"
container_test_command: "--env BUILDWORKER_TLS=1 --env BUILDWORKER_MASTER=Z:1922 --env BUILDWORKER_NAME=X --env BUILDWORKER_PASSWORD=Y"

steps:
- name: Checkout
Expand Down
19 changes: 8 additions & 11 deletions docker/buildworker/files/start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,14 @@

rm -f /builder/buildbot.tac

use_tls=""
[ "$BUILDWORKER_TLS" = 1 ] && use_tls="--use-tls"
/opt/venv/bin/buildbot-worker create-worker --force --umask="0o22" $use_tls /builder \
"$BUILDWORKER_MASTER" "$BUILDWORKER_NAME" "$BUILDWORKER_PASSWORD"

if [ "$BUILDWORKER_TLS" = 1 ]; then
sed -i \
-e 's#(buildmaster_host, port, #(None, None, #' \
-e 's#allow_shutdown=allow_shutdown#&, connection_string="SSL:%s:%d" %(buildmaster_host, port)#' \
/builder/buildbot.tac
fi
/opt/venv/bin/buildbot-worker create-worker \
--force \
--umask="0o22" \
--connection-string="SSL:$BUILDWORKER_MASTER" \
/builder \
"$BUILDWORKER_MASTER" \
"$BUILDWORKER_NAME" \
"$BUILDWORKER_PASSWORD"

echo "$BUILDWORKER_ADMIN" > /builder/info/admin
echo "$BUILDWORKER_DESCRIPTION" > /builder/info/host
Expand Down