Giter Site home page Giter Site logo

commitd / drone-sonarqube-node Goto Github PK

View Code? Open in Web Editor NEW

This project forked from aosapps/drone-sonar-plugin

0.0 3.0 0.0 4.41 MB

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

License: Other

Dockerfile 17.09% Go 79.79% Shell 3.12%

drone-sonarqube-node's Introduction

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.