diff options
Diffstat (limited to 'gitlab-ci/failaction.sh')
-rwxr-xr-x | gitlab-ci/failaction.sh | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/gitlab-ci/failaction.sh b/gitlab-ci/failaction.sh index 0d68247..a099a96 100755 --- a/gitlab-ci/failaction.sh +++ b/gitlab-ci/failaction.sh @@ -7,7 +7,10 @@ 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}" +cd clientdata +export ghead=$(git log --pretty=oneline -n 1 | awk '{print $1}') +export gitcommit=$(echo ${ghead} | cut -c 1-7) +export msg="Build failed: ${gitcommit}. See https://gitlab.com/evol/clientdata/builds/${buildid}" echo "${msg}" @@ -22,12 +25,12 @@ 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) + export LINK=$(pastebinit -b http://paste.ubuntu.com/ shared/error.log) echo "Error log: ${LINK}" >${path}/${server}/${channel}/in fi sleep 3s -rm -rf clientdata/shared/buildid.log -rm -rf clientdata/shared/error.log +rm -rf shared/buildid.log +rm -rf shared/error.log killall ii |