diff options
| author | Nigel Babu <nigelb@redhat.com> | 2018-07-19 15:43:17 +0530 | 
|---|---|---|
| committer | Nigel Babu <nigelb@redhat.com> | 2018-08-06 13:43:41 +0530 | 
| commit | 045ef8b9807f51cca22d0a43fc8026f987504a5e (patch) | |
| tree | cf4e8d0d244d1adff24a5b4ccc04e5da40bab761 | |
| parent | 5730b82fe0980811c1f25eee126bcf7030f0c3aa (diff) | |
Coverity nightly job for Gluster
Change-Id: Idc81fd4612a8746900875d1b4f6adba97d0a1373
| -rw-r--r-- | build-gluster-org/jobs/coverity.yml | 36 | ||||
| -rw-r--r-- | build-gluster-org/scripts/coverity.sh | 34 | 
2 files changed, 70 insertions, 0 deletions
diff --git a/build-gluster-org/jobs/coverity.yml b/build-gluster-org/jobs/coverity.yml new file mode 100644 index 0000000..b206f03 --- /dev/null +++ b/build-gluster-org/jobs/coverity.yml @@ -0,0 +1,36 @@ +- job: +    name: coverity-nightly +    node: coverity +    description: Trigger a coverity run once a week +    project-type: freestyle +    concurrent: true + +    scm: +    - git: +        branches: +        - origin/master +        url: git://review.gluster.org/glusterfs.git +        wipe-workspace: true + +    properties: +    - discard-after-x: +        x: 90 +    - one-build-per-node + +    triggers: +    - timed: "H 14 * * *" + +    builders: +    - shell: !include-raw: ../scripts/coverity.sh + +    wrappers: +    - timestamps +    - timeout: +        timeout: 30 +        abort: true +        type: absolute +    - credentials-binding: +           - username-password-separated: +               credential-id: ce387678-f75f-49c7-a64e-b69bddc9b4ee +               username: COVERITY_EMAIL +               password: COVERITY_TOKEN diff --git a/build-gluster-org/scripts/coverity.sh b/build-gluster-org/scripts/coverity.sh new file mode 100644 index 0000000..6b72191 --- /dev/null +++ b/build-gluster-org/scripts/coverity.sh @@ -0,0 +1,34 @@ +#!/bin/bash + +./autogen.sh +./configure --enable-gnfs --enable-debug --silent +nproc=$(getconf _NPROCESSORS_ONLN) + +# This is a hack to get Coverity to work with GCC8, all of them may not be +# needed in EL7 at the moment, but if someone wants to do this on Fedora, these +# are the steps +cat <<EOF >> site.h +#ifndef __COVERITY_GCC_VERSION_AT_LEAST +    #define __COVERITY_GCC_VERSION_AT_LEAST(x, y) 0 +    #define FAKE__COVERITY_GCC_VERSION_AT_LEAST__ +#endif /* __COVERITY_GCC_VERSION_AT_LEAST */ +#ifdef __x86_64__ +    #if __COVERITY_GCC_VERSION_AT_LEAST(7, 0) +        typedef float _Float128 __attribute__((__vector_size__(128))); +        typedef float _Float32 __attribute__((__vector_size__(32))); +        typedef float _Float32x __attribute__((__vector_size__(32))); +        typedef float _Float64 __attribute__((__vector_size__(64))); +        typedef float _Float64x __attribute__((__vector_size__(64))); +    #endif +#endif +EOF +/opt/cov-analysis-linux64-2017.07/bin/cov-build --dir cov-int make -j ${nproc}; +tar czvf glusterfs.tgz cov-int +BUILD_DATE=$(date "+%Y-%m-%d") +BUILD_VERSION=$(git log -n1 --pretty='%h') +curl --form token="${COVERITY_TOKEN}" \ +  --form email="${COVERITY_EMAIL}" \ +  --form file=@glusterfs.tgz \ +  --form version="${BUILD_DATE}-${BUILD_VERSION}" \ +  --form description="Nightly build on ${BUILD_DATE}" \ +  https://scan.coverity.com/builds?project=gluster%2Fglusterfs  | 
