I’m trying to get Sonar Qube working in Sonar Cloud via Travis CI for a Node.js application, and here is the relevant information. (Please do let me know if I’m not providing enough information, even if you don’t know how to help.):
language: node_js node_js: - 'lts/*' - 'node' dist: trusty addons: sonarcloud: organization: "sonarcloud" # 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 -X
sonar.projectKey=denizakcal_SOEN341_Project sonar.organization=sonarcloud # this is the name and version displayed in the SonarCloud UI. sonar.projectName=SOEN341_Project sonar.projectVersion=1.0 # Path is relative to the sonar-project.properties file. Replace "\" by "/" on Windows. # This property is optional if sonar.modules is set. sonar.sources=. # Encoding of the source code. Default is default system encoding #sonar.sourceEncoding=UTF-8
Raw job log from Travis CI:
It seems that it’s not connecting to the server and that I should set sonar.login and sonar.password values, I’m guessing in sonar-project.properties, but I don’t know which values to put for those (since I used my GitHub account to log into Sonar Cloud), and I’m not sure there is more that I’d need to do after setting those values for the sonar-scanner utility to work.
If someone could help me figure out how to get this all to work, I would greatly appreciate it!