Hi I am automating code coverage on SonarCloud using Travis CI for a Maven
application.
Now, running the sonar:sonar
command locally submits the report on SoundCloud and I can see it as shown below with Branch master
Now I have also configured .travis.yml
file to auto push the report to SoundCloud on each build as below
But when build is triggered by Travis CI it fails with following error
[INFO] Load project branches
[INFO] Load project branches (done) | time=114ms
[INFO] Load project pull requests
[INFO] Load project pull requests (done) | time=116ms
[INFO] Load branch configuration
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 27.884 s
[INFO] Finished at: 2019-05-19T16:47:23Z
[INFO] Final Memory: 93M/496M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.sonarsource.scanner.maven:sonar-maven-plugin:3.6.0.1398:sonar (default-cli) on project safenest-java-server:
Project was never analyzed. A regular analysis is required before a branch analysis`
I am new to SonarCloud and couldn't find much documentation to get help with this. Can somebody explain what exactly A regular analysis is required
mean? And how to fix this?
Thanks in advance.