summaryrefslogtreecommitdiff
path: root/contrib/cirrus/success.sh
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2018-10-23 07:41:43 -0700
committerGitHub <noreply@github.com>2018-10-23 07:41:43 -0700
commit79befd5158c8f01a88e4d14e46851ddcc11d51c4 (patch)
treec823e9f68d9857d2abf819d8529259000ea00d24 /contrib/cirrus/success.sh
parentab2b3d64ceaf496107c734575581460185c97369 (diff)
parent4de69da7bd5739a0845e3c0cae751d4c5eb615f4 (diff)
downloadpodman-79befd5158c8f01a88e4d14e46851ddcc11d51c4.tar.gz
podman-79befd5158c8f01a88e4d14e46851ddcc11d51c4.tar.bz2
podman-79befd5158c8f01a88e4d14e46851ddcc11d51c4.zip
Merge pull request #1648 from cevich/cirrus_podbot
Add simple IRC messenger
Diffstat (limited to 'contrib/cirrus/success.sh')
-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"