summaryrefslogtreecommitdiff
path: root/gitlab-ci
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2016-04-08 21:43:31 +0300
committerAndrei Karas <akaras@inbox.ru>2016-04-08 21:43:31 +0300
commit685ae04d1cc040bb333e436f8d4e4a23c7b13704 (patch)
treee39a213e8efebecb312c106d927e400349a84e1f /gitlab-ci
parent1fc7076146e41dc7753e78fd34c4037fd8d50686 (diff)
downloadevol-tools-685ae04d1cc040bb333e436f8d4e4a23c7b13704.tar.gz
evol-tools-685ae04d1cc040bb333e436f8d4e4a23c7b13704.tar.bz2
evol-tools-685ae04d1cc040bb333e436f8d4e4a23c7b13704.tar.xz
evol-tools-685ae04d1cc040bb333e436f8d4e4a23c7b13704.zip
gitlab-ci: copy possible error into pastebin and report it in irc.
Diffstat (limited to 'gitlab-ci')
-rwxr-xr-xgitlab-ci/failaction.sh6
1 files changed, 6 insertions, 0 deletions
diff --git a/gitlab-ci/failaction.sh b/gitlab-ci/failaction.sh
index d5db2fd..3f1e867 100755
--- a/gitlab-ci/failaction.sh
+++ b/gitlab-ci/failaction.sh
@@ -5,6 +5,7 @@ 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 failed. See https://gitlab.com/evol/clientdata/builds/${buildid}"
@@ -19,6 +20,11 @@ echo "/j ${channel}" > "${path}/${server}/in"
sleep 10s
echo ${msg} >${path}/${server}/${channel}/in
+if [[ -n "${error}" ]]; then
+ sleep 2s
+ export LINK=$(pastebinit -b http://paste.ubuntu.com/ clientdata/.shared/error.log)
+ echo "Error log: ${LINK}" >${path}/${server}/${channel}/in
+fi
sleep 3s
rm -rf clientdata/.shared/buildid.log