summaryrefslogtreecommitdiff
path: root/.gitlab-ci.yml
diff options
context:
space:
mode:
authorPavel Hrdina <phrdina@redhat.com>2020-11-12 14:56:25 +0100
committerPavel Hrdina <phrdina@redhat.com>2020-11-19 14:38:13 +0100
commitd9096ce998c10caa1b10d4212a00e816f226ec33 (patch)
tree87715972097b28692c8b70dbbe16e628660ee2ad /.gitlab-ci.yml
parent3f2b7d3fe20ddb22efd5748182214514d4a16bc6 (diff)
downloadlibvirt-d9096ce998c10caa1b10d4212a00e816f226ec33.tar.gz
gitlab-ci: add coverity job
Introduce new job to make a coverity build and upload coverity data to scan.coverity.com where the analysis is then executed. Signed-off-by: Pavel Hrdina <phrdina@redhat.com> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Diffstat (limited to '.gitlab-ci.yml')
-rw-r--r--.gitlab-ci.yml20
1 files changed, 20 insertions, 0 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 725c76e9ee..6792accf8f 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -585,3 +585,23 @@ check-dco:
- $CI_PROJECT_NAMESPACE == 'libvirt'
variables:
GIT_DEPTH: 1000
+
+
+# Coverity job that is run only by schedules
+coverity:
+ image: $CI_REGISTRY_IMAGE/ci-centos-8:latest
+ needs:
+ - x64-centos-8-container
+ stage: builds
+ script:
+ - curl https://scan.coverity.com/download/linux64 --form project=$COVERITY_SCAN_PROJECT_NAME --form token=$COVERITY_SCAN_TOKEN -o /tmp/cov-analysis-linux64.tgz
+ - tar xfz /tmp/cov-analysis-linux64.tgz
+ - meson build
+ - cov-analysis-linux64-*/bin/cov-build --dir cov-int ninja -C build
+ - tar cfz cov-int.tar.gz cov-int
+ - curl https://scan.coverity.com/builds?project=$COVERITY_SCAN_PROJECT_NAME --form token=$COVERITY_SCAN_TOKEN --form email=$GITLAB_USER_EMAIL --form file=@cov-int.tar.gz --form version="$(git describe --tags)" --form description="$(git describe --tags) / $CI_COMMIT_TITLE / $CI_COMMIT_REF_NAME:$CI_PIPELINE_ID"
+ only:
+ refs:
+ - schedules
+ variables:
+ - $COVERITY_SCAN_PROJECT_NAME && $COVERITY_SCAN_TOKEN