Skip to content
This repository was archived by the owner on Jun 29, 2021. It is now read-only.

commitd/drone-sonarqube-node

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

drone-sonarqube-node

Docker Build Status Docker Pulls

A plugin for Drone CI to run SonarQube analysis on node, JavaScript and TypeScript projects.

Use

The simplest use in a drone pipeline is shown below, you just have to provide secrets for the SonarQube host (sonar-host) and login token (sonar-token).

- name: code-analysis
  image: committed/drone-sonarqube-node
  settings:
    host:
      from_secret: sonar_host
    token:
      from_secret: sonar_token

For full parameter details see DOCS.md.

Development

Dependencies are managed with dep and stored in the vendor directory

To build the go binary file (build.sh):

GOOS=linux GOARCH=amd64 CGO_ENABLED=0 go build -o drone-sonarqube-node

To build the docker image (docker.sh):

docker build -t committed/drone-sonarqube-node .

Both steps are performed in ./build.sh

Testing

To test the docker image run the docker image with appropriate properties:

docker run --rm \
  -e DRONE_REPO=test \
  -e PLUGIN_SOURCES=. \
  -e SONAR_HOST=http://localhost:9000 \
  -e SONAR_TOKEN=60878847cea1a31d817f0deee3daa7868c431433 \
  committed/drone-sonarqube-node

Credits

This is based on the original work by aosapps and the node modified version by anthonyjesmok.

About

A Drone Plugin for SonarQubeanalysis of node (js/ts) projects

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Sponsor this project

  •  

Packages

No packages published

Languages

  • Go 79.8%
  • Dockerfile 17.1%
  • Shell 3.1%