[Git][NTPsec/ntpsec][master] Fix Coverity CI job

Matt Selsky gitlab at mg.gitlab.com
Tue Sep 1 12:06:41 UTC 2020



Matt Selsky pushed to branch master at NTPsec / ntpsec


Commits:
bbd34a76 by Matt Selsky at 2020-09-01T01:17:42-04:00
Fix Coverity CI job

Instead of building a docker image for Coverity, we download Coverity live and
then run it. I wasn't able to figure out how to pass environment variables
(like our Coverity token code) into the Dockerfile.

- - - - -


3 changed files:

- − .dockerfiles/coverity
- .gitlab-ci-docker-images.yml
- .gitlab-ci.yml


Changes:

=====================================
.dockerfiles/coverity deleted
=====================================
@@ -1,6 +0,0 @@
-FROM debian:unstable-slim
-
-RUN apt-get update
-RUN apt-get install -y netbase bison gcc libssl-dev libcap-dev pps-tools python3-dev curl
-RUN curl -o /tmp/cov-analysis-linux64.tgz --form project=${COVERITY_PROJECT_NAME} --form token=${COVERITY_TOKEN}  https://scan.coverity.com/download/linux64
-RUN tar zxf /tmp/cov-analysis-linux64.tgz


=====================================
.gitlab-ci-docker-images.yml
=====================================
@@ -41,9 +41,6 @@ build-centos-latest:
 build-clang:
   <<: *build_definition
 
-build-coverity:
-  <<: *build_definition
-
 build-debian-oldstable:
   <<: *build_definition
 


=====================================
.gitlab-ci.yml
=====================================
@@ -371,13 +371,17 @@ gentoo-hardened-refclocks:
     - python ./waf configure --disable-doc --disable-manpage --refclock=all build
 
 coverity-scan:
-  <<: *job_definition
-  image: $CI_REGISTRY/ntpsec/ntpsec/coverity
+  image: $CI_REGISTRY/ntpsec/ntpsec/debian-unstable
   script:
+    - apt-get install -y curl
+    - curl -o /tmp/cov-analysis-linux64.tgz --form project=ntpsec --form token="${COVERITY_TOKEN}" https://scan.coverity.com/download/linux64
+    - tar zxf /tmp/cov-analysis-linux64.tgz
     - ./waf configure --disable-doc --disable-manpage --refclock=all
     - cov-analysis-linux64-*/bin/cov-build --dir cov-int ./waf build
     - tar czf ntpsec_coverity.tgz cov-int
-    - curl --form token="${COVERITY_TOKEN}" --form email=security at ntpsec.org --form file=@ntpsec_coverity.tgz --form version="$(git rev-parse --short HEAD)" --form description="Automatic submission by gitlab-ci" https://scan.coverity.com/builds?project=${COVERITY_PROJECT_NAME}
+    - curl --form token="${COVERITY_TOKEN}" --form email=security at ntpsec.org --form file=@ntpsec_coverity.tgz --form version="$(git rev-parse --short HEAD)" --form description="Automatic submission by gitlab-ci" https://scan.coverity.com/builds?project=ntpsec
+  tags:
+    - gitlab-org
   rules:
     - if: '$CI_PIPELINE_SOURCE == "schedule" && $CI_COMMIT_BRANCH && $CI_PROJECT_PATH == "NTPsec/ntpsec"'
 



View it on GitLab: https://gitlab.com/NTPsec/ntpsec/-/commit/bbd34a760ceb74457547bc0bdeccb6245e5606ea

-- 
View it on GitLab: https://gitlab.com/NTPsec/ntpsec/-/commit/bbd34a760ceb74457547bc0bdeccb6245e5606ea
You're receiving this email because of your account on gitlab.com.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ntpsec.org/pipermail/vc/attachments/20200901/03a404ad/attachment-0001.htm>


More information about the vc mailing list