Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Alternative to this action plus SonarCloud support #95

Open
josh-bouganim-avant opened this issue Jun 20, 2023 · 0 comments
Open

Alternative to this action plus SonarCloud support #95

josh-bouganim-avant opened this issue Jun 20, 2023 · 0 comments

Comments

@josh-bouganim-avant
Copy link

josh-bouganim-avant commented Jun 20, 2023

Hello,

As an alternative to this repo which is still in alpha and hasn't seen activity in a couple years, I was able to run the scan using the official docker image like so

  - name: ":sonarcloud: SC Scan"
    plugins:
      - docker#v5.7.0:
          image: "sonarsource/sonar-scanner-cli:4"
          environment:
            - "SONAR_TOKEN=$SONAR_TOKEN"
            - "SONAR_HOST_URL=https://sonarcloud.io"
            - "SONAR_SCANNER_OPTS=-Dsonar.branch.name=$BUILDKITE_BRANCH -Dsonar.branch.target=$BUILDKITE_PULL_REQUEST_BASE_BRANCH"

and have a sonar-project.properties file in your root:

# Full set of options: https://docs.sonarcloud.io/advanced-setup/analysis-parameters/
# Required Properties
sonar.projectKey = *sc project key*
sonar.organization = *sc org*

# Optional Properties

sonar.projectName = *sc project name*
# See here for details how to setup file patterns: https://docs.sonarcloud.io/advanced-setup/analysis-scope/
sonar.sources = .
# exclude test files, auto-generated files here
sonar.exclusions = **/spec/**/*
sonar.tests = spec/
sonar.projectVersion = Initial
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant