diff options
author | Andrei Karas <akaras@inbox.ru> | 2016-04-08 22:26:08 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2016-04-08 22:26:08 +0300 |
commit | daa76b7be74cfcf902c83d144b552696cc9b6a6b (patch) | |
tree | c19d24c11656de7c190e265e5c840e1f2aeecbc8 /gitlab-ci | |
parent | fca1434ef9fb3d1fedfd446333bc6c56985de597 (diff) | |
download | evol-tools-daa76b7be74cfcf902c83d144b552696cc9b6a6b.tar.gz evol-tools-daa76b7be74cfcf902c83d144b552696cc9b6a6b.tar.bz2 evol-tools-daa76b7be74cfcf902c83d144b552696cc9b6a6b.tar.xz evol-tools-daa76b7be74cfcf902c83d144b552696cc9b6a6b.zip |
gitlab-ci: add workaround for failed builds.
Diffstat (limited to 'gitlab-ci')
-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 |