plavjanik / coverity-oss-docker

Dockerfile for an image with OSS Coverity Scan

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

coverity-oss-docker · Docker Hub

Dockerfile for an image with OSS Coverity Scan

Building the image

You can find the value of token at http://scan.coverity.com/.

docker build --build-arg COVERITY_TOKEN=<token> --build-arg COVERITY_PROJECT=<org>/<repo> -t plavjanik/coverity-oss .

Usage

CLI

Start the container

docker run -t -d --name covo --mount type=bind,source="$PWD",target=/workspace,consistency=delegated --mount type=bind,source="$HOME/cov/root",target=/root,consistency=delegated plavjanik/coverity-oss

Capture build and submit it to Coverity Scan for the analysis

rm -rf cov-int/

Capture the build:

docker exec -it covo cov-build --fs-capture-search src --dir cov-int ./gradlew --no-build-cache --no-daemon -x test build

Submit the captured build:

docker exec -it covo tar czvf cov-int.tgz cov-int
docker exec -it covo curl --form token=$COVERITY_TOKEN \
  --form email=$COVERITY_EMAIL \
  --form file=@cov-int.tgz \
  --form version="master" \
  --form description="Automated Coverity Scan" \
  "https://scan.coverity.com/builds?project=${COVERITY_PROJECT/\//%2f}"

Jenkins

Sample pipeline: https://github.com/zowe/sample-spring-boot-api-service/blob/coverity/coverity/scan.groovy

About

Dockerfile for an image with OSS Coverity Scan

License:Apache License 2.0


Languages

Language:Dockerfile 82.7%Language:Shell 17.3%