aboutsummaryrefslogtreecommitdiff
path: root/contrib
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2018-12-18 08:26:44 -0800
committerGitHub <noreply@github.com>2018-12-18 08:26:44 -0800
commit3ec11ac77c54acbe5d1b66918434e2d4db3ca3cf (patch)
treedfc4d61077bd4cebbc81be63cc211d28e52eece5 /contrib
parent68414c5ee3066538903d04d55f135202ca4d333f (diff)
parent4bf7c4b62bd0b18f7cbbd254c00e1d0f8c1fdfaf (diff)
downloadpodman-3ec11ac77c54acbe5d1b66918434e2d4db3ca3cf.tar.gz
podman-3ec11ac77c54acbe5d1b66918434e2d4db3ca3cf.tar.bz2
podman-3ec11ac77c54acbe5d1b66918434e2d4db3ca3cf.zip
Merge pull request #2020 from cevich/quiet_podbot
Cirrus: One IRC notice only
Diffstat (limited to 'contrib')
-rw-r--r--contrib/cirrus/lib.sh5
-rwxr-xr-xcontrib/cirrus/success.sh16
2 files changed, 9 insertions, 12 deletions
diff --git a/contrib/cirrus/lib.sh b/contrib/cirrus/lib.sh
index 51db203fd..3b567b7a7 100644
--- a/contrib/cirrus/lib.sh
+++ b/contrib/cirrus/lib.sh
@@ -123,12 +123,11 @@ stub() {
ircmsg() {
req_env_var "
- SCRIPT_BASE $SCRIPT_BASE
- GOSRC $GOSRC
CIRRUS_TASK_ID $CIRRUS_TASK_ID
1 $1
"
- SCRIPT="$GOSRC/$SCRIPT_BASE/podbot.py"
+ # Sometimes setup_environment.sh didn't run
+ SCRIPT="$(dirname $0)/podbot.py"
NICK="podbot_$CIRRUS_TASK_ID"
NICK="${NICK:0:15}" # Any longer will break things
set +e
diff --git a/contrib/cirrus/success.sh b/contrib/cirrus/success.sh
index d1daf9043..2b0cf4655 100755
--- a/contrib/cirrus/success.sh
+++ b/contrib/cirrus/success.sh
@@ -1,22 +1,20 @@
#!/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
+ CIRRUS_BUILD_ID $CIRRUS_BUILD_ID
"
-REF_URL="$(echo $CIRRUS_REPO_CLONE_URL | sed 's/.git$//g')"
+REF=$(basename $CIRRUS_BRANCH) # PR number or branch named
+URL="https://cirrus-ci.com/build/$CIRRUS_BUILD_ID"
+
if [[ "$CIRRUS_BRANCH" =~ "pull" ]]
then
- REF_URL="$REF_URL/$CIRRUS_BRANCH" # pull request URL
+ ircmsg "Cirrus-CI testing successful for PR #$REF: $URL"
else
- REF_URL="$REF_URL/commits/$CIRRUS_BRANCH" # branch merge
+ ircmsg "Cirrus-CI testing branch $REF successful: $URL"
fi
-
-ircmsg "Cirrus-CI $CIRRUS_TASK_NAME on $OS_RELEASE_ID-$OS_RELEASE_VER successful for $REF_URL"