Reputation: 365
My question is rather simple:
How to insert Python Code on SonarCloud with Travis-Ci?
I made the previous steps:
In .travis.yml, add in the scripts section, the next code:
script:
- python setup.py test
- ... (other possible commands)
- sonar-scanner
But, when I commit something, Travis still stops me with the next job 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
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