diff options
author | Andrei Karas <akaras@inbox.ru> | 2016-04-11 22:42:31 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2016-04-11 22:42:31 +0300 |
commit | 715c77a5d735da08d3909c7631f7fee215e8bdce (patch) | |
tree | f8482ab67dc3881cd13e71a637435864235de6c0 | |
parent | cb80461d8d990f15ee8223fe122961d6fd377a55 (diff) | |
download | evol-tools-715c77a5d735da08d3909c7631f7fee215e8bdce.tar.gz evol-tools-715c77a5d735da08d3909c7631f7fee215e8bdce.tar.bz2 evol-tools-715c77a5d735da08d3909c7631f7fee215e8bdce.tar.xz evol-tools-715c77a5d735da08d3909c7631f7fee215e8bdce.zip |
gitlab-ci: improve chat message.
-rwxr-xr-x | gitlab-ci/failaction.sh | 6 | ||||
-rwxr-xr-x | gitlab-ci/susseccaction.sh | 8 |
2 files changed, 7 insertions, 7 deletions
diff --git a/gitlab-ci/failaction.sh b/gitlab-ci/failaction.sh index 4b99b06..1771cf8 100755 --- a/gitlab-ci/failaction.sh +++ b/gitlab-ci/failaction.sh @@ -8,11 +8,11 @@ export buildid="$(cat clientdata/shared/buildid.log)" export error="$(cat clientdata/shared/error.log)" export C="\0003" export R="\x0f" +export name="client-data" 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: ${C}03${gitcommit}${R}. See https://gitlab.com/evol/clientdata/builds" +export gitcommit=$(echo ${CI_BUILD_REF} | cut -c 1-7) +export msg="[${C}02${name}:${CI_BUILD_REF_NAME}${R}] Build success: ${C}03${gitcommit}${R}. See https://gitlab.com/evol/clientdata/builds" echo "${msg}" diff --git a/gitlab-ci/susseccaction.sh b/gitlab-ci/susseccaction.sh index 947e5a2..4819a35 100755 --- a/gitlab-ci/susseccaction.sh +++ b/gitlab-ci/susseccaction.sh @@ -8,12 +8,12 @@ export buildid="$(cat clientdata/shared/buildid.log)" export error="$(cat clientdata/shared/error.log)" export C="\0003" export R="\x0f" +export name="client-data" 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: ${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}" +export gitcommit=$(echo ${CI_BUILD_REF} | cut -c 1-7) +export msg1="[${C}02${name}:${CI_BUILD_REF_NAME}${R}] Build success: ${C}03${gitcommit}${R}. See https://gitlab.com/evol/clientdata/builds/${buildid}" +export msg2="[${C}02${name}:${CI_BUILD_REF_NAME}${R}] Build failed: ${C}03${gitcommit}${R}. See https://gitlab.com/evol/clientdata/builds/${buildid}" echo "${msg}" |