Updated buildbot and travis in Dockerfile.bionic
This commit is contained in:
parent
c6f50bccec
commit
99abb6c880
|
@ -1,8 +1,12 @@
|
|||
FROM ubuntu:bionic AS pybm-travis-bionic
|
||||
FROM ubuntu:bionic AS base
|
||||
|
||||
ENV DEBIAN_FRONTEND noninteractive
|
||||
ENV TRAVIS_SKIP_APT_UPDATE 1
|
||||
|
||||
ENV LANG en_US.UTF-8
|
||||
ENV LANGUAGE en_US:en
|
||||
ENV LC_ALL en_US.UTF-8
|
||||
|
||||
RUN apt-get update
|
||||
|
||||
RUN apt-get install -yq --no-install-suggests --no-install-recommends \
|
||||
|
@ -38,27 +42,46 @@ RUN apt-get install -yq --no-install-suggests --no-install-recommends \
|
|||
build-essential libcap-dev tor \
|
||||
language-pack-en
|
||||
|
||||
|
||||
# cleanup
|
||||
RUN rm -rf /var/lib/apt/lists/*
|
||||
|
||||
RUN useradd -m -U builder
|
||||
#####################################################################################################
|
||||
|
||||
RUN echo 'builder ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers
|
||||
FROM base AS travis
|
||||
|
||||
# travis2bash
|
||||
RUN wget -O /usr/local/bin/travis2bash.sh https://git.bitmessage.org/Bitmessage/buildbot-scripts/raw/branch/master/travis2bash.sh
|
||||
RUN chmod +x /usr/local/bin/travis2bash.sh
|
||||
|
||||
RUN useradd -m -U builder
|
||||
RUN echo 'builder ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers
|
||||
|
||||
# copy sources
|
||||
COPY . /home/builder/src
|
||||
RUN chown -R builder.builder /home/builder/src
|
||||
|
||||
USER builder
|
||||
|
||||
ENV LANG en_US.UTF-8
|
||||
ENV LANGUAGE en_US:en
|
||||
ENV LC_ALL en_US.UTF-8
|
||||
|
||||
WORKDIR /home/builder/src
|
||||
|
||||
ENTRYPOINT /usr/local/bin/travis2bash.sh
|
||||
|
||||
#####################################################################################################
|
||||
|
||||
FROM base AS buildbot
|
||||
|
||||
# travis2bash
|
||||
RUN wget -O /usr/local/bin/travis2bash.sh https://git.bitmessage.org/Bitmessage/buildbot-scripts/raw/branch/master/travis2bash.sh
|
||||
RUN chmod +x /usr/local/bin/travis2bash.sh
|
||||
|
||||
# copy entrypoint
|
||||
COPY packages/docker/buildbot-entrypoint.sh entrypoint.sh
|
||||
RUN chmod +x entrypoint.sh
|
||||
|
||||
RUN useradd -m -U buildbot
|
||||
RUN echo 'buildbot ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers
|
||||
|
||||
USER buildbot
|
||||
|
||||
ENTRYPOINT /entrypoint.sh "$BUILDMASTER" "$WORKERNAME" "$WORKERPASS"
|
9
packages/docker/buildbot-entrypoint.sh
Normal file
9
packages/docker/buildbot-entrypoint.sh
Normal file
|
@ -0,0 +1,9 @@
|
|||
#!/bin/bash
|
||||
|
||||
|
||||
buildbot-worker create-worker /var/lib/buildbot/workers/default "$1" "$2" "$3"
|
||||
|
||||
unset BUILDMASTER BUILDMASTER_PORT WORKERNAME WORKERPASS
|
||||
|
||||
cd /var/lib/buildbot/workers/default
|
||||
/usr/bin/dumb-init buildbot-worker start --nodaemon
|
|
@ -1,4 +1,5 @@
|
|||
#!/bin/bash
|
||||
|
||||
docker build -t pybm-travis-bionic -f packages/docker/Dockerfile.travis .
|
||||
docker run pybm-travis-bionic
|
||||
docker build --target travis -t pybm -f packages/docker/Dockerfile.bionic .
|
||||
docker run pybm
|
||||
|
||||
|
|
Reference in New Issue
Block a user