I am trying to set up a project on GitHub with Travis and SonarCloud.
This was working fine at the beginning (including SonarCloud), but then my builds suddenly started failing in the :sonarqube step. I can reproduce this on my “infrastructure” branch which has basically no code on it. Here’s a passing build:
Then, without any significant change, the builds start failing. Here the first fail on that branch:
The error I get is:
Task :sonarqube FAILED SonarQube server [http://localhost:9000] can not be reached
It confuses me that it tries to contact localhost. Is there some local dummy server which forwards this to the cloud? I tried to change the URL and point it to https://sonarcloud.io, but with this I get a different error:
Execution failed for task ':sonarqube'. You're not authorized to run analysis. Please contact the project administrator.
So maybe it was not a good idea to point it to /sonarcloud.io? Or is something wrong with my credentials?
Can someone help to understand what is going on here? It is somehow mysterious to me why a working setup would suddenly break. I am also wondering what is a good way to debug this. And then, how can I fix it?
I had a look at the example project on github (https://github.com/SonarSource/sq-com_example_java-gradle-travis), but this is completely different and not building either.