Skip to content

walmartdigital/drone-sonar-scanner

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Sonar Scanner Drone Plugin by Walmart

Requirements:

  • sonar-project.properties. This file have to be on your project root directory, use this file to add specific (coverage path, files) information for your project. Ex:
sonar.javascript.lcov.reportPaths=coverage/lcov.info
sonar.coverage.exclusions=test/**/*.test.js,src/api.js,src/index.js

Docker Usage:

In the root project run the follow command

$ docker run -it -rm -e SONAR_HOST=<sonar-url> \
-e SONAR_HOST=<> \
-e SONAR_TOKEN=<sonar-token> \
-e PLUGIN_PROJECT_KEY=<project-key> \
-e PLUGIN_SOURCES_DIRECTORY=<src-path> \
-e DRONE_BUILD_NUMBER=<any-number> \
-v $(pwd):/home \
 <container-name>

Drone Usage:

Copy this code block to drone and replace on <>

code_analysis:
  image: walmartdigital.azurecr.io/sonar-scanner-drone-plugin:latest
  project_key: walmart/<product-name>
  sources_directory: <sources-path>
  secrets: [sonar_host, sonar_token]

Maintainer:

About

Drone Sonar Scanner Plugin

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published