diff options
-rwxr-xr-x | gitlab-ci/clientdata.sh | 5 | ||||
-rwxr-xr-x | gitlab-ci/failaction.sh | 1 | ||||
-rwxr-xr-x | gitlab-ci/susseccaction.sh | 15 |
3 files changed, 17 insertions, 4 deletions
diff --git a/gitlab-ci/clientdata.sh b/gitlab-ci/clientdata.sh index e236cfc..6b81dae 100755 --- a/gitlab-ci/clientdata.sh +++ b/gitlab-ci/clientdata.sh @@ -21,13 +21,14 @@ if [[ -n "${RES}" ]]; then echo "xml check failed" echo "xml check failed" >../../clientdata/.shared/error.log echo ${RES} >>../../clientdata/.shared/error.log - exit 1 + exit 0 fi +echo >../../clientdata/.shared/error.log ./testxml.py silent >../../clientdata/.shared/error.log if [ "$?" != 0 ]; then echo "test xml error" - exit 2 + exit 0 fi echo >../../clientdata/.shared/error.log diff --git a/gitlab-ci/failaction.sh b/gitlab-ci/failaction.sh index 3f1e867..5ee4335 100755 --- a/gitlab-ci/failaction.sh +++ b/gitlab-ci/failaction.sh @@ -28,5 +28,6 @@ fi sleep 3s rm -rf clientdata/.shared/buildid.log +rm -rf clientdata/.shared/error.log killall ii diff --git a/gitlab-ci/susseccaction.sh b/gitlab-ci/susseccaction.sh index 1582b27..957f65e 100755 --- a/gitlab-ci/susseccaction.sh +++ b/gitlab-ci/susseccaction.sh @@ -5,8 +5,10 @@ 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 success. See https://gitlab.com/evol/clientdata/builds/${buildid}" +export msg1="Build success. See https://gitlab.com/evol/clientdata/builds/${buildid}" +export msg2="Build failed. See https://gitlab.com/evol/clientdata/builds/${buildid}" echo "${msg}" @@ -18,9 +20,18 @@ sleep 5s echo "/j ${channel}" > "${path}/${server}/in" sleep 10s -echo ${msg} >${path}/${server}/${channel}/in +if [[ -n "${error}" ]]; then + echo ${msg2} >${path}/${server}/${channel}/in + sleep 2s + export LINK=$(pastebinit -b http://paste.ubuntu.com/ clientdata/.shared/error.log) + echo "Error log: ${LINK}" >${path}/${server}/${channel}/in +else + echo ${msg1} >${path}/${server}/${channel}/in +fi + sleep 3s rm -rf clientdata/.shared/buildid.log +rm -rf clientdata/.shared/error.log killall ii |