Skip to content

Configure Jenkins notifications to our ticket tracker

We specified in the automated builds specifications that Jenkins should be able to notify a branch ticket on Redmine:

Otherwise if the build fails I *need* to see the build logs
      And the developer who proposed the merge must be notified
      And the ticket should be reassigned to the branch submitter
      And QA check should be set to "Dev needed"

There’s no Redmine plugins for Jenkins out there.

But Redmine offers two ways to do that:

  • By email
  • Using its API

The first solution can use Jenkins abilities to send emails with configurable/scriptable subjects and bodies with the email-ext plugin. This shouldn’t require much complex setup to work on, only in the Jenkins{,-job-builder} side, as there’s probably nothing to do on Redmine.

The second solution can make use of the python-redmine package in Debian. This requires yet another homebrewed script, with little setup in Redmine.

Note that changing the ticket state is easy, but assigning a different owner might be a bit more difficult. All that Jenkins knows about is a commit author email, not a Redmine username, so maybe the email solution won’t be able to cover every bits of the specification.

Let’s try to setup the first one to see if it’s that easy, and if not so useable we can still fallback on the API implementation.

In this thread we had pretty good discussions about what we need and how to get it:

Blueprint: https://tails.boum.org/blueprint/automated_builds_and_tests/autobuild_specs

Parent Task: #9614

Related issues

Original created by @bertagaz on 9719 (Redmine)

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information