forked from Bitmessage/buildbot-scripts
- add dockerfile for bionic builder - chmod scripts sexecutable - add docker-install-all.shmaster
parent
b9e28b4ef3
commit
ee7a93c2fd
@ -0,0 +1,37 @@
|
||||
#!/bin/bash
|
||||
|
||||
trusty()
|
||||
{
|
||||
return
|
||||
}
|
||||
|
||||
xenial()
|
||||
{
|
||||
return
|
||||
}
|
||||
|
||||
bionic()
|
||||
{
|
||||
cd /usr/src/buildbot-scripts/docker/bionic || return
|
||||
docker build -t pybm-build-bionic .
|
||||
}
|
||||
|
||||
focal()
|
||||
{
|
||||
return
|
||||
}
|
||||
|
||||
cores=$(grep -E '^cpu cores' /proc/cpuinfo |head -1|cut -d: -f2|tr -d '[:space:]')
|
||||
mem=$(sed -E 's/^MemTotal: +([0-9]+) kB/\1/p;d' < /proc/meminfo)
|
||||
mempercore=$(((mem/1024-4096)/cores))
|
||||
|
||||
# install kata containers
|
||||
docker run --runtime=runc -v /opt/kata:/opt/kata -v /var/run/dbus:/var/run/dbus -v /run/systemd:/run/systemd -v /etc/docker:/etc/docker -it katadocker/kata-deploy kata-deploy-docker install
|
||||
|
||||
# update default container CPU and memory
|
||||
sed -i "s/default_vcpus = .*/default_vcpus = 2/g;s/default_memory = .*/default-memory = $mempercore/g" /opt/kata/share/defaults/kata-containers/configuration-qemu-virtiofs.toml
|
||||
|
||||
trusty
|
||||
xenial
|
||||
bionic
|
||||
focal
|
@ -0,0 +1,76 @@
|
||||
FROM ubuntu:bionic AS pybm-build-bionic
|
||||
|
||||
ENV DEBIAN_FRONTEND noninteractive
|
||||
|
||||
RUN apt-get update
|
||||
|
||||
RUN apt-get install -yq --no-install-suggests --no-install-recommends \
|
||||
software-properties-common
|
||||
|
||||
RUN dpkg --add-architecture i386
|
||||
|
||||
RUN add-apt-repository ppa:deadsnakes/ppa
|
||||
|
||||
RUN apt-get update
|
||||
|
||||
RUN apt-get -y install sudo
|
||||
|
||||
# travis xenial bionic
|
||||
RUN apt-get install -yq --no-install-suggests --no-install-recommends \
|
||||
python-setuptools libssl-dev libpq-dev python-prctl python-dev \
|
||||
python-dev python-virtualenv python-pip virtualenv
|
||||
|
||||
# travis focal
|
||||
RUN apt-get install -yq --no-install-suggests --no-install-recommends \
|
||||
python-setuptools libpcap-dev libpq-dev python-prctl python-dev \
|
||||
libpcap-dev python3-virtualenv python3-pip virtualenv
|
||||
|
||||
# dpkg
|
||||
RUN apt-get install -yq --no-install-suggests --no-install-recommends \
|
||||
python-minimal python-setuptools python-all python openssl libssl-dev \
|
||||
dh-apparmor debhelper dh-python python-msgpack python-qt4 python-stdeb \
|
||||
python-all-dev
|
||||
|
||||
# Code quality
|
||||
RUN apt-get install -yq --no-install-suggests --no-install-recommends \
|
||||
pylint python-pycodestyle python3-pycodestyle pycodestyle python-flake8 \
|
||||
python3-flake8 flake8 python-pyflakes python3-pyflakes pyflakes pyflakes3 \
|
||||
curl
|
||||
|
||||
# Wine32
|
||||
RUN apt-get install -yq --no-install-suggests --no-install-recommends \
|
||||
python python-pip wget wine-stable winetricks mingw-w64 wine32 wine64 xvfb
|
||||
|
||||
# Wine64
|
||||
RUN apt-get install -yq --no-install-suggests --no-install-recommends \
|
||||
python python-pip wget wine-stable winetricks mingw-w64 wine32 wine64 xvfb
|
||||
|
||||
# Buildbot
|
||||
RUN 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
|
||||
|
||||
# python 3.7
|
||||
RUN apt-get install -yq --no-install-suggests --no-install-recommends \
|
||||
python3.7 python3.7-dev
|
||||
|
||||
# .travis.yml
|
||||
RUN apt-get install -yq --no-install-suggests --no-install-recommends \
|
||||
build-essential libcap-dev tor
|
||||
|
||||
|
||||
# cleanup
|
||||
RUN rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# travis2bash
|
||||
RUN cp /usr/src/buildbot-scripts/travis2bash.sh /usr/local/bin
|
||||
|
||||
#RUN useradd -ms /bin/bash buildbot
|
||||
|
||||
RUN echo 'buildbot ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers
|
||||
|
||||
COPY entrypoint.sh /entrypoint.sh
|
||||
|
||||
USER buildbot
|
||||
|
||||
ENTRYPOINT /entrypoint.sh "$BUILDMASTER" "$WORKERNAME" "$WORKERPASS"
|
@ -0,0 +1,5 @@
|
||||
#!/bin/bash
|
||||
|
||||
buildbot-worker create-worker /var/lib/buildbot/workers/default "$1" "$2" "$3"
|
||||
cd /var/lib/buildbot/workers/default
|
||||
/usr/bin/dumb-init buildbot-worker start --nodaemon
|
Loading…
Reference in new issue