summaryrefslogtreecommitdiff
path: root/contrib
diff options
context:
space:
mode:
authorChris Evich <cevich@redhat.com>2018-10-15 17:51:43 -0400
committerChris Evich <cevich@redhat.com>2018-10-18 12:33:36 -0400
commit0c17f2010a6d296cfcecc6f703c22e185f930d63 (patch)
treec9b3fac2f89677fe5ce6612a3e72eb3bdd6e8de8 /contrib
parenta50410467ac7db98b02fc936c8cac7c5b8229f22 (diff)
downloadpodman-0c17f2010a6d296cfcecc6f703c22e185f930d63.tar.gz
podman-0c17f2010a6d296cfcecc6f703c22e185f930d63.tar.bz2
podman-0c17f2010a6d296cfcecc6f703c22e185f930d63.zip
Cirrus: IRC message when cirrus testing successful
Signed-off-by: Chris Evich <cevich@redhat.com>
Diffstat (limited to 'contrib')
-rwxr-xr-xcontrib/cirrus/success.sh22
1 files changed, 22 insertions, 0 deletions
diff --git a/contrib/cirrus/success.sh b/contrib/cirrus/success.sh
new file mode 100755
index 000000000..d1daf9043
--- /dev/null
+++ b/contrib/cirrus/success.sh
@@ -0,0 +1,22 @@
+#!/bin/bash
+
+set -e
+source $(dirname $0)/lib.sh
+
+req_env_var "
+ CIRRUS_TASK_NAME $CIRRUS_TASK_NAME
+ CIRRUS_BRANCH $CIRRUS_BRANCH
+ OS_RELEASE_ID $OS_RELEASE_ID
+ OS_RELEASE_VER $OS_RELEASE_VER
+ CIRRUS_REPO_CLONE_URL $CIRRUS_REPO_CLONE_URL
+"
+
+REF_URL="$(echo $CIRRUS_REPO_CLONE_URL | sed 's/.git$//g')"
+if [[ "$CIRRUS_BRANCH" =~ "pull" ]]
+then
+ REF_URL="$REF_URL/$CIRRUS_BRANCH" # pull request URL
+else
+ REF_URL="$REF_URL/commits/$CIRRUS_BRANCH" # branch merge
+fi
+
+ircmsg "Cirrus-CI $CIRRUS_TASK_NAME on $OS_RELEASE_ID-$OS_RELEASE_VER successful for $REF_URL"