Skip to content

WIP: Initial stab at a janitor worker job on jenkins

Initial stab at a janitor worker job on jenkins.debian.net. The reasons for running this on jenkins.debian.net are:

  • increase throughput of the janitor
  • run more of janitor.debian.net on common Debian infrastructure
  • reduce load on my workstation, which is currently processing these

I should warn you that I have no idea what I'm doing - my experience with jenkins and bob the builder is fairly limited; I'm hoping to get some early pointers and then come back with the next iteration of this merge request. On a local instance of Jenkins (without bob the builder) I have this working.

There are two jobs that this adds: a worker setup script that builds a schroot, and a worker.

The worker will basically do the following:

  1. contact https://janitor.debian.net/api/ to retrieve an assignment (authenticated)
  2. Check out the relevant repository, and make changes (e.g. run lintian-brush)
  3. If all is well, run sbuild to build a package
  4. Push resulting repository to https://janitor.debian.net/git/ (authenticated)
  5. Submit a POST request with summary of work done and resulting .debs to https://janitor.debian.net/api/ (authenticated)

Open issues that I'm looking for feedback on:

  • What's the best place to store credentials, in particular the username/password for authenticating against the API?
  • Is it appropriate for janitor_setup_worker.sh to install packages on the host machine (such as dependencies for lintian-brush), or would it be better to create a separate chroot for that?
  • /schroots appears to be used for chroots - is there a good place where I could e.g. keep a copy of the janitor Git repository, so that it doesn't need to be checked out for every run?
Edited by Holger Levsen

Merge request reports