Skip to content

Commit 99abb6c

Browse files
committed
Updated buildbot and travis in Dockerfile.bionic
1 parent c6f50bc commit 99abb6c

File tree

3 files changed

+42
-9
lines changed

3 files changed

+42
-9
lines changed
Lines changed: 30 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,12 @@
1-
FROM ubuntu:bionic AS pybm-travis-bionic
1+
FROM ubuntu:bionic AS base
22

33
ENV DEBIAN_FRONTEND noninteractive
44
ENV TRAVIS_SKIP_APT_UPDATE 1
55

6+
ENV LANG en_US.UTF-8
7+
ENV LANGUAGE en_US:en
8+
ENV LC_ALL en_US.UTF-8
9+
610
RUN apt-get update
711

812
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 \
3842
build-essential libcap-dev tor \
3943
language-pack-en
4044

45+
4146
# cleanup
4247
RUN rm -rf /var/lib/apt/lists/*
4348

44-
RUN useradd -m -U builder
49+
#####################################################################################################
4550

46-
RUN echo 'builder ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers
51+
FROM base AS travis
4752

4853
# travis2bash
4954
RUN wget -O /usr/local/bin/travis2bash.sh https://git.bitmessage.org/Bitmessage/buildbot-scripts/raw/branch/master/travis2bash.sh
5055
RUN chmod +x /usr/local/bin/travis2bash.sh
5156

57+
RUN useradd -m -U builder
58+
RUN echo 'builder ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers
59+
5260
# copy sources
5361
COPY . /home/builder/src
5462
RUN chown -R builder.builder /home/builder/src
5563

5664
USER builder
5765

58-
ENV LANG en_US.UTF-8
59-
ENV LANGUAGE en_US:en
60-
ENV LC_ALL en_US.UTF-8
61-
6266
WORKDIR /home/builder/src
6367

6468
ENTRYPOINT /usr/local/bin/travis2bash.sh
69+
70+
#####################################################################################################
71+
72+
FROM base AS buildbot
73+
74+
# travis2bash
75+
RUN wget -O /usr/local/bin/travis2bash.sh https://git.bitmessage.org/Bitmessage/buildbot-scripts/raw/branch/master/travis2bash.sh
76+
RUN chmod +x /usr/local/bin/travis2bash.sh
77+
78+
# copy entrypoint
79+
COPY packages/docker/buildbot-entrypoint.sh entrypoint.sh
80+
RUN chmod +x entrypoint.sh
81+
82+
RUN useradd -m -U buildbot
83+
RUN echo 'buildbot ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers
84+
85+
USER buildbot
86+
87+
ENTRYPOINT /entrypoint.sh "$BUILDMASTER" "$WORKERNAME" "$WORKERPASS"
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
#!/bin/bash
2+
3+
4+
buildbot-worker create-worker /var/lib/buildbot/workers/default "$1" "$2" "$3"
5+
6+
unset BUILDMASTER BUILDMASTER_PORT WORKERNAME WORKERPASS
7+
8+
cd /var/lib/buildbot/workers/default
9+
/usr/bin/dumb-init buildbot-worker start --nodaemon

run-tests-in-docker.sh

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
#!/bin/bash
22

3-
docker build -t pybm-travis-bionic -f packages/docker/Dockerfile.travis .
4-
docker run pybm-travis-bionic
3+
docker build --target travis -t pybm -f packages/docker/Dockerfile.bionic .
4+
docker run pybm
5+

0 commit comments

Comments
 (0)