Commit 1421e3ba authored by Jelmer Vernooij's avatar Jelmer Vernooij Committed by Holger Levsen
Browse files

Run the janitor worker using docker.



Signed-off-by: Holger Levsen's avatarHolger Levsen <holger@layer-acht.org>
parent 7d6af29b
...@@ -8,51 +8,6 @@ DEBUG=true ...@@ -8,51 +8,6 @@ DEBUG=true
. /srv/jenkins/bin/common-functions.sh . /srv/jenkins/bin/common-functions.sh
common_init "$@" common_init "$@"
JANITOR_REPO_URL=https://salsa.debian.org/jelmer/debian-janitor docker pull eu.gcr.io/debian-janitor/worker
TARGET=/srv/janitor
sudo mkdir -p $TARGET/
sudo chown jenkins:jenkins $TARGET/
debcargo update
ARCH=$(dpkg-architecture -qDEB_HOST_ARCH)
DISTRO=unstable
CHROOT=$DISTRO-$ARCH-sbuild
if [ ! -d $TARGET/debian-janitor ]; then
git clone --recurse $JANITOR_REPO_URL $TARGET/debian-janitor
else
pushd $TARGET/debian-janitor
git status || /bin/true
git fetch
git reset --hard origin/master
git submodule update --init
popd
fi
mkdir -p $TARGET/tmp
sudo chown jenkins:jenkins $TARGET/tmp
make -C $TARGET/debian-janitor/breezy realclean all
make -C $TARGET/debian-janitor/dulwich
cp $TARGET/debian-janitor/sbuildrc $TARGET/sbuildrc
sed -i "s/\$piuparts_opts = \\['--schroot', '%r-%a-sbuild' \\];/\$piuparts_opts = ['--schroot', '%r-%a-sbuild', '--no-eatmydata' ];/" $TARGET/sbuildrc
sed -i 's/%r/unstable/' $TARGET/sbuildrc
mkdir -p $TARGET/chroots
if [ -d $TARGET/chroots/janitor-$DISTRO-$ARCH ] ; then
echo "updating existing chroot for $DISTRO/$ARCH."
sudo sbuild-update -udcar $CHROOT
else
echo "preparing chroot for $DISTRO/$ARCH."
sudo sbuild-createchroot \
--extra-repository="deb-src http://deb.debian.org/debian/ $DISTRO main" \
--include=eatmydata \
$DISTRO $TARGET/chroots/janitor-$DISTRO-$ARCH http://deb.debian.org/debian
fi
# vim: set sw=0 noet : # vim: set sw=0 noet :
...@@ -2,17 +2,11 @@ ...@@ -2,17 +2,11 @@
set -e set -e
WORKSPACE=/srv/janitor/debian-janitor docker run --rm -it \
--memory=20g \
export SBUILD_CONFIG=/srv/janitor/sbuildrc -v /srv/janitor:/srv/janitor \
eu.gcr.io/debian-janitor/worker \
export TMPDIR=/srv/janitor/tmp --listen-address=0.0.0.0 \
--port=8080 \
export PATH=$WORKSPACE/breezy-debian/scripts:$WORKSPACE/debmutate/scripts:$WORKSPACE/lintian-brush/scripts:$WORKSPACE/breezy:$PATH --base-url=https://janitor.debian.net/api/ \
--credentials=/srv/janitor/credentials.json
# Limit memory to 20GB
ulimit -v 20000000
$WORKSPACE/pull_worker.sh \
--base-url=https://janitor.debian.net/api/ \
--credentials=/srv/janitor/janitor.creds.json
...@@ -407,59 +407,8 @@ if [ -f /etc/debian_version ] ; then ...@@ -407,59 +407,8 @@ if [ -f /etc/debian_version ] ; then
esac esac
# install lintian-brush dependencies for debian-janitor # install lintian-brush dependencies for debian-janitor
case $HOSTNAME in case $HOSTNAME in
# TODO(jelmer): Add python3-tr once it hits backports
osuosl167*) DEBS="$DEBS osuosl167*) DEBS="$DEBS
cargo docker.io
cython3
devscripts
python3-aiohttp
python3-all-dev
dpkg-source-gitarchive
python3-asyncpg
python3-bs4
python3-certifi
python3-configobj
python3-debian
python3-docutils
python3-dulwich
python3-distro-info
python3-fastimport
python3-iniparse
python3-jinja2
python3-launchpadlib
python3-levenshtein
python3-lz4
python3-markdown
python3-merge3
python3-paramiko
python3-patiencediff
python3-pkginfo
python3-prometheus-client
python3-pyinotify
python3-requirement-parser
python3-ruamel.yaml
python3-semver
python3-setuptools
python3-six
python3-subunit
python3-testtools
python3-toml
python3-tomlkit
python3-urllib3
python3-yaml
rustc
sbuild
gnome-pkg-tools
postgresql-server-dev-all
lintian
dos2unix
gpg
libdebhelper-perl
quilt
debcargo
cme
debhelper
decopy
" ;; " ;;
esac esac
# notifications are only done from a few nodes # notifications are only done from a few nodes
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment