summaryrefslogtreecommitdiff
path: root/gitlab-ci/susseccaction.sh
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2016-04-08 22:26:08 +0300
committerAndrei Karas <akaras@inbox.ru>2016-04-08 22:26:08 +0300
commitdaa76b7be74cfcf902c83d144b552696cc9b6a6b (patch)
treec19d24c11656de7c190e265e5c840e1f2aeecbc8 /gitlab-ci/susseccaction.sh
parentfca1434ef9fb3d1fedfd446333bc6c56985de597 (diff)
downloadtools-daa76b7be74cfcf902c83d144b552696cc9b6a6b.tar.gz
tools-daa76b7be74cfcf902c83d144b552696cc9b6a6b.tar.bz2
tools-daa76b7be74cfcf902c83d144b552696cc9b6a6b.tar.xz
tools-daa76b7be74cfcf902c83d144b552696cc9b6a6b.zip
gitlab-ci: add workaround for failed builds.
Diffstat (limited to 'gitlab-ci/susseccaction.sh')
-rwxr-xr-xgitlab-ci/susseccaction.sh15
1 files changed, 13 insertions, 2 deletions
diff --git a/gitlab-ci/susseccaction.sh b/gitlab-ci/susseccaction.sh
index 1582b27..957f65e 100755
--- a/gitlab-ci/susseccaction.sh
+++ b/gitlab-ci/susseccaction.sh
@@ -5,8 +5,10 @@ export server="irc.freenode.net"
export channel="#evol-dev"
export nick="evolbuildbot"
export buildid="$(cat clientdata/.shared/buildid.log)"
+export error="$(cat clientdata/.shared/error.log)"
-export msg="Build success. See https://gitlab.com/evol/clientdata/builds/${buildid}"
+export msg1="Build success. See https://gitlab.com/evol/clientdata/builds/${buildid}"
+export msg2="Build failed. See https://gitlab.com/evol/clientdata/builds/${buildid}"
echo "${msg}"
@@ -18,9 +20,18 @@ sleep 5s
echo "/j ${channel}" > "${path}/${server}/in"
sleep 10s
-echo ${msg} >${path}/${server}/${channel}/in
+if [[ -n "${error}" ]]; then
+ echo ${msg2} >${path}/${server}/${channel}/in
+ sleep 2s
+ export LINK=$(pastebinit -b http://paste.ubuntu.com/ clientdata/.shared/error.log)
+ echo "Error log: ${LINK}" >${path}/${server}/${channel}/in
+else
+ echo ${msg1} >${path}/${server}/${channel}/in
+fi
+
sleep 3s
rm -rf clientdata/.shared/buildid.log
+rm -rf clientdata/.shared/error.log
killall ii