Skip to content

wunderio/circleci-sonar-scanner

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

circleci-sonar-scanner

CircleCi Sonar Scanner

Usage: Add secret environment variables in CircleCi:

  • SONAR_TOKEN: authentication token.
  • SONAR_HOST: sonar server url.

Add job to .circleci/config.yml:

analyze:
    docker:
      - image: wunderio/circleci-sonar-scanner
    steps:
      - checkout
      # Run sonar scanner on project.
      - run: cd /home/circleci/project/ && run-sonar-scanner

For more advanced cases create sonar-scanner.properties file or run sonar-scanner with parameters:

- run: >-
      cd /home/circleci/project/ &&
      sonar-scanner -Dsonar.host.url=$SONAR_HOST
      -Dsonar.token=$SONAR_TOKEN
      -Dsonar.php.coverage.reportPaths=/home/circleci/project/coverage.xml
      -Dsonar.projectKey=project-name-in-sonar
      -Dsonar.sources=/home/circleci/project/src
      -Dsonar.exclusions=/home/circleci/project/tests/**

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Shell 60.0%
  • Dockerfile 40.0%