[Qa-jenkins-scm] [Git][qa/jenkins.debian.net][master] Run the janitor worker using docker.
Holger Levsen (@holger)
gitlab at salsa.debian.org
Wed Feb 2 19:38:07 GMT 2022
Holger Levsen pushed to branch master at Debian QA / jenkins.debian.net
Commits:
1421e3ba by Jelmer Vernooij at 2022-02-02T20:37:31+01:00
Run the janitor worker using docker.
Signed-off-by: Holger Levsen <holger at layer-acht.org>
- - - - -
3 changed files:
- bin/janitor_setup_worker.sh
- bin/janitor_worker.sh
- update_jdn.sh
Changes:
=====================================
bin/janitor_setup_worker.sh
=====================================
@@ -8,51 +8,6 @@ DEBUG=true
. /srv/jenkins/bin/common-functions.sh
common_init "$@"
-JANITOR_REPO_URL=https://salsa.debian.org/jelmer/debian-janitor
-
-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
+docker pull eu.gcr.io/debian-janitor/worker
# vim: set sw=0 noet :
=====================================
bin/janitor_worker.sh
=====================================
@@ -2,17 +2,11 @@
set -e
-WORKSPACE=/srv/janitor/debian-janitor
-
-export SBUILD_CONFIG=/srv/janitor/sbuildrc
-
-export TMPDIR=/srv/janitor/tmp
-
-export PATH=$WORKSPACE/breezy-debian/scripts:$WORKSPACE/debmutate/scripts:$WORKSPACE/lintian-brush/scripts:$WORKSPACE/breezy:$PATH
-
-# Limit memory to 20GB
-ulimit -v 20000000
-
-$WORKSPACE/pull_worker.sh \
- --base-url=https://janitor.debian.net/api/ \
- --credentials=/srv/janitor/janitor.creds.json
+docker run --rm -it \
+ --memory=20g \
+ -v /srv/janitor:/srv/janitor \
+ eu.gcr.io/debian-janitor/worker \
+ --listen-address=0.0.0.0 \
+ --port=8080 \
+ --base-url=https://janitor.debian.net/api/ \
+ --credentials=/srv/janitor/credentials.json
=====================================
update_jdn.sh
=====================================
@@ -407,59 +407,8 @@ if [ -f /etc/debian_version ] ; then
esac
# install lintian-brush dependencies for debian-janitor
case $HOSTNAME in
- # TODO(jelmer): Add python3-tr once it hits backports
osuosl167*) DEBS="$DEBS
- cargo
- 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
+ docker.io
" ;;
esac
# notifications are only done from a few nodes
View it on GitLab: https://salsa.debian.org/qa/jenkins.debian.net/-/commit/1421e3bac9671c3ed88bbd74785159e31878bc87
--
View it on GitLab: https://salsa.debian.org/qa/jenkins.debian.net/-/commit/1421e3bac9671c3ed88bbd74785159e31878bc87
You're receiving this email because of your account on salsa.debian.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/qa-jenkins-scm/attachments/20220202/1214aff9/attachment-0001.htm>
More information about the Qa-jenkins-scm
mailing list