2014-03-21 23:57:12

How to get notification about your builds in Copr

Copr emits fedmsg notifications, which you can utilize.

First option is very easy. Just join #fedora-fedmsg on Freemode IRC and watch for Copr notification, which looks like: [23:10] copr.build.end -- msuchy's copr-dev copr finished a build http://copr-fe.cloud.fedoraproject.org/coprs/msuchy/copr-dev/ you can set up highlighting or some notification or whatever is your IRC client capable.

Or you can utilize fedwatch and put this content in /etc/fedwatch.conf:

[org.fedoraproject.prod.copr.build.end]
arg1=msg/what

and this content in /etc/fedwatch.d/copr.sh:

#!/bin/sh
if [[ "$1" != "org.fedoraproject.prod.copr.build.end" ]]; then
    exit 0
fi
what=$2
if [[ $what == *user:msuchy* ]]; then
    zenity --info --text="$what"
fi

Zenity just display informative window, feel free to put there something more useful.

Do not forget to:

chmod a+x /etc/fedwatch.d/copr.sh

And now run fedwatch.

Only after playing with fedwatch, I realize that I should probably enhance Copr notifications, to send information more structured and more verbose. Putting that in my TODO list.

And one final notice: this copr message is emited for each build and for each chroot. If you sumited your src.rpm and it is going to build for 4 chroots, you will receive 4 such messages.


Posted by Miroslav Suchý | Permanent link
Comments
comments powered by Disqus