diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 18:45:59 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 18:45:59 +0000 |
commit | 19fcec84d8d7d21e796c7624e521b60d28ee21ed (patch) | |
tree | 42d26aa27d1e3f7c0b8bd3fd14e7d7082f5008dc /src/jaegertracing/thrift/build/docker/scripts/covscan.sh | |
parent | Initial commit. (diff) | |
download | ceph-19fcec84d8d7d21e796c7624e521b60d28ee21ed.tar.xz ceph-19fcec84d8d7d21e796c7624e521b60d28ee21ed.zip |
Adding upstream version 16.2.11+ds.upstream/16.2.11+dsupstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/jaegertracing/thrift/build/docker/scripts/covscan.sh')
-rwxr-xr-x | src/jaegertracing/thrift/build/docker/scripts/covscan.sh | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/src/jaegertracing/thrift/build/docker/scripts/covscan.sh b/src/jaegertracing/thrift/build/docker/scripts/covscan.sh new file mode 100755 index 000000000..cb3f283eb --- /dev/null +++ b/src/jaegertracing/thrift/build/docker/scripts/covscan.sh @@ -0,0 +1,50 @@ +# +# Coverity Scan Travis build script +# To run this interactively, set the environment variables yourself, +# and run this inside a docker container. +# +# Command-Line Arguments +# +# --skipdownload to skip re-downloading the Coverity Scan build package (large) +# +# Environment Variables (required) +# +# COVERITY_SCAN_NOTIFICATION_EMAIL - email address to notify +# COVERITY_SCAN_TOKEN - the Coverity Scan token (should be secure) +# +# Environment Variables (defaulted) +# +# COVERITY_SCAN_BUILD_COMMAND - defaults to "build/docker/scripts/autotools.sh" +# COVERITY_SCAN_DESCRIPTION - defaults to TRAVIS_BRANCH or "master" if empty +# COVERITY_SCAN_PROJECT - defaults to "thrift" + +set -ex + +COVERITY_SCAN_BUILD_COMMAND=${COVERITY_SCAN_BUILD_COMMAND:-build/docker/scripts/autotools.sh} +COVERITY_SCAN_DESCRIPTION=${COVERITY_SCAN_DESCRIPTION:-${TRAVIS_BRANCH:-master}} +COVERITY_SCAN_PROJECT=${COVERITY_SCAN_PROJECT:-thrift} + +# download the coverity scan package + +pushd /tmp +if [[ "$1" != "--skipdownload" ]]; then + rm -rf coverity_tool.tgz cov-analysis* + wget https://scan.coverity.com/download/linux64 --post-data "token=$COVERITY_SCAN_TOKEN&project=$COVERITY_SCAN_PROJECT" -O coverity_tool.tgz + tar xzf coverity_tool.tgz +fi +COVBIN=$(echo $(pwd)/cov-analysis*/bin) +export PATH=$COVBIN:$PATH +popd + +# build the project with coverity scan + +rm -rf cov-int/ +cov-build --dir cov-int $COVERITY_SCAN_BUILD_COMMAND +tar cJf cov-int.tar.xz cov-int/ +curl --form token="$COVERITY_SCAN_TOKEN" \ + --form email="$COVERITY_SCAN_NOTIFICATION_EMAIL" \ + --form file=@cov-int.tar.xz \ + --form version="$(git describe --tags)" \ + --form description="$COVERITY_SCAN_DESCRIPTION" \ + https://scan.coverity.com/builds?project="$COVERITY_SCAN_PROJECT" + |