[Qa-jenkins-scm] [Git][qa/jenkins.debian.net][master] 2 commits: Add janitor jobs.
Holger Levsen
gitlab at salsa.debian.org
Thu May 14 16:20:20 BST 2020
Holger Levsen pushed to branch master at Debian QA / jenkins.debian.net
Commits:
e65a360f by Jelmer Vernooij at 2020-05-14T16:31:53+02:00
Add janitor jobs.
Signed-off-by: Holger Levsen <holger at layer-acht.org>
- - - - -
1a993f2f by Holger Levsen at 2020-05-14T17:19:59+02:00
janitor job: make them run on osuosl167 and email logs
Signed-off-by: Holger Levsen <holger at layer-acht.org>
- - - - -
6 changed files:
- .gitignore
- + bin/janitor_setup_worker.sh
- + bin/janitor_worker.sh
- bin/jenkins_node_wrapper.sh
- + job-cfg/janitor.yaml
- update_jdn.sh
Changes:
=====================================
.gitignore
=====================================
@@ -1,3 +1,4 @@
__pycache__
*.pyc
*.swp
+*~
=====================================
bin/janitor_setup_worker.sh
=====================================
@@ -0,0 +1,47 @@
+#!/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/janitor_worker.sh
=====================================
@@ -0,0 +1,11 @@
+#!/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"
=====================================
bin/jenkins_node_wrapper.sh
=====================================
@@ -85,6 +85,10 @@ elif [ "$1" = "reproducible_pool_buildinfos" ] ; then
exec /srv/jenkins/bin/reproducible_pool_buildinfos.sh ; croak "Exec failed";
elif [ "$1" = "reproducible_html_builtin-pho" ] ; then
exec /srv/jenkins/bin/reproducible_html_builtin-pho.sh ; croak "Exec failed";
+elif [ "$1" = "janitor-setup-worker" ] ; then
+ shift ; exec /srv/jenkins/bin/janitor_setup_worker.sh ; croak "Exec failed";
+elif [ "$1" = "janitor-worker" ] ; then
+ shift ; exec /srv/jenkins/bin/janitor_worker.sh ; croak "Exec failed";
elif [ "$1" = "haskell-package-plan" ] ; then
shift ; exec /srv/jenkins/bin/chroot-run.sh $@ ; croak "Exec failed";
elif [ "$1" = "/srv/jenkins/bin/reproducible_build.sh" ] && ( [ "$2" = "1" ] || [ "$2" = "2" ] ) ; then
=====================================
job-cfg/janitor.yaml
=====================================
@@ -0,0 +1,54 @@
+---
+- 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
+ publishers:
+ - email:
+ recipients: 'jelmer at jelmer.uk qa-jenkins-scm at lists.alioth.debian.org'
+ builders:
+ - shell: '/srv/jenkins/bin/jenkins_master_wrapper.sh'
+ node: 'osuosl167'
+
+- 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
+
+- job:
+ defaults: janitor
+ name: janitor-worker
+ description: 'Run the janitor worker'
+
+- project:
+ name: janitor
+ jobs: ['janitor-setup-worker', 'janitor-worker']
=====================================
update_jdn.sh
=====================================
@@ -346,6 +346,28 @@ if [ -f /etc/debian_version ] ; then
apache2" ;;
*) ;;
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
case $HOSTNAME in
jenkins|jenkins-test-vm|profitbricks-build*) DEBS="$DEBS
View it on GitLab: https://salsa.debian.org/qa/jenkins.debian.net/-/compare/74533631a457fc816bff0806d19f1153faf078d6...1a993f2ff195ce3d1e094366d2eea639385ff314
--
View it on GitLab: https://salsa.debian.org/qa/jenkins.debian.net/-/compare/74533631a457fc816bff0806d19f1153faf078d6...1a993f2ff195ce3d1e094366d2eea639385ff314
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/20200514/3efeca8f/attachment-0001.html>
More information about the Qa-jenkins-scm
mailing list