summaryrefslogtreecommitdiff
path: root/contrib/cirrus/notice_master_failure.sh
blob: 4b09331d3b662d840809dea9ab151516c76c2d85 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#!/bin/bash

set -e

source $(dirname $0)/lib.sh

# mIRC "escape" codes are the most standard, for a non-standard client-side interpretation.
ETX="$(echo -n -e '\x03')"
RED="${ETX}4"
NOR="$(echo -n -e '\x0f')"

if [[ "$CIRRUS_BRANCH" =~ "master" ]]
then
    BURL="https://cirrus-ci.com/build/$CIRRUS_BUILD_ID"
    ircmsg "${RED}[Action Recommended]: ${NOR}Post-merge testing ${RED}$CIRRUS_BRANCH failed${NOR} in $CIRRUS_TASK_NAME on $(os_release_id)-$(os_release_ver): $BURL.  Please investigate, and re-run if appropriate."
fi

# This script assumed to be executed on failure
die 1 "Testing Failed"