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

set -e

source $(dirname $0)/lib.sh

req_env_var "
    CIRRUS_BRANCH $CIRRUS_BRANCH
    CIRRUS_BUILD_ID $CIRRUS_BUILD_ID
"

REF=$(basename $CIRRUS_BRANCH)  # PR number or branch named
URL="https://cirrus-ci.com/build/$CIRRUS_BUILD_ID"

if [[ "$CIRRUS_BRANCH" =~ "pull" ]]
then
    ircmsg "Cirrus-CI testing successful for PR #$REF: $URL"
else
    ircmsg "Cirrus-CI testing branch $REF successful: $URL"
fi