José Manuel Ramos
José Manuel Ramos

Reputation: 365

How to get sonarcloud running on Travis Ci with Python code

My question is rather simple:

How to insert Python Code on SonarCloud with Travis-Ci?

I made the previous steps:

But, when I commit something, Travis still stops me with the next job log: This is the log

I searched why on Earth this is possible, because Travis says it has sonar-scanner capabilites.

Thanks in advance and have a great day.

Upvotes: 1

Views: 817

Answers (1)

Michal Polovka
Michal Polovka

Reputation: 650

You must declare sonar-scanner as plugin first in .travis.yml

addons:
  sonarcloud:
    organization: "sonarcloud_organization_key" # the key of the org you chose at step #3
    token:
      secure: ********* # encrypted value of your token
script:
  # other script steps might be done before running the actual analysis
  - sonar-scanner

from https://docs.travis-ci.com/user/sonarcloud/

Upvotes: 1

Related Questions