Add xenial and jammy #15
|
@ -16,8 +16,8 @@ dockerfile_extra_contents = {}
|
||||||
dockerfile_extra_contents['focal'] = """
|
dockerfile_extra_contents['focal'] = """
|
||||||
|
|
||||||
# Buildbot
|
# Buildbot
|
||||||
RUN apt-get install -yq --no-install-suggests --no-install-recommends \
|
RUN apt-get update -y && apt-get install -yq --no-install-suggests --no-install-recommends \
|
||||||
buildbot-worker git subversion python3-dev libffi-dev python3-setuptools \
|
python3-buildbot-worker git subversion python3-dev libffi-dev python3-setuptools \
|
||||||
python3-pip dumb-init curl openssh-client wget
|
python3-pip dumb-init curl openssh-client wget
|
||||||
|
|
||||||
# buildbot entrypoint
|
# buildbot entrypoint
|
||||||
|
@ -35,7 +35,7 @@ ENTRYPOINT /usr/local/bin/buildbot_entrypoint.sh "$BUILDMASTER" "$WORKERNAME" "$
|
||||||
dockerfile_extra_contents['bionic'] = """
|
dockerfile_extra_contents['bionic'] = """
|
||||||
|
|
||||||
# Buildbot
|
# Buildbot
|
||||||
RUN apt-get install -yq --no-install-suggests --no-install-recommends \
|
RUN apt-get update -y && apt-get install -yq --no-install-suggests --no-install-recommends \
|
||||||
buildbot-slave git subversion python3-dev libffi-dev python3-setuptools \
|
buildbot-slave git subversion python3-dev libffi-dev python3-setuptools \
|
||||||
python3-pip dumb-init curl openssh-client wget
|
python3-pip dumb-init curl openssh-client wget
|
||||||
|
|
||||||
|
@ -51,6 +51,44 @@ ENTRYPOINT /usr/local/bin/buildbot_entrypoint.sh "$BUILDMASTER" "$WORKERNAME" "$
|
||||||
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
dockerfile_extra_contents['jammy'] = """
|
||||||
|
|
||||||
|
# Buildbot
|
||||||
|
RUN apt-get update -y && apt-get install -yq --no-install-suggests --no-install-recommends \
|
||||||
|
python3-buildbot-worker git subversion python3-dev libffi-dev python3-setuptools \
|
||||||
|
python3-pip dumb-init curl openssh-client wget
|
||||||
|
|
||||||
|
# buildbot entrypoint
|
||||||
|
RUN wget -O /usr/local/bin/buildbot_entrypoint.sh https://git.bitmessage.org/Bitmessage/buildbot-scripts/raw/branch/master/docker/bionic/entrypoint.sh
|
||||||
|
RUN chmod +x /usr/local/bin/buildbot_entrypoint.sh
|
||||||
|
|
||||||
|
RUN echo 'buildbot ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers
|
||||||
|
|||||||
|
|
||||||
|
USER buildbot
|
||||||
|
|
||||||
|
ENTRYPOINT /usr/local/bin/buildbot_entrypoint.sh "$BUILDMASTER" "$WORKERNAME" "$WORKERPASS"
|
||||||
|
|
||||||
|
"""
|
||||||
|
|
||||||
|
dockerfile_extra_contents['xenial'] = """
|
||||||
|
|
||||||
|
# Buildbot
|
||||||
|
RUN apt-get update -y && apt-get install -yq --no-install-suggests --no-install-recommends \
|
||||||
|
buildbot-slave git subversion python3-dev libffi-dev python3-setuptools \
|
||||||
|
python3-pip dumb-init curl openssh-client wget \
|
||||||
|
python-setuptools python-psutil libssl-dev python-dev libgmp-dev python-virtualenv
|
||||||
|
|
||||||
|
# buildbot entrypoint
|
||||||
|
RUN wget -O /usr/local/bin/buildbot_entrypoint.sh https://git.bitmessage.org/Bitmessage/buildbot-scripts/raw/branch/master/docker/bionic/entrypoint.sh
|
||||||
|
RUN chmod +x /usr/local/bin/buildbot_entrypoint.sh
|
||||||
|
|
||||||
|
RUN echo 'buildbot ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers
|
||||||
|
|
||||||
|
USER buildbot
|
||||||
|
|
||||||
|
ENTRYPOINT /usr/local/bin/buildbot_entrypoint.sh "$BUILDMASTER" "$WORKERNAME" "$WORKERPASS"
|
||||||
|
|
||||||
|
"""
|
||||||
|
|
||||||
def get_secret():
|
def get_secret():
|
||||||
with open("multibuild_parent_key.key", 'r') as f:
|
with open("multibuild_parent_key.key", 'r') as f:
|
||||||
|
@ -115,6 +153,7 @@ def _get_dockerfile_contents(dockerfile):
|
||||||
if m:
|
if m:
|
||||||
inside_allowed_command = True
|
inside_allowed_command = True
|
||||||
if m.group(1) == "FROM":
|
if m.group(1) == "FROM":
|
||||||
|
os_codename = m.group().split()[1].split(":")[1]
|
||||||
has_from = True
|
has_from = True
|
||||||
if inside_allowed_command:
|
if inside_allowed_command:
|
||||||
res += line
|
res += line
|
||||||
|
@ -124,7 +163,11 @@ def _get_dockerfile_contents(dockerfile):
|
||||||
|
|
||||||
if not has_from:
|
if not has_from:
|
||||||
PeterSurda
commented
This looks like it may work it the typical use case. This looks like it may work it the typical use case.
shekhar-cis
commented
Added Added `try except`
|
|||||||
return None
|
return None
|
||||||
|
|
||||||
|
try:
|
||||||
return res + dockerfile_extra_contents[os_codename]
|
return res + dockerfile_extra_contents[os_codename]
|
||||||
|
except KeyError:
|
||||||
|
return None
|
||||||
|
|
||||||
|
|
||||||
def trigger_child_hooks(buildbotUrl: str, repository, branch, revision,
|
def trigger_child_hooks(buildbotUrl: str, repository, branch, revision,
|
||||||
|
|
Loading…
Reference in New Issue
Block a user
Not sure why you install
buildbot-worker
with pip. Is there a problem installing it with apt?I tried to install
buildbot-worker
with apt in docker build with "--pull --no-cache" but gettingI found this
python3-buildbot-worker
is working with apt.maybe it is needed to run
apt -y update
after all. This is what a search shows up on focal:python3-buildbot-worker
working.