diff options
author | Edward Thomson <ethomson@edwardthomson.com> | 2019-01-28 10:48:49 +0000 |
---|---|---|
committer | Edward Thomson <ethomson@edwardthomson.com> | 2019-01-28 12:33:31 +0000 |
commit | 0cf5b6b17d1d96226880fcfabc614dbaada808ac (patch) | |
tree | 9d73acede2560413061b220e2784eab0f2208226 /ci | |
parent | e9a34864784db3eeb6613ca80f33bed3371d65d5 (diff) | |
download | libgit2-0cf5b6b17d1d96226880fcfabc614dbaada808ac.tar.gz |
ci: ignore coverity failures in nightly runs
Coverity is back but it's only read-only! Agh. Just allow it to fail
and not impact the overall job run.
Diffstat (limited to 'ci')
-rwxr-xr-x | ci/coverity-build.sh (renamed from ci/coverity.sh) | 24 | ||||
-rwxr-xr-x | ci/coverity-publish.sh | 33 |
2 files changed, 33 insertions, 24 deletions
diff --git a/ci/coverity.sh b/ci/coverity-build.sh index a97fae8c8..f8264fa83 100755 --- a/ci/coverity.sh +++ b/ci/coverity-build.sh @@ -39,27 +39,3 @@ COVERITY_UNSUPPORTED=1 \ $COV_BUILD --dir cov-int \ cmake --build . -# Upload results -tar czf libgit2.tgz cov-int -SHA=$(cd ${SOURCE_DIR} && git rev-parse --short HEAD) - -HTML="$(curl \ - --silent \ - --write-out "\n%{http_code}" \ - --form token="$COVERITY_TOKEN" \ - --form email=libgit2@gmail.com \ - --form file=@libgit2.tgz \ - --form version="$SHA" \ - --form description="libgit2 build" \ - https://scan.coverity.com/builds?project=libgit2)" -# Body is everything up to the last line -BODY="$(echo "$HTML" | head -n-1)" -# Status code is the last line -STATUS_CODE="$(echo "$HTML" | tail -n1)" - -echo "${BODY}" - -if [ "${STATUS_CODE}" != "200" -a "${STATUS_CODE}" != "201" ]; then - echo "Received error code ${STATUS_CODE} from Coverity" - exit 1 -fi diff --git a/ci/coverity-publish.sh b/ci/coverity-publish.sh new file mode 100755 index 000000000..2341b13fb --- /dev/null +++ b/ci/coverity-publish.sh @@ -0,0 +1,33 @@ +#!/bin/bash + +set -e + +# Results check +[ ! -d "cov-int" ] && echo "Coverity directory not found" && exit 1 + +# Upload results +tar czf libgit2.tgz cov-int + +SOURCE_DIR=${SOURCE_DIR:-$( cd "$( dirname "${BASH_SOURCE[0]}" )" && dirname $( pwd ) )} +SHA=$(cd ${SOURCE_DIR} && git rev-parse --short HEAD) + +HTML="$(curl \ + --silent \ + --write-out "\n%{http_code}" \ + --form token="$COVERITY_TOKEN" \ + --form email=libgit2@gmail.com \ + --form file=@libgit2.tgz \ + --form version="$SHA" \ + --form description="libgit2 build" \ + https://scan.coverity.com/builds?project=libgit2)" + +# Body is everything up to the last line +BODY="$(echo "$HTML" | head -n-1)" + +# Status code is the last line +STATUS_CODE="$(echo "$HTML" | tail -n1)" + +if [ "${STATUS_CODE}" != "200" -a "${STATUS_CODE}" != "201" ]; then + echo "Received error code ${STATUS_CODE} from Coverity" + exit 1 +fi |