source: trunk/packages/invirt-dev/build-hooks/failed-submit @ 3037

Last change on this file since 3037 was 3036, checked in by gdb, 14 years ago

Added reporting

  • Property svn:executable set to *
File size: 902 bytes
Line 
1#!/bin/sh
2
3set -e
4set -u
5
6escape() {
7    echo "$1" | sed -e 's/@/@@/g'
8}
9
10pocket=$(escape "$1")
11package=$(escape "$2")
12commit=$(escape "$3")
13principal=$(escape "$4")
14
15base=build.hooks.failed_submit.zephyr
16class=$(invirt-getconf "$base.class" 2>/dev/null || :)
17instance=$(invirt-getconf "$base.instance" 2>/dev/null || :)
18zsig=$(invirt-getconf "$base.zsig" 2>/dev/null || :)
19
20if [ -z "$class" ]; then
21  echo "I don't know where to send a commit zephyr!" >&2
22  echo "Please provide a value for $base.class in" >&2
23  echo "your invirt config file." >&2
24  exit 1
25fi
26
27(echo "A new job has @{@color(red)failed} to be submitted to the Invirtibuilder:"
28 echo
29 echo "pocket: $pocket"
30 echo "package: $package"
31 echo "commit: $commit"k
32 echo "principal: $principal"
33 echo
34 echo -n "Failure: ";
35 ( cat | sed -e 's/@/@@/g' ) ) | zwrite -c "$class" -i "${instance:-$commit}" -s "${zsig:-failed-submit}: $pocket" -d
Note: See TracBrowser for help on using the repository browser.