diff options
author | Andrei Karas <akaras@inbox.ru> | 2016-04-09 00:24:46 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2016-04-09 00:24:46 +0300 |
commit | 78eba244ea81c0dda6dd9dc5e9c9a18d7055f68a (patch) | |
tree | 1dd1d6922f601872929ef749e229ca9f625af091 /gitlab-ci | |
parent | 122f2f09afd0c72eb07422f2aedd21c451fd0b5d (diff) | |
download | evol-tools-78eba244ea81c0dda6dd9dc5e9c9a18d7055f68a.tar.gz evol-tools-78eba244ea81c0dda6dd9dc5e9c9a18d7055f68a.tar.bz2 evol-tools-78eba244ea81c0dda6dd9dc5e9c9a18d7055f68a.tar.xz evol-tools-78eba244ea81c0dda6dd9dc5e9c9a18d7055f68a.zip |
gitlab-ci: show commit id with green color.
Diffstat (limited to 'gitlab-ci')
-rwxr-xr-x | gitlab-ci/failaction.sh | 6 | ||||
-rwxr-xr-x | gitlab-ci/susseccaction.sh | 10 |
2 files changed, 10 insertions, 6 deletions
diff --git a/gitlab-ci/failaction.sh b/gitlab-ci/failaction.sh index a099a96..fb167c5 100755 --- a/gitlab-ci/failaction.sh +++ b/gitlab-ci/failaction.sh @@ -6,11 +6,13 @@ 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 msg="Build failed: ${gitcommit}. See https://gitlab.com/evol/clientdata/builds/${buildid}" +export msg="Build failed: ${C}03${gitcommit}${R}. See https://gitlab.com/evol/clientdata/builds/${buildid}" echo "${msg}" @@ -22,7 +24,7 @@ sleep 5s echo "/j ${channel}" > "${path}/${server}/in" sleep 10s -echo ${msg} >${path}/${server}/${channel}/in +echo -e ${msg} >${path}/${server}/${channel}/in if [[ -n "${error}" ]]; then sleep 2s export LINK=$(pastebinit -b http://paste.ubuntu.com/ shared/error.log) 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 |