summaryrefslogtreecommitdiff
path: root/gitlab-ci/susseccaction.sh
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2016-04-09 00:24:46 +0300
committerAndrei Karas <akaras@inbox.ru>2016-04-09 00:24:46 +0300
commit78eba244ea81c0dda6dd9dc5e9c9a18d7055f68a (patch)
tree1dd1d6922f601872929ef749e229ca9f625af091 /gitlab-ci/susseccaction.sh
parent122f2f09afd0c72eb07422f2aedd21c451fd0b5d (diff)
downloadtools-78eba244ea81c0dda6dd9dc5e9c9a18d7055f68a.tar.gz
tools-78eba244ea81c0dda6dd9dc5e9c9a18d7055f68a.tar.bz2
tools-78eba244ea81c0dda6dd9dc5e9c9a18d7055f68a.tar.xz
tools-78eba244ea81c0dda6dd9dc5e9c9a18d7055f68a.zip
gitlab-ci: show commit id with green color.
Diffstat (limited to 'gitlab-ci/susseccaction.sh')
-rwxr-xr-xgitlab-ci/susseccaction.sh10
1 files changed, 6 insertions, 4 deletions
diff --git a/gitlab-ci/susseccaction.sh b/gitlab-ci/susseccaction.sh
index 16edd68..7ee114b 100755
--- a/gitlab-ci/susseccaction.sh
+++ b/gitlab-ci/susseccaction.sh
@@ -6,12 +6,14 @@ export channel="#evol-dev"
export nick="evolbuildbot"
export buildid="$(cat clientdata/shared/buildid.log)"
export error="$(cat clientdata/shared/error.log)"
+export C="\0003"
+export R="\x0f"
cd clientdata
export ghead=$(git log --pretty=oneline -n 1 | awk '{print $1}')
export gitcommit=$(echo ${ghead} | cut -c 1-7)
-export msg1="Build success: ${gitcommit}. See https://gitlab.com/evol/clientdata/builds/${buildid}"
-export msg2="Build failed: ${gitcommit}. See https://gitlab.com/evol/clientdata/builds/${buildid}"
+export msg1="Build success: ${C}03${gitcommit}${R}. See https://gitlab.com/evol/clientdata/builds/${buildid}"
+export msg2="Build failed: ${C}03${gitcommit}${R}. See https://gitlab.com/evol/clientdata/builds/${buildid}"
echo "${msg}"
@@ -24,12 +26,12 @@ echo "/j ${channel}" > "${path}/${server}/in"
sleep 10s
if [[ -n "${error}" ]]; then
- echo ${msg2} >${path}/${server}/${channel}/in
+ echo -e ${msg2} >${path}/${server}/${channel}/in
sleep 2s
export LINK=$(pastebinit -b http://paste.ubuntu.com/ shared/error.log)
echo "Error log: ${LINK}" >${path}/${server}/${channel}/in
else
- echo ${msg1} >${path}/${server}/${channel}/in
+ echo -e ${msg1} >${path}/${server}/${channel}/in
fi
sleep 3s