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

Add janitor jobs.



Signed-off-by: Holger Levsen's avatarHolger Levsen <holger@layer-acht.org>
parent 74533631
__pycache__ __pycache__
*.pyc *.pyc
*.swp *.swp
*~
#!/bin/bash
# Set up the build environment for a janitor worker.
set -e
DEBUG=true
. /srv/jenkins/bin/common-functions.sh
common_init "$@"
JANITOR_REPO_URL=https://salsa.debian.org/jelmer/debian-janitor
TARGET=/srv/janitor
if [ ! -d $TARGET ]; then
mkdir $TARGET
fi
if [ ! -d $TARGET/debian-janitor ]; then
git clone --recurse $JANITOR_REPO_URL $TARGET/debian-janitor
else
pushd $TARGET/debian-janitor
git pull --recurse
popd
fi
make -C $TARGET/debian-janitor/breezy
make -C $TARGET/debian-janitor/dulwich
ARCH=amd64
DISTRO=unstable
# TODO(jelmer): Do we actually need a checkout of the repo?
git clone --recurse-submodules ${JANITOR_REPO_URL} debian-janitor
if [ ! -d $TARGET/chroots ]; then
mkdir $TARGET/chroots
fi
if [ -d $TARGET/chroots/janitor-$DISTRO-$ARCH ] ; then
output_echo "chroot for $DISTRO/$ARCH exists, good."
else
output_echo "preparing chroot for $DISTRO/$ARCH."
sudo sbuild-createchroot $DISTRO $TARGET/chroots/janitor-$DISTRO-$ARCH http://deb.debian.org/debian
fi
# vim: set sw=0 noet :
#!/bin/bash
set -e
WORKSPACE=/srv/janitor/debian-janitor
export PYTHONPATH=$WORKSPACE:$WORKSPACE/breezy:$WORKSPACE/silver-platter:$WORKSPACE/lintian-brush:$WORKSPACE/dulwich
export SBUILD_CONFIG=$WORKSPACE/sbuildrc
export AUTOPKGTEST=$WORKSPACE/autopkgtest-wrapper
# TODO(jelmer): Set $API_USERNAME / $API_PASSWORD somewhere
python3 -m janitor.pull_worker --base-url=https://$API_USERNAME:$API_PASSWORD@janitor.debian.net/api/ --build-command="sbuild -A -v -c jenkins-unstable-amd64"
---
- defaults:
name: janitor
project-type: freestyle
properties:
- sidebar:
url: https://jenkins.debian.net/userContent/about.html
text: About jenkins.debian.net
icon: /userContent/images/debian-swirl-24x24.png
- sidebar:
url: https://jenkins.debian.net/view/edu_devel
text: Debian Edu development
icon: /userContent/images/debian-jenkins-24x24.png
- sidebar:
url: http://www.profitbricks.co.uk
text: Sponsored by Profitbricks
icon: /userContent/images/profitbricks-24x24.png
logrotate:
daysToKeep: 90
numToKeep: 30
artifactDaysToKeep: -1
artifactNumToKeep: -1
- job:
defaults: janitor
name: janitor-setup-worker
description: 'Rebuild the janitor worker whenever the repository changes.'
scm:
- git:
url: 'https://salsa.debian.org/jelmer/debian-janitor'
branches:
- master
recursive-submodules: true
browser: gitlab
triggers:
- pollscm:
cron: 'H/1 H/1 * * *'
- timed: '@monthly'
block-downstream: yes
builders:
- shell: '/srv/jenkins/bin/janitor_setup_worker.sh'
- job:
defaults: janitor
name: janitor-worker
description: 'Run the janitor worker'
scm:
- git:
url: 'https://salsa.debian.org/jelmer/debian-janitor'
branches:
- master
recursive-submodules: true
browser: gitlab
builders:
- shell: '/srv/jenkins/bin/janitor_worker.sh'
- project:
name: janitor
jobs: ['janitor-setup-worker', 'janitor-worker']
...@@ -346,6 +346,28 @@ if [ -f /etc/debian_version ] ; then ...@@ -346,6 +346,28 @@ if [ -f /etc/debian_version ] ; then
apache2" ;; apache2" ;;
*) ;; *) ;;
esac esac
# install lintian-brush dependencies for debian-janitor
case $HOSTNAME in
osuosl-build167*) DEBS="$DEBS
devscripts
python3-aiohttp
python3-debian
python3-dulwich
python3-distro-info
python3-iniparse
python3-levenshtein
python3-pkginfo
python3-ruamel.yaml
gnome-pkg-tools
postgresql-server-dev-all
lintian
dos2unix
gpg
python3-pyinotify
python3-asyncpg
libdebhelper-perl
" ;;
esac
# notifications are only done from a view nodes # notifications are only done from a view nodes
case $HOSTNAME in case $HOSTNAME in
jenkins|jenkins-test-vm|profitbricks-build*) DEBS="$DEBS jenkins|jenkins-test-vm|profitbricks-build*) DEBS="$DEBS
......
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