Skip to content

Instantly share code, notes, and snippets.

@spy86
Created May 26, 2019 08:35
Show Gist options
  • Select an option

  • Save spy86/aaa03453f3e64044878c1a8a56fd44ba to your computer and use it in GitHub Desktop.

Select an option

Save spy86/aaa03453f3e64044878c1a8a56fd44ba to your computer and use it in GitHub Desktop.
Sample config for Sonarqube scan in CircleCI
version: 2
jobs:
code_analyze:
docker:
- image: circleci/openjdk:8
steps:
- run:
name: Clone repository
command: git clone https://bitbucket.org/some_repo/perl.git
- run:
name: Dodnload SonarQube
command: curl --insecure -OL https://sonarsource.bintray.com/Distribution/sonar-scanner-cli/sonar-scanner-2.6.1.zip
- run:
name: Unzip SonarQube
command: unzip sonar-scanner-2.6.1.zip
- run:
name: Run SonarQube analyze
command: ./sonar-scanner-2.6.1/bin/sonar-scanner -Dsonar.projectKey=perl -Dsonar.organization=$ORG -Dsonar.sources=. -Dsonar.host.url=https://sonarcloud.io -Dsonar.login=$TOKEN
workflows:
version: 2
test:
jobs:
- code_analyze
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment