diff options
author | Chris Evich <cevich@redhat.com> | 2019-03-14 11:57:46 -0400 |
---|---|---|
committer | Chris Evich <cevich@redhat.com> | 2019-03-15 21:21:50 -0400 |
commit | 0e769210487056f20b7a4c47d195cc939ad5c7db (patch) | |
tree | 8278b37610a289f70079a043ca2386152e2baed0 /contrib/cirrus/lib.sh | |
parent | 3754f58499ad17386d8faa7c2fab1d9cc8231923 (diff) | |
download | podman-0e769210487056f20b7a4c47d195cc939ad5c7db.tar.gz podman-0e769210487056f20b7a4c47d195cc939ad5c7db.tar.bz2 podman-0e769210487056f20b7a4c47d195cc939ad5c7db.zip |
Cirrus: Notify on IRC if post-merge testing fails
Until recently it was very difficult to execute any scripts if part of a
task failed. A new feature in Cirrus-CI makes this easy. Use it to
post a notice on IRC when any task fails.
Also: Add quotes around yaml-string values for consistency and
syntax-highlighting correctness.
Signed-off-by: Chris Evich <cevich@redhat.com>
Diffstat (limited to 'contrib/cirrus/lib.sh')
-rw-r--r-- | contrib/cirrus/lib.sh | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/contrib/cirrus/lib.sh b/contrib/cirrus/lib.sh index 9419dad05..773f4f484 100644 --- a/contrib/cirrus/lib.sh +++ b/contrib/cirrus/lib.sh @@ -103,6 +103,15 @@ clean_env() { unset -v UNSET_ENV_VARS $UNSET_ENV_VARS || true # don't fail on read-only } +die() { + req_env_var " + 1 $1 + 2 $2 + " + echo "$2" + exit $1 +} + # Return a GCE image-name compatible string representation of distribution name os_release_id() { eval "$(egrep -m 1 '^ID=' /etc/os-release | tr -d \' | tr -d \")" @@ -136,14 +145,14 @@ stub() { ircmsg() { req_env_var " CIRRUS_TASK_ID $CIRRUS_TASK_ID - 1 $1 + @ $@ " # 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 - $SCRIPT $NICK $1 + $SCRIPT $NICK $@ echo "Ignoring exit($?)" set -e } |